Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-3285

Profile javascript errors for users with numeric usernames starting with zero

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Low
    • Resolution: Fixed
    • 1.0
    • 2.3.1, 2.4.0
    • None
    • None

    Description

      In screens that show a list of groups that a particular user is a member of, some users will see error popups or the groups simply won't load.

      This is due to some JS that stores the username as an HTML attribute "data-user" and the way jQuery reads these.

      We use $el.data('user'), which for most users returns something like "aahmed". For usernames that are all numbers, like 1234, this returns a number 1234. When the number starts with 0, the 0 is stripped.

      Thus when we use that value anywhere, it's incorrect.

      We should instead use $el.attr('data-user')

      Attachments

        Issue Links

          Activity

            People

              aahmed Adam Ahmed (Inactive)
              aahmed Adam Ahmed (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: