-
Notifications
You must be signed in to change notification settings - Fork 19
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
fixing password encoding in local storage #1245
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1245 +/- ##
=======================================
+ Coverage 17% 17% +1%
=======================================
Files 229 229
Lines 6952 6952
=======================================
+ Hits 1147 1154 +7
+ Misses 5805 5798 -7 |
try { | ||
return encrypter.decrypt64(base64Text, iv: iv); | ||
} catch (_) { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is to sentry catch the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a relevant error for sentry to catch? This happens if the password was encrypted with a different key/IV - we changed it ourselves - or if the store gets miraculously corrupted - unlikely. But in either case, we just want the user to perform login again, no?
Either way, if we wanted the exception to go to sentry, wouldn't it be better to add the code in the catch block to report the exception and return null either way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of "encrypting" the password (which is not encryption but just obfuscation) we should focus on supporting flutter_secure_storage and remove this step.
Yep, I agree. I suggested that on Slack and I think it's the way to go! What do the others think? |
Closes #1244
We were not storing our passwords correctly, so when trying to retrieve it,
decode
would actually returnnull
Review checklist
whatsnew/whatsnew-pt-PT
changelog.md
with the change