From 985a0147726a490c3e586a46ea916893db389bb8 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 14 May 2014 12:00:12 +0200 Subject: sign.pl: Make $::MULKONF->{real_domain} the issuer. --- www/sign.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'www') 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}); } -- cgit v1.2.3