]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1310747 - SSRF
authorDylan William Hardison <dylan@hardison.net>
Tue, 18 Oct 2016 16:53:01 +0000 (12:53 -0400)
committerDylan William Hardison <dylan@hardison.net>
Tue, 18 Oct 2016 16:53:01 +0000 (12:53 -0400)
auth.cgi

index 86c1f656a181a29053eb748cd2ffd6b371ff21dc..00e6b94d6411bfb5b23d0c7d5be2e901d4e09f7f 100755 (executable)
--- a/auth.cgi
+++ b/auth.cgi
@@ -43,8 +43,8 @@ ThrowUserError("auth_delegation_invalid_description")
   unless $description =~ /^[\w\s]{3,255}$/;
 
 my $callback_uri  = URI->new($callback);
-$callback_uri->scheme =~ /^https?$/
-  or ThrowUserError('auth_delegation_illegal_protocol', { protocol => scalar $callback_uri->scheme });
+ThrowUserError('auth_delegation_illegal_protocol', { protocol => scalar $callback_uri->scheme })
+    unless $callback_uri->scheme eq 'https';
 my $callback_base = $callback_uri->clone;
 $callback_base->query(undef);