mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore: Add review feedback
Throw when one of the headers are empty Enumerate all the allowed algorithms in th NATIVE constant Co-authored-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Micke Nordin <kano@sunet.se>
This commit is contained in:
parent
d8cafa1ba5
commit
1b4c9b21d2
2 changed files with 5 additions and 0 deletions
|
|
@ -306,6 +306,9 @@ class Rfc9421IncomingSignedRequest extends SignedRequest implements
|
|||
if ($value === '' && strtolower($component) === 'host') {
|
||||
$value = $this->request->getServerHost();
|
||||
}
|
||||
if ($value === '') {
|
||||
throw new IncomingRequestException('covered header is missing or empty: ' . $component);
|
||||
}
|
||||
$out[strtolower($component)] = $value;
|
||||
}
|
||||
return $out;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ use Throwable;
|
|||
final class Algorithm {
|
||||
public const NATIVE = [
|
||||
'rsa-v1_5-sha256',
|
||||
'rsa-v1_5-sha384',
|
||||
'rsa-v1_5-sha512',
|
||||
'ecdsa-p256-sha256',
|
||||
'ecdsa-p384-sha384',
|
||||
'ed25519',
|
||||
|
|
|
|||
Loading…
Reference in a new issue