projects
/
mirror
/
userdir-ldap-cgi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4455584
)
Allow dashes in hostnames for sudo passwords (RT #5785)
author
Raphael Geissert
<atomo64@gmail.com>
Thu, 18 Feb 2016 19:13:17 +0000
(20:13 +0100)
committer
Paul Wise
<pabs@debian.org>
Thu, 18 Feb 2016 23:15:32 +0000
(07:15 +0800)
update.cgi
patch
|
blob
|
history
diff --git
a/update.cgi
b/update.cgi
index
406d813
..
e526026
100755
(executable)
--- 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 %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);
next unless defined ($uuid);
next if (defined $delete_uuids{$uuid});
my %hosts = map { $_ => 1 } split(/,/, $hosts);