File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
extensions/GitHubAuth/lib Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ sub get_email_key {
60
60
my $digest = Digest-> new(DIGEST_HASH);
61
61
$digest -> add($email );
62
62
$digest -> add(remote_ip());
63
- $digest -> add($cgi -> cookie(' Bugzilla_github_token' ) // ' ' );
63
+ $digest -> add($cgi -> cookie(' Bugzilla_github_token' ) // Bugzilla -> request_cache -> { github_token } // ' ' );
64
64
$digest -> add(Bugzilla-> localconfig-> {site_wide_secret });
65
65
return $digest -> hexdigest;
66
66
}
@@ -85,7 +85,7 @@ sub get_state {
85
85
my $digest = Digest-> new(DIGEST_HASH);
86
86
$digest -> add($sorted_target -> as_string);
87
87
$digest -> add(remote_ip());
88
- $digest -> add($cgi -> cookie(' Bugzilla_github_token' ) // ' ' );
88
+ $digest -> add($cgi -> cookie(' Bugzilla_github_token' ) // Bugzilla -> request_cache -> { github_token } // ' ' );
89
89
$digest -> add(Bugzilla-> localconfig-> {site_wide_secret });
90
90
return $digest -> hexdigest;
91
91
}
Original file line number Diff line number Diff line change @@ -33,10 +33,12 @@ sub get_login_info {
33
33
34
34
my $cookie = $cgi -> cookie(' Bugzilla_github_token' );
35
35
unless ($cookie ) {
36
+ my $token = generate_random_password();
36
37
$cgi -> send_cookie(-name => ' Bugzilla_github_token' ,
37
- -value => generate_random_password() ,
38
+ -value => $token ,
38
39
Bugzilla-> params-> {' ssl_redirect' } ? ( -secure => 1 ) : (),
39
40
-httponly => 1);
41
+ Bugzilla-> request_cache-> {github_token } = $token ;
40
42
}
41
43
42
44
return { failure => AUTH_NODATA } unless $github_login ;
You can’t perform that action at this time.
0 commit comments