mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +00:00
ALlow deletion of users with funny characters http://virtualmin.com/node/21484
This commit is contained in:
@ -8,6 +8,7 @@ $access{'users'} || &error($text{'user_ecannot'});
|
||||
@d = split(/\0/, $in{'d'});
|
||||
@d || &error($text{'user_enone'});
|
||||
|
||||
$main::disable_postgresql_escaping = 1;
|
||||
foreach $u (@d) {
|
||||
&execute_sql_logged($config{'basedb'}, "drop user \"$u\"");
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ if ($gconfig{'debug_what_sql'}) {
|
||||
}
|
||||
&webmin_debug_log('SQL', "db=$_[0] sql=$sql".$params);
|
||||
}
|
||||
if ($sql !~ /^\s*\\/) {
|
||||
if ($sql !~ /^\s*\\/ && !$main::disable_postgresql_escaping) {
|
||||
$sql =~ s/\\/\\\\/g;
|
||||
}
|
||||
if ($driver_handle &&
|
||||
|
@ -9,6 +9,7 @@ $access{'users'} || &error($text{'user_ecannot'});
|
||||
|
||||
if ($in{'delete'}) {
|
||||
# just delete the user
|
||||
$main::disable_postgresql_escaping = 1;
|
||||
&execute_sql_logged($config{'basedb'}, "drop user \"$in{'user'}\"");
|
||||
&webmin_log("delete", "user", $in{'user'});
|
||||
}
|
||||
|
Reference in New Issue
Block a user