mirror of
https://github.com/webmin/webmin.git
synced 2026-07-25 10:50:31 +01:00
ⓘ Replace the legacy Usermin switch cookie/restart flow with a short-lived `session_login.cgi` handoff, while keeping the old API as a compatibility wrapper. https://forum.virtualmin.com/t/usermin-2-550-login-from-the-virtualmin-edit-users-page-stopped-working/137491/37?u=ilia
12 lines
287 B
Perl
Executable File
12 lines
287 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# Set the Usermin session cookie to be some other user
|
|
|
|
require './usermin-lib.pl';
|
|
&ReadParse();
|
|
$access{'sessions'} || &error($text{'sessions_ecannot'});
|
|
|
|
$url = &create_usermin_login_url($in{'user'});
|
|
&redirect($url);
|
|
&webmin_log("switch", undef, $in{'user'});
|
|
|