Files
webmin/usermin/switch.cgi
Ilia Ross 113846d243 Fix to use one-time Usermin login URLs for switches
ⓘ 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
2026-07-08 00:39:47 +02:00

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'});