From: Raphael Geissert Date: Thu, 18 Feb 2016 19:13:17 +0000 (+0100) Subject: Allow dashes in hostnames for sudo passwords (RT #5785) X-Git-Tag: release-0.3.40~14 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=commitdiff_plain;h=036702ecd044b501dce1b05dfbf19a17921120da Allow dashes in hostnames for sudo passwords (RT #5785) --- diff --git a/update.cgi b/update.cgi index 406d813..e526026 100755 --- a/update.cgi +++ b/update.cgi @@ -370,7 +370,7 @@ if (!($query->param('doupdate'))) { my %delete_uuids = map { s/^sudopassword-delete-//; $_ => 1} grep { $query->param($_) eq 'delete' } grep { /^sudopassword-delete-/ } $query->param; my @keepsudo; for my $entry (@{$entry->{'sudopassword'}}) { - my ($uuid, $status, $hosts, $crypted) = ($entry =~ /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*]+) ([^ ]+)$/); + my ($uuid, $status, $hosts, $crypted) = ($entry =~ /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*-]+) ([^ ]+)$/); next unless defined ($uuid); next if (defined $delete_uuids{$uuid}); my %hosts = map { $_ => 1 } split(/,/, $hosts);