Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-12690

XUI Theme Configuration Realm Mapping is Case Sensitive

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.1, 6.0.0
    • Fix Version/s: 6.5.0, 6.0.1
    • Component/s: XUI
    • Labels:
    • Needs backport:
      No
    • Support Ticket IDs:
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Even though realm names can be created (and are shown) with mixed case, they are case-insensitive and two realms of the same name with different case can not be created.

      Equally, at the XUI, providing `?realm=/myrealm` or `?realm=/MYREALM` resolves to the same realm.

      In the Theme Configuration however, the following works:

      mappings: [
          { theme: "fr-dark-theme", realms: ["/myrealm"] }
      ]
      

      The following does not:

      mappings: [
          { theme: "fr-dark-theme", realms: ["/MYREALM"] }
      ]
      

      Steps to Reproduce

      1. Step 1. Create a realm named "myRealm"
      2. Step 2. Map a theme to the realm "/myRealm" in the XUI (see example above)
      3. Step 3. Navigate to "myRealm" in the XUI

      Expected Behaviour
      Chosen theme is applied.

      Actual Behaviour
      Chosen theme is not applied.

      Workaround
      Use lowercase for the realm name in the theme configuration.

      Code Analysis
      The logic in ThemeManager appears to compare the realm names without removing the casing first.

      The same may be also true of the chain mapping and should be checked.

        Attachments

          Activity

            People

            • Assignee:
              eugenia.sergueeva Eugenia Sergueeva [X] (Inactive)
              Reporter:
              phil.ostler Phil Ostler [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: