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

ResourceOwnerGrantHandler: ResourceOwnerLoginHandler can't return null or throw exception

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.2
    • 3.1.3, 3.0.7
    • JAX-RS Security
    • None
    • Unknown

    Description

      ResourceOwnerGrantHandler calls a customisable ResourceOwnerLoginHandler instance, however the `createSubject(String, String)` method declares no exceptions, and a null return value is not handled. This can possibly result in the issuing of an access token if the DataProvider doesn't check for the null subject.

      ResourceOwnerGrantHandler.createAccessToken(...) appears to expect that the ResourceOwnerLoginHandler will throw an `Exception` (literally any Exception), however the method signature of the ResourceOwnerLoginHandler interface doesn't allow that.

      I will submit a pull request with a suggested fix.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sergey_beryozkin Sergey Beryozkin
            karlvr Karl von Randow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment