summaryrefslogtreecommitdiffstats
path: root/auth.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2016-03-23 10:27:37 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2016-03-23 10:27:37 +0100
commit3368986490028be41351d4329fb4976df2eb75e1 (patch)
tree9b13b716d039c25ef1c5bb79de5db88a3cfa0c06 /auth.cgi
parentc7e80318e56b540caf778c11b79bac9e1bb03e68 (diff)
downloadbugzilla-3368986490028be41351d4329fb4976df2eb75e1.tar.gz
bugzilla-3368986490028be41351d4329fb4976df2eb75e1.tar.xz
Bug 1254226: XSS through javascript: callback URLs in auth delegation
r=dylan
Diffstat (limited to 'auth.cgi')
-rwxr-xr-xauth.cgi2
1 files changed, 2 insertions, 0 deletions
diff --git a/auth.cgi b/auth.cgi
index b24957185..3f4590953 100755
--- a/auth.cgi
+++ b/auth.cgi
@@ -40,6 +40,8 @@ trick_taint($callback);
trick_taint($description);
my $callback_uri = URI->new($callback);
+$callback_uri->scheme =~ /^https?$/
+ or ThrowUserError('auth_delegation_illegal_protocol', { protocol => $callback_uri->scheme });
my $callback_base = $callback_uri->clone;
$callback_base->query(undef);