Bug #6765
closedcreating a medium with single whitespace(" ") shouldn't be allowed
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1121972
Description of problem:
I was trying to create media with single white space in quotes (" ") and it was created successfully. However when I increase the the whitespace, UI throws error:
can't be blank or contain trailing white spaces.
so UI should throw same error while creating media with single whitespace.
Version-Release number of selected component (if applicable):
sat6 GA snap1
How reproducible:
always
Steps to Reproduce:
1. create a media with single while space in quotes in name
2.
3.
Actual results:
media created successfully
Expected results:
UI should throw error:
can't be blank or contain trailing white spaces.
Additional info:
logs from production.log
Processing by MediaController#create as /*
Parameters: {"utf8"=>"✓", "search"=>"", "authenticity_token"=>"VX+UKFuIgqWyHwxAdhnLIrzFLAmDgGh5qENjFuLnsso=", "medium"=>{"name"=>"\" \"", "path"=>"http://mirror.fakeos.org/G8/$major.$minor/os/$arch", "media_path"=>"", "config_path"=>"", "image_path"=>"", "os_family"=>"", "location_ids"=>[""], "organization_ids"=>[""]}}
Redirected to https://dhcp201-195.englab.pnq.redhat.com/media
Completed 302 Found in 29ms (ActiveRecord: 10.3ms)
Processing by MediaController#index as */
Rendered media/index.html.erb within layouts/application (91.4ms)
Rendered common/_searchbar.html.erb (3.5ms)
Rendered home/_user_dropdown.html.erb (1.5ms)
Read fragment views/tabs_and_title_records-3 (0.1ms)
Rendered home/_topbar.html.erb (2.4ms)
Rendered layouts/base.html.erb (3.9ms)
Completed 200 OK in 112ms (Views: 99.6ms | ActiveRecord: 2.1ms)