Bug 1452086 - Pagination Size under Customization in IPA WebUI accepts negative values
Summary: Pagination Size under Customization in IPA WebUI accepts negative values
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-18 10:24 UTC by Sudhir Menon
Modified: 2018-04-10 16:43 UTC (History)
9 users (show)

Fixed In Version: ipa-4.5.4-9.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 16:42:04 UTC
Target Upstream Version:


Attachments (Terms of Use)
Screenshots for bug verification (54.53 KB, application/x-xz)
2018-01-25 10:34 UTC, Nikhil Dehadrai
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0918 None None None 2018-04-10 16:43:25 UTC

Description Sudhir Menon 2017-05-18 10:24:13 UTC
Description of problem: Pagination Size under Customization in IPA WebUI accepts negative value -1


Version-Release number of selected component (if applicable):
ipa-server-4.5.0-9.el7.x86_64

How reproducible: Always

Steps to Reproduce:
1. Install IPA-Server
2. Login to web UI as admin | Navigate to Administrator on RHS corner.
3. Select Customization from the drop down.
4. In the Pagination size text box enter -1 as value.

Actual results:
1. -1 value is accepted in the Pagination size text box and when save button is clicked, Working icon is shown which doesn't finish, with the url address switching back and forth as

https://qe-blade-08.testrelm.test/ipa/ui/#/e/user/search//page=-1
https://qe-blade-08.testrelm.test/ipa/ui/#/e/user/search//page=1

2. Also the http error_log is being appended with the error message

[root@qe-blade-08 ~]# du -sh /var/log/httpd/error_log 
568K	/var/log/httpd/error_log

[root@qe-blade-08 ~]# du -sh /var/log/httpd/error_log 
1.5M	/var/log/httpd/error_log


[Thu May 18 06:15:35.270547 2017] [:warn] [pid 6575] [client 10.76.33.216:39108] failed to set perms (3140) on file (/var/run/ipa/ccaches/admin@TESTRELM.TEST)!, referer: https://qe-blade-08.testrelm.test/ipa/ui/
[Thu May 18 06:15:35.321164 2017] [:error] [pid 6570] ipa: INFO: [jsonserver_session] admin@TESTRELM.TEST: user_find(u'', sizelimit=0, version=u'2.224', pkey_only=True): SUCCESS
[Thu May 18 06:15:35.572341 2017] [:warn] [pid 6575] [client 10.76.33.216:39108] failed to set perms (3140) on file (/var/run/ipa/ccaches/admin@TESTRELM.TEST)!, referer: https://qe-blade-08.testrelm.test/ipa/ui/
[Thu May 18 06:15:35.627594 2017] [:error] [pid 6571] ipa: INFO: [jsonserver_session] admin@TESTRELM.TEST: user_find(u'', sizelimit=0, version=u'2.224', pkey_only=True): SUCCESS
[Thu May 18 06:15:35.880066 2017] [:warn] [pid 6575] [client 10.76.33.216:39108] failed to set perms (3140) on file (/var/run/ipa/ccaches/admin@TESTRELM.TEST)!, referer: https://qe-blade-08.testrelm.test/ipa/ui/

3. All the tabs in the UI is affected, i.e data is not displayed, which is correct behaviour since no positive value is specified, once a positive value is given the entries are displayed.

Expected results:
Pagination size should not accept negative values which is causing issues with IPA Web UI.

Additional info:

Comment 2 Petr Vobornik 2017-05-25 16:15:59 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/6980

Comment 6 Florence Blanc-Renaud 2018-01-12 15:32:29 UTC
Moving to ASSIGNED as the backprt to ipa-4-5 was missing

Comment 12 Nikhil Dehadrai 2018-01-25 10:33:05 UTC
ipa-server-version: ipa-server-4.5.4-9.el7.x86_64

Steps
1. Install IPA-Server
2. Login to web UI as admin | Navigate to Administrator on RHS corner.
3. Select Customization from the drop down.
4. In the Pagination size text box enter -1 as value.
5. Check if negative value is accepted
6. Check httpd/error_log and its size.
7. Check if proper error message is also displayed for:
   - special characters
   - floating numbers / digits
   - alphabets

Verified the bug on the basis of following observation:
1. Verified that negative values are no more accepted, and an appropriate error message is displayed
2. Verified that only integer values are accepted
3. Verified that data is correctly populated across all the tabs as only integer value is accepted.
4. Verified the behavior both for IPA-MASTER and IPA-REPLICA.
5. Verified that the '/var/log/httpd/error_log' are not appended with any constant any Failures messages as only integer value is accepted inside pagination, thus the 'du' command returns appropriate result. 

[root@auto-hv-01-guest04 ~]# du -sh /var/log/httpd/error_log 
28K	/var/log/httpd/error_log

Thus on the basis of above observations , marking the status of bugzilla to 'VERIFIED'

Comment 13 Nikhil Dehadrai 2018-01-25 10:34:01 UTC
Created attachment 1386012 [details]
Screenshots for bug verification

Screenshots for bug verification

Comment 16 errata-xmlrpc 2018-04-10 16:42:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0918


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