-
Notifications
You must be signed in to change notification settings - Fork 66
Can't see any space if username contains "+" #1001
Comments
Removed auth area because it's not really auth. There is nothing wrong with the username. It's matter of correct using of usernames in URLs. |
Created a new account with dgutride+1 and this is not reproducible. Moving to closed. |
I updated the test account so now it has + in the name for real this time :) Reopening for re-testing. |
The real solution would have been to pass the user UUID everywhere, and only use the user name for display. The same holds for space names, app names, etc. (this approach also gets rids of issues like length limitations on k8s space names). As far as I can tell, encodeURIComponent is used very sparingly throughout fabric8-ui, so it's highly probable this issue still exists. |
What is the status on this? |
We've made some fixes in the UI* to properly URL encode usernames - actually, it should be part of a larger reqork to do that same for any user-entered name (space names, etc). There are almost certainly places where the UI doesn't encode names. *There is a PR in the UI fabric8-ui/ngx-fabric8-wit#174 awaiting a second review from @joshuawilson. It will not fix all the issues. |
@stooke I've merged that PR. Once that change makes it to Prod do you think we can downgrade this issue? |
Absolutely. The real fix is an architectural change - OSIO keeps being bit by it (space names too long, weird characters, no internationalization, etc), but the band-aid (which this is) is only required if OpenShift names have '+' in them, which I think is not currently allowed any more. We might want to revisit this even for a more complete band-aid later. |
If username contains some characters that have to be encoded to be used in URL then UI is just failing apart.
For example if username is something like username+1@gmail.com then you can't even see the user's spaces. Profile page fails too. Some old accounts can have + in gmail usernames. Plus new users may have username+N@redhat.com too.
The problem is that UI doesn't encode usernames when calling backend. For example it calls
https://api.openshift.io/api/namedspaces/username+1@redhat.com
instead ofhttps://api.openshift.io/api/namedspaces/username%2B1%40redhat.com
The text was updated successfully, but these errors were encountered: