Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1388043 - [userinterface_public_502] Escape characters in error message look messy when editing membership
[userinterface_public_502] Escape characters in error message look messy when...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console (Show other bugs)
3.4.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: bpeterse
Yadan Pei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-24 05:58 EDT by Xingxing Xia
Modified: 2017-03-08 13 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-13 10:27:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Xingxing Xia 2016-10-24 05:58:58 EDT
Description of problem:
Escape characters in error message look messy when editing membership

Version-Release number of selected component (if applicable):
v3.4.0.14

How reproducible:
Always

Steps to Reproduce:
1. Login with admin user
2. Go to "Resources" -> "Membership", click "Edit Membership"
3. Add role to user: input invalid user name "user/abc", select role "view", then click "Add"
4. Add cluster-admin to user: select the option "Show hidden roles
", input user name "bob", select "cluster-admin", click "Add"

Actual results:
Step 3 and 4, the error message includes escape characters like '"':
3.
The role "view" was not given to "user/abc".Reason: "RoleBinding "view" is invalid: [subjects[1].name: Invalid value: "user/1": name may not contain "/", subjects[2].name: Invalid value: "xxia-proj/bob*abc": must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* (e.g. 'example.com'), subjects[3].name: Invalid value: "user/abc": name may not contain "/"]"

4.
The role "cluster-admin" was not given to "xxia12345678901234567890123456789012345678901234567890".Reason: "rolebinding "cluster-admin" is forbidden: user "xxia" cannot grant extra privileges: {Verbs:["*"], APIGroups:["*"], Resources:["*"]} {Verbs:["*"], NonResourceURLs:["*"]}"

Expected results:
3 and 4 should look well in error message.

Additional info:
Comment 1 Xingxing Xia 2016-10-24 06:42:53 EDT
There may be many similar situations that are not known until encountered.
E.g. here is another situation:
Leave user name input empty, select role "view", click 'Add' (gray!), the error message also includes escape characters:
The role "view" was not given to "".Reason: "RoleBinding "view" is invalid: subjects[1].name: Required value"
Comment 2 Xingxing Xia 2016-10-24 06:45:25 EDT
In comment 1, the gray button 'Add' can be clicked (thus produces the error message). It should not be clicked, this is another problem. Will use a new bug to report it
Comment 3 bpeterse 2016-10-24 17:16:47 EDT
PR open for this: https://github.com/openshift/origin-web-console/pull/718
Comment 5 Troy Dawson 2016-11-02 13:58:38 EDT
This has been merged into ose and is in OSE v3.4.0.19 or newer.
Comment 7 XiaochuanWang 2016-11-03 05:14:13 EDT
Verified on latest origin
openshift v1.4.0-alpha.0+90d8c62-1000-dirty
Follow original test steps and it's not reproduced. The special characters will not be treated as invalid name, it'll be the part of user name.

Note You need to log in before you can comment on or make changes to this bug.