Project

General

Profile

Actions

Bug #6874

closed

PGError: ERROR: bigint out of range: on setting entries_per_page to long integer value

Added by Dominic Cleal over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Settings
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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:

Actions #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Settings
Actions #2

Updated by Ori Rabin over 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
Actions #3

Updated by Dominic Cleal over 9 years ago

  • Target version set to 1.7.4
Actions #4

Updated by Dominic Cleal over 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1712 added
  • Pull request deleted ()
Actions #5

Updated by Anonymous over 9 years ago

  • Target version changed from 1.7.4 to 1.7.3
Actions #6

Updated by Dominic Cleal over 9 years ago

  • translation missing: en.field_release set to 21
Actions #7

Updated by Ori Rabin over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF