Project

General

Profile

Bug #11231

Period character in parameters causes 406 error

Added by James Eckersall over 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

If you create a global parameter with a period character, you are then unable to modify or delete it.
I haven't tested this with host-group or host-level parameters, but I suspect the behaviour will be the same.

For example, I created a global param called "net.ifnames". When I try to edit it:

Started GET "/common_parameters/net.ifnames/edit" for 10.x.x.x at 2015-07-28 10:16:30 +0100
2015-07-28 10:16:30 [F]
ActionController::RoutingError (No route matches [GET] "/common_parameters/net.ifnames/edit"):
/usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'

Trying to delete it:
Started DELETE "/common_parameters/net.ifnames" for 10.x.x.x at 2015-07-28 10:17:06 +0100
2015-07-28 10:17:06 [I] Processing by CommonParametersController#destroy as
2015-07-28 10:17:06 [I] Parameters: {"authenticity_token"=>"xxxx", "id"=>"net"}
2015-07-28 10:17:06 [I] Completed 406 Not Acceptable in 7ms (ActiveRecord: 1.1ms)
2015-07-28 10:17:21 [I]

I guess either the validation should be changed to prevent me from creating a variable with a period char in it, or the backend needs to handle params with a period in the name.

Associated revisions

Revision fe748352 (diff)
Added by Tomer Brisker over 7 years ago

Fixes #11231 - Correctly stubbify global parameters

Revision 5b99fcdf (diff)
Added by Tomer Brisker over 7 years ago

Fixes #11231 - Correctly stubbify global parameters

(cherry picked from commit fe74835256fc0baab8daad6411d865f9e807be3c)

History

#1 Updated by Dominic Cleal over 7 years ago

  • Subject changed from period character in parameters to Period character in parameters causes 406 error
  • Category set to Web Interface

#2 Updated by Tomer Brisker over 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomer Brisker

#3 Updated by The Foreman Bot over 7 years ago

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

#4 Updated by Tomer Brisker over 7 years ago

  • Bugzilla link set to 1247798

#5 Updated by Dominic Cleal over 7 years ago

  • Legacy Backlogs Release (now unused) set to 72

#6 Updated by Anonymous over 7 years ago

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

Also available in: Atom PDF