mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(fastapi): check ssh key prefixes against configured valid-keytypes
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
1aab960401
commit
e558e979ff
1 changed files with 2 additions and 3 deletions
|
@ -84,9 +84,8 @@ def valid_pgp_fingerprint(fp):
|
|||
|
||||
|
||||
def valid_ssh_pubkey(pk):
|
||||
valid_prefixes = ("ssh-rsa", "ecdsa-sha2-nistp256",
|
||||
"ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521",
|
||||
"ssh-ed25519")
|
||||
valid_prefixes = aurweb.config.get("auth", "valid-keytypes")
|
||||
valid_prefixes = set(valid_prefixes.split(" "))
|
||||
|
||||
has_valid_prefix = False
|
||||
for prefix in valid_prefixes:
|
||||
|
|
Loading…
Add table
Reference in a new issue