diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-10-03 19:08:47 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-10-03 19:08:47 +0200 |
commit | 14fc4fbdf59efc5626b5508780ebe3477cc9366a (patch) | |
tree | 1f36b72022c24d406f95dc5bc7d27992c68289e3 /www/sign.pl | |
parent | 08b9ee11fe5e5a54af866a061c9e8d7782cac3c7 (diff) |
Make the configuration map a dynamic variable.
Diffstat (limited to 'www/sign.pl')
-rwxr-xr-x | www/sign.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/sign.pl b/www/sign.pl index d936303..53d7015 100755 --- a/www/sign.pl +++ b/www/sign.pl @@ -66,8 +66,8 @@ sub sign($$$$$) { while (my $cgi = new CGI::Fast) { - local $::MULKONF = { }; - do "config.pl"; + $::MULKONF = {}; # to silence a warning + load_config(); my $cookie = $cgi->cookie('mulkid_session') or die "No session cookie"; my $session = new CGI::Session("driver:File", $cookie, {Directory=>"/tmp"}) or die "Invalid session cookie"; @@ -86,7 +86,7 @@ while (my $cgi = new CGI::Fast) { if ($email =~ /^(.*?)@(.*)/) { $domain = $2; } die "User is not authorized to use this email address" - unless ($session_user ~~ email_users($::MULKONF, $email)); + unless ($session_user ~~ email_users($email)); my $sig = sign $key, decode_json($user_pubkey), $email, $duration, $domain; say encode_json({signature => $sig}); |