fix: increase password length to 128 chars#3141
Conversation
Co-authored-by: charl <charl@vanstaden.info>
|
Cursor Agent can help with this pull request. Just |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Visit the preview URL for this PR (updated for commit e8306b6): https://walletrc--pull-3141-merge-8xgadwgu.web.app (expires Tue, 23 Sep 2025 13:40:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
|
Unrestricted length inputs frighten me. Suggest a permissive, yet sane limit of 1024. I consulted an agent for recommendations, pasted below: I pulled guidance from RFC 9106 and standards (NIST, OWASP) to answer precisely.
Why:
Recommendation for this app (after removing the 40-char limit in the PR):
References:
I reviewed the standards and propose setting a 128-character cap with no truncation to align with NIST/OWASP while preventing DoS from excessively long inputs. |
|
@cursoragent, increase the max password character limit to 128 throughout the app. Include a TODO about adding the same changes to the SDK. |
|
I standardized the maximum password length across the application by introducing a new constant and applying it to all relevant password input fields. This ensures consistent validation and user experience for password entry throughout the app.
4 tasks completed
Learn more about Cursor Agents |
Co-authored-by: charl <charl@vanstaden.info>
smk762
left a comment
There was a problem hiding this comment.
Confirm has hard limit of 128 char ✔️
An edge case exists, where if user enters a longer password, there is no visual feedback to indicate that the limit has been exceeded. This may result in users with excessively long passwords to be unaware that the excess chars were not included.
This is P2: low probability occurrence with mid-level UX impact. It shouldn't lead to loss of funds - input on login in similarly constrained, and could be resolved with a simple support query if needed.
Content to approve in current state and delegate the above comment to an issue if resolution would further delay release.
|
@cursor review |
There was a problem hiding this comment.
Pull Request Overview
This PR increases the maximum password length from 40 to 128 characters across all password input fields in the application to prevent truncation and ensure consistent validation of long passwords.
- Removes
LengthLimitingTextInputFormatter(40)from password fields - Adds a centralized
passwordMaxLengthconstant set to 128 characters - Updates all password input fields to use the new length limit with hidden counter text
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/shared/constants.dart | Adds new passwordMaxLength constant set to 128 characters |
| lib/views/wallets_manager/widgets/wallet_login.dart | Updates password field to use new length limit |
| lib/views/wallets_manager/widgets/wallet_import_by_file.dart | Updates password field to use new length limit |
| lib/views/wallets_manager/widgets/wallet_deleting.dart | Updates password field to use new length limit |
| lib/views/wallets_manager/widgets/creation_password_fields.dart | Removes old 40-character limit and applies new 128-character limit |
| lib/views/settings/widgets/security_settings/password_update_page.dart | Removes old 40-character limit and applies new 128-character limit |
| lib/views/common/wallet_password_dialog/password_dialog_content.dart | Removes old 40-character limit and applies new 128-character limit |
| lib/views/common/hw_wallet_dialog/trezor_steps/trezor_dialog_select_wallet.dart | Updates passphrase field to use new length limit |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
lib/views/wallets_manager/widgets/creation_password_fields.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@smk762 Please do create an issue. |
Remove 40-character input limits from password fields to prevent truncation and ensure consistent validation of long passwords.