Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 84709

Summary: ui.admin.UserForm forms filter incorrectly, causing edit of users with negative userIDs to fail
Product: [Retired] Red Hat Web Application Framework Reporter: Oliver Stewart <oliver>
Component: uiAssignee: Richard Li <richardl>
Status: CLOSED CURRENTRELEASE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Fixed In Version: @27513 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-01 14:37:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Oliver Stewart 2003-02-20 20:18:56 UTC
Description of problem:
            query.addFilter("userID != " + userID);

addFilter is called by appending a string from a request parameter.  This fails
for negative numbers, because the negative sign is interpreted as part of the
'!=' operator (i.e. as '!=-').  userID should be passed to the filter using a
bind variable:
Filter filter = query.addFilter("userID != :userID");
filter.set("userID", userID);

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

How reproducible:

Steps to Reproduce:
1. Login as the administrator user
2. Navigate to the admin UI (<site_root>/admin/)
3. Browse Users
4. Select a User with a negative User ID
5. Click Edit User
6. Modify an attribute, and click Save

The error occurs.
Actual results:
A PersistenceException is thrown.

Expected results:
The user information should be modified.

Comment 1 Richard Li 2003-02-20 21:20:54 UTC
You get +2 karma for the catch.

[16:15] <richardl_home> ccmbot: rank ostewart
[16:15] <ccmbot> ostewart has 2 points of karma (rank 243).

Comment 2 Richard Li 2003-02-20 21:29:28 UTC
Fixed @27513. Should show up in the nightlies.