Bug #6874
closedPGError: ERROR: bigint out of range: on setting entries_per_page to long integer value
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1125831
Description of problem:
while performing boundary tests, I tried to set the "entries_per_page" parameter value with long integer value and on save, it was set as some exponential value. but when I navigate to some other tab and get back, the value was displayed correctly.
Later when I navigate to other page(for example: users), UI throws following error:
--
Oops, we're sorry but something went wrong
Error
PGError: ERROR: bigint out of range : SELECT "users".* FROM "users" WHERE (1=1) AND (users.auth_source_id <> 2) LIMIT 299999999999999999999999999999999999999999999999999999999999 OFFSET 0
---
Version-Release number of selected component (if applicable):
sat6 GA snap1
How reproducible:
always
Steps to Reproduce:
1. Go to settings --> general --> select "entries_per_page" and update it with long integer value
2.
3.
Actual results:
Production.logs: when I navigate to 'users' menu:
Processing by UsersController#index as HTML
Rendered users/index.html.erb within layouts/application (7.4ms)
Operation FAILED: PGError: ERROR: bigint out of range
: SELECT "users".* FROM "users" WHERE (1=1) AND (users.auth_source_id <> 2) LIMIT 299999999999999999999999999999999999999999999999999999999999 OFFSET 0
Rendered common/500.html.erb within layouts/application (5.4ms)
Rendered layouts/base.html.erb (1.2ms)
Completed 500 Internal Server Error in 186ms (Views: 9.0ms | ActiveRecord: 0.4ms)
Expected results:
User shouldn't be allowed to set a long value, we should define certain limit for any parameter. And if that limit exceeds, UI should throw an error message.
Additional info:
Updated by Ori Rabin over 10 years ago
- Status changed from New to Assigned
- Assignee set to Ori Rabin
Updated by Dominic Cleal over 10 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1712 added
- Pull request deleted (
)
Updated by Anonymous over 10 years ago
- Target version changed from 1.7.4 to 1.7.3
Updated by Dominic Cleal over 10 years ago
- Translation missing: en.field_release set to 21
Updated by Ori Rabin over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset c737b10e70187bfeeb0727edc2282f25cf7165e4.