Handle hostnames with upper-case letters
[webmin.git] / tunnel / login.cgi
1 #!/usr/local/bin/perl
2 # login.cgi
3 # Store the username and password for a server in a cookie
4
5 require './tunnel-lib.pl';
6 &ReadParse();
7 $enc = &encode_base64($in{'user'}.":".$in{'pass'});
8 $enc =~ s/\r|\n//g;
9 print "Set-Cookie: tunnel=$enc; path=/";
10 if (uc($ENV{'HTTPS'}) eq 'ON') {
11         print "; secure";
12         }
13 print "\n";
14 &redirect("link.cgi/$in{'url'}");
15