Skip to content
Snippets Groups Projects
Verified Commit a625df07 authored by Steven Guikal's avatar Steven Guikal Committed by Eli Schwartz
Browse files

Source valid ssh prefixes from config

parent f9f41dc9
Branches bert
No related tags found
No related merge requests found
......@@ -875,10 +875,7 @@ function valid_pgp_fingerprint($fingerprint) {
* @return bool True if the SSH public key is valid, otherwise false
*/
function valid_ssh_pubkey($pubkey) {
$valid_prefixes = array(
"ssh-rsa", "ssh-dss", "ecdsa-sha2-nistp256",
"ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521", "ssh-ed25519"
);
$valid_prefixes = explode(' ', config_get('auth', 'valid-keytypes'));
$has_valid_prefix = false;
foreach ($valid_prefixes as $prefix) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment