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

SAML2 federation fails when doing Session upgrade with NumberFormatException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.0.0, 6.0.0.6, 6.0.0.7
    • Fix Version/s: None
    • Component/s: SAML
    • Labels:
    • Sprint:
      AM Sustaining Sprint 66, AM Sustaining Sprint 67, AM Sustaining Sprint 68
    • Story Points:
      2

      Description

      Bug description

      Due to OPENAM-14592 , and now in 6.5.2/master too the following code does a Integer.parseInt(authLevel) and it is seen this can throw

      ERROR: Error processing request
      java.lang.NumberFormatException: For input string: "/arg:5"
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Integer.parseInt(Integer.java:569)
          at java.lang.Integer.parseInt(Integer.java:615)
          at com.sun.identity.saml2.profile.IDPSSOUtil.doSSOFederate(IDPSSOUtil.java:314)
          at com.sun.identity.saml2.profile.IDPSSOUtil.doSSOFederate(IDPSSOUtil.java:199)
          at org.apache.jsp.saml2.jsp.idpSSOInit_jsp._jspService(idpSSOInit_jsp.java:192)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      

      and not using OPENAM-12514.

      How to reproduce the issue

      1. Step as in OPENAM-14592 and OPENAM-14929
      Expected behaviour
      No error
      
      Current behaviour
      Exception seen
      

      Work around

      -

      Code analysis

      IDPSSOUtil.java
      
      if (StringUtils.isNotEmpty(authLevel) && idpDefaultAuthLevel > Integer.parseInt(authLevel)) {
      

      need to adopt the fix as in OPENAM-12514 for the rest of the missing ones. Or call "AMAuthUtils.getDataFromRealmQualifiedData(authLevel);"
      eg: call authLevelToInt(authLevel).

      It might be fixed with OPENAM-13978 too

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chee-weng.chea C-Weng C
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: