Skip to content

Successfully login with a Username with an extra blank but fail to merge the same accout and update the profile #1472

@XixianLiang

Description

@XixianLiang

Bug symptom and steps to reproduce

There are 2 bugs in this issue.

  • "Choose an account" function doesn't merge the same account.
  • "My profile" doesn't update when login with extra blank in the username.

Here are the steps to reproduce the bugs:

  1. Create an account. (e.g. username="user")
  2. Login the account and arbitrarily leave a comment.
  3. Go to "My profile" and you can see the posted comment. Login your account on Hacker News website and you can also see the comment.
  4. Logout the account. Then login the account with an extra blank in the front or back of the username. (e.g. username="user ")
  5. You can successfully login. Now arbitrarily leave a comment. Refresh the Hacker News website and you can see your new comment, which hints that you login the same account.
  6. Checkout "My profile" and it's empty. You can't update your profile.
  7. Checkout "Choose an account" function. There're two accounts here now (But they are the same account). There supposed to be only one here.

image

app version: v3.3 (apk 79)
device: HUAWEI AGT-AN00
OS: MagicOS 7.0

Possible root cause

This might be a functional bug introduced by the fix of Issue #755.
In Issue #755, user supposed to add a trim method in the login function to trim the extra blank automatically added by some keyboard when typing username, which is supposed to enhance user experience. So, the fix of Issue #775 added a trim method in the login function. But there was no additional handle for the select account function and profile function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions