Handle hostnames with upper-case letters
[webmin.git] / switch_user.cgi
1 #!/usr/local/bin/perl
2 # switch_user.cgi
3 # Force the webserver to re-authenticate
4
5 BEGIN { push(@INC, ".."); };
6 use WebminCore;
7
8 &init_config();
9 &get_miniserv_config(\%miniserv);
10 $id = $$.time();
11 open(LOGOUT, ">$miniserv{'logout'}$id");
12 printf LOGOUT "%d\n",
13         $ENV{'HTTP_USER_AGENT'} =~ /(MSIE\s+[6321]\.)|(Netscape\/[4321])|(Lynx)/ ? 1 : 2;
14 close(LOGOUT);
15 &redirect("/?miniserv_logout_id=$id");
16