Skip to content

scopes as array now throw Exception in getQueryStringParameter() #1469

Open
@joelharkes

Description

The function \League\OAuth2\Server\Grant\AbstractGrant::validateScopes() allows an array of strings as input.
Yet when it retrieves it from the OauthRequest via getQueryStringParameter() it does only allow scalar types and thus will fail:

image

Whereas in older versions returning/setting scopes as an array ["scope1","scope2"] was allowed.

Now the source code is very confusing because on one hand it expects it can be an array, but on the other it doesn't allow an array 🤷.

sidenote: only \League\OAuth2\Server\Grant\AuthCodeGrant::respondToAccessTokenRequest() seems to allow scopes as array, all other references get the scope from query string and thus would fail.

At least version 8.2.4 still allowed using strings.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions