Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1113349 - Entering a very large number for idle_timeout is unchecked, crashes UI
Summary: Entering a very large number for idle_timeout is unchecked, crashes UI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: orabin
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-26 03:18 UTC by Corey Welton
Modified: 2019-09-25 20:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:27:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6537 0 None None None 2016-04-22 16:09:14 UTC

Description Corey Welton 2014-06-26 03:18:45 UTC
Description of problem:
Idle timeouts can be distracting. Thus, uf a user enters a very large number in the config settings for idle_timeout, there is no bounds testing and the UI crashes.

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

Satellite-6.0.3-RHEL-6-20140625.0

How reproducible:


Steps to Reproduce:
1.  In config settings, change the idle_timeout value to something large like "9999999"
2.  Begin navigating elsewhere in UI.
3.  View results

Actual results:
We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

In production.log


ArgumentError (year too big to marshal: 192146 UTC):
  /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
  /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
  /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
  /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'


Expected results:
Sane bounds testing of this field (and all others!).

Additional info:

Comment 1 Corey Welton 2014-06-26 03:20:15 UTC
"workaround"

[root@cloud-qe-12 ~]# foreman-rake console
Loading production environment (Rails 3.2.8)
irb(main):001:0> Setting.idle_timeout
  Setting Load (0.2ms)  SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'idle_timeout' ORDER BY name LIMIT 1
=> 99999999999
irb(main):002:0> Setting.idle_timeout = 999
  Setting Load (0.5ms)  SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'idle_timeout' ORDER BY name LIMIT 1
   (0.1ms)  BEGIN
  Setting Exists (0.3ms)  SELECT 1 AS one FROM "settings" WHERE ("settings"."name" = 'idle_timeout' AND "settings"."id" != 17) LIMIT 1
  Setting Load (0.6ms)  SELECT "settings".* FROM "settings" WHERE "settings"."id" = 17 ORDER BY name LIMIT 1
   (0.9ms)  SELECT MAX("audits"."version") AS max_id FROM "audits" WHERE "audits"."auditable_id" = 17 AND "audits"."auditable_type" = 'Setting'
  SQL (2.5ms)  INSERT INTO "audits" ("action", "associated_id", "associated_name", "associated_type", "auditable_id", "auditable_name", "auditable_type", "audited_changes", "comment", "created_at", "remote_address", "user_id", "user_type", "username", "version") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) RETURNING "id"  [["action", "update"], ["associated_id", nil], ["associated_name", nil], ["associated_type", nil], ["auditable_id", 17], ["auditable_name", "idle_timeout"], ["auditable_type", "Setting"], ["audited_changes", "---\nvalue:\n- ! '--- 99999999999\n\n  ...\n\n'\n- ! '--- 999\n\n  ...\n\n'\n"], ["comment", nil], ["created_at", Thu, 26 Jun 2014 03:15:31 UTC +00:00], ["remote_address", nil], ["user_id", nil], ["user_type", nil], ["username", ""], ["version", 2]]
   (0.4ms)  UPDATE "settings" SET "value" = '--- 999
...
', "updated_at" = '2014-06-26 03:15:31.316108' WHERE "settings"."category" IN ('Setting::General') AND "settings"."id" = 17
   (8.3ms)  COMMIT
=> 999
irb(main):003:0> Setting.idle_timeout
  Setting Load (18.5ms)  SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'idle_timeout' ORDER BY name LIMIT 1
=> 999
irb(main):004:0>

Comment 3 Dominic Cleal 2014-07-09 10:04:50 UTC
Created redmine issue http://projects.theforeman.org/issues/6537 from this bug

Comment 4 Bryan Kearney 2014-07-15 12:03:45 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6537 has been closed
-------------
Ori Rabin
Applied in changeset commit:8e5a869a80fe588fb3b228e74951c30713abc030.

Comment 7 Corey Welton 2014-07-30 19:30:41 UTC
Verified in Satellite-6.0.4-RHEL-6-20140723.0

Comment 9 Bryan Kearney 2014-09-11 12:27:26 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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