mirror of
https://github.com/moparisthebest/curl
synced 2025-01-10 13:38:04 -05:00
tests/sshserver.pl: fix compatibility with OpenSSH for Windows
Follow up to #5721
This commit is contained in:
parent
0fc1b8bfdd
commit
3ee7c676ec
@ -522,6 +522,11 @@ push @cfgarr, '#';
|
||||
# and do not support quotes around values for some unknown reason.
|
||||
if ($sshdid =~ /OpenSSH-Windows/) {
|
||||
my $username_lc = lc $username;
|
||||
if (exists $ENV{USERDOMAIN}) {
|
||||
my $userdomain_lc = lc $ENV{USERDOMAIN};
|
||||
$username_lc = "$userdomain_lc\\$username_lc";
|
||||
}
|
||||
$username_lc =~ s/ /\?/g; # replace space with ?
|
||||
push @cfgarr, "DenyUsers !$username_lc";
|
||||
push @cfgarr, "AllowUsers $username_lc";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user