diff options
-rwxr-xr-x | www/sign.pl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/www/sign.pl b/www/sign.pl index b16ff86..9da1216 100755 --- a/www/sign.pl +++ b/www/sign.pl @@ -83,12 +83,10 @@ while (my $cgi = new CGI::Fast) { my $email = $cgi->param('email') or die "No email address supplied"; my $session_user = $session->param('user'); - my $domain; - if ($email =~ /^(.*?)@(.*)/) { $domain = $2; } - die "User $session_user is not authorized to use this email address ($email)" unless any(email_users($email)) eq $session_user; + my $domain = $::MULKONF->{real_domain}; my $sig = sign $key, decode_json($user_pubkey), $email, $duration, $domain; say encode_json({signature => $sig}); } |