Skip to content

User behavior issue with spaces in Login #525

Closed

Description

@chirag-jn

Describe the issue
When we try to login in the app, if we have whitespace on the right of the username (which weren't supposed to be there), login still works.

To Reproduce or Feature details
Steps to reproduce the behavior:

  1. Enter your username and password which should work fine.
  2. Before pressing the sign in button, enter any amount of whitespace on the right.
  3. Try signing in.
  4. It should signin successfully.

Expected behavior
It should show an error message that "The username or password are not correct."

Smartphone

  • Device: Vivo 1807
  • OS: Android 8.1

Activity

  1. chirag-jn commented on Mar 19, 2020

    @chirag-jn
    MemberAuthor

    @cpg @megabitdragon @octacode
    Can you please tell what would be the best fix for this issue?
    We can just ignore the whitespace in the end and strip it before sending the login request further. If that fix works, then please let me know. I would love to go forward and implement the same.

  2. chirag-jn commented on Mar 19, 2020

    @chirag-jn
    MemberAuthor

    #511 talks about handling spaces in the username. That would certainly fix this issue too. But that won't explain why this issue exists in the first place.

  3. Soroyesodiq commented on Mar 31, 2020

    @Soroyesodiq

    @chirag-jn the source code uses trim() method which removes the spaces and returns the omitted string when users click the sign in button. This is the ethical way of authenticating logins.

  4. chirag-jn commented on Mar 31, 2020

    @chirag-jn
    MemberAuthor

    You are right @Soroyesodiq It's ethical and valid of authenticating usernames. However, it was only working for trailing whitespaces and not leading whitespaces. I'll surely look into this further. Thanks for pointing out!

  5. linked a pull request that will close this issueAdd Non-Admin User Support #563on Jul 17, 2020
  6. chirag-jn commented on Jul 19, 2020

    @chirag-jn
    MemberAuthor

    This issue doesn't exist anymore, hence can be closed.

  7. changed the title [-]Security Issue in Login[/-] [+]User Behaviour Issue in Login[/+] on Aug 4, 2020
  8. changed the title [-]User Behaviour Issue in Login[/-] [+]User behavior issue with spaces in Login[/+] on Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions