Bug 1388043 - [userinterface_public_502] Escape characters in error message look messy when editing membership
Summary: [userinterface_public_502] Escape characters in error message look messy when...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: bpeterse
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-24 09:58 UTC by Xingxing Xia
Modified: 2017-03-08 18:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-13 15:27:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Xingxing Xia 2016-10-24 09:58:58 UTC
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 10:42:53 UTC
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 10:45:25 UTC
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 21:16:47 UTC
PR open for this: https://github.com/openshift/origin-web-console/pull/718

Comment 5 Troy Dawson 2016-11-02 17:58:38 UTC
This has been merged into ose and is in OSE v3.4.0.19 or newer.

Comment 7 XiaochuanWang 2016-11-03 09:14:13 UTC
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.