mirror of
https://github.com/ovh/the-bastion.git
synced 2024-11-10 09:12:54 +08:00
Escape dots in regex patterns for ssh algorithms
Co-authored-by: Stéphane Lesimple <speed47_github@speed47.net>
This commit is contained in:
parent
d0ac9eabb9
commit
7dce5734fd
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ sub get_ssh_pub_key_info {
|
|||
|
||||
my ($prefix, $typecode, $base64, $comment);
|
||||
if ($pubKey =~
|
||||
m{^\s*((\S+)\s+)?(ssh-dss|ssh-rsa|ecdsa-sha\d+-nistp\d+|ssh-ed\d+|sk-ssh-ed25519\@openssh.com|sk-ecdsa-sha2-nistp256\@openssh.com)\s+([a-zA-Z0-9/=+]+)(\s+(.{1,128})?)?$}
|
||||
m{^\s*((\S+)\s+)?(ssh-dss|ssh-rsa|ecdsa-sha\d+-nistp\d+|ssh-ed\d+|sk-ssh-ed25519\@openssh\.com|sk-ecdsa-sha2-nistp256\@openssh\.com)\s+([a-zA-Z0-9/=+]+)(\s+(.{1,128})?)?$}
|
||||
&& length($pubKey) <= 3000)
|
||||
{
|
||||
($prefix, $typecode, $base64, $comment) = ($2, $3, $4, $6);
|
||||
|
|
Loading…
Reference in a new issue