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

Oauth2 error.ftl does not evaluate xui expression.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.0.4
    • Fix Version/s: 12.0.5
    • Component/s: oauth2, XUI
    • Labels:
    • Sprint:
      AM Sustaining Sprint 29
    • Support Ticket IDs:

      Description

      Steps to reproduce:

      1)Create oauth2 provider and client.
      2 )Set up scopes in client
      3) Force error page e.g calling authorize endpoint without correctly defined redirect uri

      e.g:

      http://openam.example.com:8080/openam/oauth2/authorize?response_type=code&scope=uid&client_id=myoauthclient&redirect_uri=https%3A%2F%2Fbogous.co.uk

      Expected result:

      Error page displayed with Error: redirect_uri_mismatch message

      Actual Outcome:

      You get the redirect_uri_mismatch message plus a stacktrace.

      Expression xui is undefined on line 47, column 6 in templates/page/error.ftl. The problematic instruction: ---------- ==> if xui [on line 47, column 1 in templates/page/error.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression xui is undefined on line 47, column 6 in templates/page/error.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125) at freemarker.core.Expression.isTrue(Expression.java:145) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.process(Environment.java:199) at freemarker.template.Template.process(Template.java:259) at 
      

      Analysis
      As part of OPENAM-9693 there is a call to get main.js and requirejs in authorize and error ftl.

      In error.ftl the <#if xui> is not evaluated correctly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jonthomas Jonathan Thomas
                Reporter:
                jonthomas Jonathan Thomas
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h