mozilla-lockwise / lockwise-android

Firefox's Lockwise app for Android
https://mozilla-lockwise.github.io/lockwise-android/
Mozilla Public License 2.0
622 stars 104 forks source link

There is no limit of characters on username of password fields #1069

Open abodea opened 5 years ago

abodea commented 5 years ago

Steps to reproduce

  1. Launch Lockwise and login with valid credentials.
  2. Access any account.
  3. Enter the edit mode.
  4. Modify the username or password to contain more than 300 characters.

    Expected behavior

    There should be a limit on the username and password fields.

    Actual behavior

    There is no limit when editing the password and username fields.

    Device & build information

    • Device: Google Pixel 3a XL(Android 10).
    • Build version: 3.2.0 (Build 5522).

      Notes

      I added more than 300 characters on password or username fields.

abodea commented 5 years ago

@eliserichards @jhugman I couldn't find the exact string but according to Documentation we can just add the line android:maxLength="NUMBER" under the preference(couldn't find this either).

<androidx.preference.EditTextPreference
                android:title="@string/username"
                android:title="@string/password" 
                android:maxLength="128"/> <!--here-->

Those are my findings regarding this, maybe it helps.