Skip to content

Commit

Permalink
reformat comment to satisfy linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfame committed Sep 21, 2022
1 parent 7d090a2 commit d061d40
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Http/Handlers/AuthorizeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ public function __construct( OAuth2Server $server, ConsentStorage $consent_stora
}

public function handle( Request $request, Response $response ): Response {
// Our dependency bshaffer's OAuth library currently has a bug where it doesn't pick up nonce correctly
// if it's a POST method to the Authorize endpoint
// Fix has been contributed upstream but it doesn't look it would be merged anytime soon based on recent activity
// https://github.com/bshaffer/oauth2-server-php/pull/1032
// Hence, as a temporary fix, we are copying over the nonce from parsed $_POST values to parsed $_GET values in $request object here
// Our dependency bshaffer's OAuth library currently has a bug where it doesn't pick up nonce correctly if it's a POST request to the Authorize endpoint.
// Fix has been contributed upstream (https://github.com/bshaffer/oauth2-server-php/pull/1032) but it doesn't look it would be merged anytime soon based on recent activity.
// Hence, as a temporary fix, we are copying over the nonce from parsed $_POST values to parsed $_GET values in $request object here.
if ( isset( $request->request['nonce'] ) && ! isset( $request->query['nonce'] ) ) {
$request->query['nonce'] = $request->request['nonce'];
}
Expand Down

0 comments on commit d061d40

Please sign in to comment.