Bug 1030851 - exotic locales prevent katello s access
exotic locales prevent katello s access
Status: CLOSED DEFERRED
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.2
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-15 04:49 EST by Karim Boumedhel
Modified: 2017-03-22 16:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-22 16:37:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karim Boumedhel 2013-11-15 04:49:48 EST
Description of problem:
on a fresh install, /katello throws a error of 
The page isn't redirecting properly


Version-Release number of selected component (if applicable):
katello-1.4.6-63.el6sat.noarch

How reproducible:
download quick locale switcher add-on for firefox
access katello s url of your satellite6


Steps to Reproduce:
1.
2.
3.

Actual results:
you should get main katello page

Expected results:
The page isn't redirecting properly

Additional info:
removing this extension and the additional locales it sets with  Prefs->Content->Languages->Choose serves as a workaround
locales with numbers seem not to be accepted by the language parser
Comment 1 Karim Boumedhel 2013-11-15 04:50:13 EST
this is the error trace
[ERROR 2013-11-15 10:23:39 app 40fe755b95a4d3b5b2ba1144861b3377 #1808] incorrect locale format (RuntimeError)
 | /usr/share/katello/app/lib/kt_locale.rb:66:in `block in parse_accept_locale'
 | /usr/share/katello/app/lib/kt_locale.rb:65:in `sort'
 | /usr/share/katello/app/lib/kt_locale.rb:65:in `parse_accept_locale'
 | /usr/share/katello/app/lib/kt_locale.rb:20:in `set_locale_from_header'
Comment 2 Dominic Cleal 2013-11-15 04:55:16 EST
The Accept-Language header being sent by Karim's browser was:

en-US,en;q=0.96,es-ES;q=0.92,es;q=0.88,fr-FR;q=0.84,fr;q=0.8,en-gb;q=0.76,cs-CZ;q=0.72,cs;q=0.68,en-US-ORACLE9I;q=0.64,ko-KR;q=0.6,ko;q=0.56,es-cl;q=0.52,fr-CA;q=0.48,fr-CH;q=0.44,fr-FR;q=0.4,UTF-8;q=0.36,UTF;q=0.32,ru-RU;q=0.28,ru;q=0.24,nl-NL;q=0.2,nl;q=0.16,pt-br;q=0.12,pt;q=0.08,en-EN;q=0.04

This contains locales ("en-US-ORACLE9I", "UTF-8") containing numbers, which app/lib/kt_locale.rb doesn't accept as it validates against /[a-z\-]+/:

https://github.com/Katello/katello/blob/katello-1.4.14-1/app/lib/kt_locale.rb#L66
Comment 4 Bryan Kearney 2017-03-22 16:37:03 EDT
I do not believe this will be addressed in the next few releases, so I am closing this out. If you feel this was incorrect, please feel free to re-open with additional information.

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