summaryrefslogtreecommitdiffstats
path: root/extensions/GitHubAuth/lib
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-12-16 20:17:05 +0100
committerGitHub <noreply@github.com>2017-12-16 20:17:05 +0100
commit334bead74bc9c5e819f14946726eaad40986d636 (patch)
treee7ecf8d4eba2e6a046da8a9dc8828f35b75c7428 /extensions/GitHubAuth/lib
parent49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff)
downloadbugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz
bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'extensions/GitHubAuth/lib')
-rw-r--r--extensions/GitHubAuth/lib/Client.pm6
-rw-r--r--extensions/GitHubAuth/lib/Login.pm4
2 files changed, 5 insertions, 5 deletions
diff --git a/extensions/GitHubAuth/lib/Client.pm b/extensions/GitHubAuth/lib/Client.pm
index 46c070856..291501961 100644
--- a/extensions/GitHubAuth/lib/Client.pm
+++ b/extensions/GitHubAuth/lib/Client.pm
@@ -17,7 +17,7 @@ use URI::QueryParam;
use Digest;
use Bugzilla::Extension::GitHubAuth::Client::Error qw(ThrowUserError ThrowCodeError);
-use Bugzilla::Util qw(remote_ip correct_urlbase);
+use Bugzilla::Util qw(remote_ip);
use constant DIGEST_HASH => 'SHA1';
@@ -39,7 +39,7 @@ sub new {
sub login_uri {
my ($class, $target_uri) = @_;
- my $uri = URI->new(correct_urlbase() . "github.cgi");
+ my $uri = URI->new(Bugzilla->localconfig->{urlbase} . "github.cgi");
$uri->query_form(target_uri => $target_uri);
return $uri;
}
@@ -52,7 +52,7 @@ sub authorize_uri {
client_id => Bugzilla->params->{github_client_id},
scope => 'user:email',
state => $state,
- redirect_uri => correct_urlbase() . "github.cgi",
+ redirect_uri => Bugzilla->localconfig->{urlbase} . "github.cgi",
);
return $uri;
diff --git a/extensions/GitHubAuth/lib/Login.pm b/extensions/GitHubAuth/lib/Login.pm
index 3f81467d0..073fbfeea 100644
--- a/extensions/GitHubAuth/lib/Login.pm
+++ b/extensions/GitHubAuth/lib/Login.pm
@@ -17,7 +17,7 @@ use fields qw(github_failure);
use Scalar::Util qw(blessed);
use Bugzilla::Constants qw(AUTH_NODATA AUTH_ERROR USAGE_MODE_BROWSER);
-use Bugzilla::Util qw(trick_taint correct_urlbase generate_random_password);
+use Bugzilla::Util qw(trick_taint generate_random_password);
use Bugzilla::Token qw(issue_short_lived_session_token set_token_extra_data);
use List::MoreUtils qw(any);
use Bugzilla::Extension::GitHubAuth::Client;
@@ -201,7 +201,7 @@ sub _mk_choose_email {
return sub {
my $email = shift;
- my $uri = URI->new(correct_urlbase() . "github.cgi");
+ my $uri = URI->new(Bugzilla->localconfig->{urlbase} . "github.cgi");
$uri->query_form( state => $state, email => $email );
return $uri;
};