aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <matthias.benkard@egym.de>2014-05-14 12:00:12 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2015-04-23 21:55:00 +0200
commit985a0147726a490c3e586a46ea916893db389bb8 (patch)
treea3a828d4a2599916906b57288b9ed74550f266b8
parent0db96cce9f83f09b07a46f31f9930e5b7cc19f6f (diff)
sign.pl: Make $::MULKONF->{real_domain} the issuer.
-rwxr-xr-xwww/sign.pl4
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});
}