Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils: Use QUrl/QUrlQuery to parse urls #1237

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

nekromant
Copy link
Contributor

@nekromant nekromant commented Aug 3, 2024

Apart from not 'reinventing the wheel', this fixes urldecoding in QR code logins that use urlencoded characters e.g. cloudflare.

When cloudflare's QR code was detected by mooltipass app, it decoded the login (which, in turn, was an email address) with %40 instead of @ and created another credential with no password. That in turn caused the app to misbehave, not update password (Perhaps related to #1233 ) and it took several attempts to delete the incorrect login and update.

Apart from not 'reinventing the wheel', this fixes urldecoding in
logins e.g. cloudflare

Signed-off-by: Andrew 'Necromant' Andrianov <[email protected]>
@limpkin limpkin requested a review from deXol August 3, 2024 14:36
{
totp.login = totp.login.mid(1);
}
if (url.scheme().compare("otpauth") != 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use TOTP_URI const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

{
qWarning() << "TOTP QR does not contain secret";
}
if (url.host().compare("totp") != 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TOTP_HOST const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Signed-off-by: Andrew 'Necromant' Andrianov <[email protected]>
@limpkin limpkin merged commit 362365e into mooltipass:master Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants