-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 14.0.0, 14.1.0, 14.1.1, 14.5.0
-
Component/s: XUI
-
Labels:
Bug description
With usernames starting ot containing "+", finding this uses in the Sessions by typing the username is not found. However searching with "*" shows that they are present
How to reproduce the issue
1. Create two users like +999 and +911 (uid)
2. Now login as each of these users (but do not clear or logout)
3. Login on another browser and search for all existing sessions ("*")
4. Now search for +999 and +911
Expected behaviour
Search on +999 should show the +999 sessions and respectively for +9111
Current behaviour
Query on * shows all session including +999 Qurty on +999 shows nothing
Work around
Directly using curl and escaping + to %2B works
Code analysis
UsersSessions.jsm
rl: fetchUrl(`/users?_queryId=${username}*`, { realm })
username may need to be ${encodeURIComponent(username)}.
Or for the generated code
openam/XUI/org/forgerock/openam/ui/admin/services/realm/UsersService.js function getByUsernameStartsWith(realm, username) { // [was] url: (0, _fetchUrl2.default)("/users?_queryId=" + username + "*", { realm: realm }), // changed to uri encode the username return obj.serviceCall({ url: (0, _fetchUrl2.default)("/users?_queryId=" + encodeURIComponent(username) + "*", { realm: realm }), headers: { "Accept-API-Version": "protocol=1.0,resource=1.0" } }).then(function (response) { return response.result; });
- relates to
-
OPENAM-15879 openam > ui-admin > entire sessions view disappears when querying with asterisk
-
- Open
-