Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4429

Incorrect response check

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.6.2, 2.7
    • Component/s: JAX-RS Security
    • Labels:
    • Estimated Complexity:
      Novice

      Description

      When an access token response is processed inside OAuthClientUtils class (method getAccessToken), the code checks if the key "OAuthConstants.ERROR_KEY" is present in the returned entity map, but the map's method used is "containsValue()" instead of "containsKey()":

      source line:

      } else if (400 == response.getStatus() && map.containsValue(OAuthConstants.ERROR_KEY))

      { should be: }

      else if (400 == response.getStatus() && map.containsKey(OAuthConstants.ERROR_KEY)) {

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              jordi Jordi Gerona
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: