Skip to content

Commit

Permalink
Simplify condition (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored Jan 5, 2025
1 parent 7e3bccf commit cc5f570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Saml2/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ protected function hasInvalidState(): bool

$state = $this->request->session()->pull('state');

return ! (strlen($state) > 0 && $state === $this->messageContext->getMessage()->getRelayState());
return $state === '' || $state !== $this->messageContext->getMessage()->getRelayState();
}

protected function receive(): void
Expand Down

0 comments on commit cc5f570

Please sign in to comment.