From: dklawren Date: Wed, 21 Aug 2019 17:28:02 +0000 (-0400) Subject: Bug 1574792 - Bugzilla has suffered an internal error: Bugzilla cannot log you into... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=173abb17949b27da246b695a63b14abfafb3113c;p=thirdparty%2Fbugzilla.git Bug 1574792 - Bugzilla has suffered an internal error: Bugzilla cannot log you into an external site via GitHub (reverted) --- diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index dc279be46..e4245a862 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -123,6 +123,21 @@ sub new { return $self; } +sub target_uri { + my ($self) = @_; + + my $base = Bugzilla->localconfig->urlbase; + if (my $request_uri = $self->request_uri) { + my $base_uri = URI->new($base); + $base_uri->path(''); + $base_uri->query(undef); + return $base_uri . $request_uri; + } + else { + return $base . ($self->url(-relative => 1, -query => 1) || 'index.cgi'); + } +} + # We want this sorted plus the ability to exclude certain params sub canonicalize_query { my ($self, @exclude) = @_; diff --git a/extensions/GitHubAuth/template/en/default/hook/account/auth/login-additional_methods.html.tmpl b/extensions/GitHubAuth/template/en/default/hook/account/auth/login-additional_methods.html.tmpl index 8795d7a4a..f5e5ab11b 100644 --- a/extensions/GitHubAuth/template/en/default/hook/account/auth/login-additional_methods.html.tmpl +++ b/extensions/GitHubAuth/template/en/default/hook/account/auth/login-additional_methods.html.tmpl @@ -9,7 +9,7 @@ [% IF Param('user_info_class').split(',').contains('GitHubAuth') %]
- + - + or