Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Users UI - error when user name contains % #66412

Open
yuliacech opened this issue May 13, 2020 · 4 comments · Fixed by #81562
Open

Security Users UI - error when user name contains % #66412

yuliacech opened this issue May 13, 2020 · 4 comments · Fixed by #81562
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:Users/Roles/API Keys Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! usability UX Debt

Comments

@yuliacech
Copy link
Contributor

This bug was found when checking this issue #57843.

Currently, the bug can be reproduced on the master branch 66e1d32

Describe the bug:
When a user with % in the name is created, it can not be navigated to/edited.

Steps to reproduce:

  1. Navigate to Security -> Users
  2. Click button "create user" on the top of users list, type in a name with % character, e.g. test% and some password.
  3. Click button "Create user" on the bottom.

After creating the user, the navigation will return to the users list. Find the user and click on it to navigate to edit view. The navigation will not happen and there are errors in the console.

Expected behavior:
The user can be viewed/edited without errors.

Screenshots (if relevant):
Screenshot 2020-05-12 at 14 58 21

Errors in browser console (if relevant):
angular.js:15570 URIError: URI malformed
at decodeURIComponent ()
at decodePath (angular.js:14403)
at parseAppUrl (angular.js:14442)
at LocationHashbangUrl.$$parse (angular.js:14604)
at angular.js:15331
at Scope.$digest (angular.js:19115)
at angular.js:15350
at angular.js:6711
at forEach (angular.js:387)
at fireStateOrUrlChange (angular.js:6710)
(anonymous) @ angular.js:15570
(anonymous) @ angular.js:11849
$digest @ angular.js:19117
(anonymous) @ angular.js:15350
(anonymous) @ angular.js:6711
forEach @ angular.js:387
fireStateOrUrlChange @ angular.js:6710
cacheStateAndFireUrlChange @ angular.js:6681
dispatch @ jquery.js:5429
elemData.handle @ jquery.js:5233
history.js:87 Uncaught URIError: Pathname "/edit/test%" could not be decoded. This is likely caused by an invalid percent-encoding.
at createLocation (history.js:87)
at getDOMLocation (history.js:548)
at handleHashChange (history.js:571)
createLocation @ history.js:87
getDOMLocation @ history.js:548
handleHashChange @ history.js:571

Any additional context:
The bug is only reproducible with % sign but not other "special" characters.

@yuliacech yuliacech added bug Fixes for quality problems that affect the customer experience Feature:Users/Roles/API Keys labels May 13, 2020
@legrego legrego added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Jun 17, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@legrego
Copy link
Member

legrego commented Jun 17, 2020

@thomheymann this one might be fairly straightforward if you wanted to explore a fix. Looks like we need to encodeURIComponent(username) the username we pass in here:

{...reactRouterNavigate(this.props.history, `/edit/${username}`)}

@legrego
Copy link
Member

legrego commented Jan 20, 2021

Reopening, as we had to revert the fix in order to support @ in usernames, which is far more common than %. We need to get an upstream bug fixed before we can resolve this entirely: #82440

@legrego legrego reopened this Jan 20, 2021
@legrego legrego removed their assignment Jan 20, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Aug 5, 2021
@legrego
Copy link
Member

legrego commented May 20, 2022

Will potentially be resolved by upgrading the history package to 5.0: #132600

@legrego legrego removed EnableJiraSync loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:Users/Roles/API Keys Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! usability UX Debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants