Skip to content

Commit

Permalink
Merge pull request #108 from Automattic/fix-failing-login-non-en
Browse files Browse the repository at this point in the history
Fix failing login when Authorize form is non-English
  • Loading branch information
ashfame authored Dec 8, 2023
2 parents 1afb496 + 7ef23fe commit c49ec95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Http/Handlers/AuthorizeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function handle( Request $request, Response $response ): Response {

$client_id = $request->query( 'client_id', $request->request( 'client_id' ) );
if ( $this->consent_storage->needs_consent( $user->ID, $client_id ) ) {
if ( ! isset( $_POST['authorize'] ) || 'Authorize' !== $_POST['authorize'] ) {
$response->send();
exit;
if ( ! isset( $_POST['authorize'] ) || __( 'Authorize', 'openid-connect-server' ) !== $_POST['authorize'] ) {
$response->setError( 403, 'user_authorization_required', 'This application requires your consent.' );
return $response;
}

$this->consent_storage->update_timestamp( $user->ID, $client_id );
Expand Down

0 comments on commit c49ec95

Please sign in to comment.