Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
29cfb411
Commit
29cfb411
authored
May 05, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent decrypt error and recover access_token correctly
parent
e2079bf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/controllers/oauth/geo_auth_controller.rb
app/controllers/oauth/geo_auth_controller.rb
+4
-1
lib/gitlab/geo/oauth_session.rb
lib/gitlab/geo/oauth_session.rb
+2
-1
No files found.
app/controllers/oauth/geo_auth_controller.rb
View file @
29cfb411
...
...
@@ -35,7 +35,10 @@ class Oauth::GeoAuthController < ActionController::Base
def
logout
oauth
=
Gitlab
::
Geo
::
OauthSession
.
new
(
state:
params
[
:state
])
access_token
=
oauth
.
extract_logout_token
token_string
=
oauth
.
extract_logout_token
access_token_error
(
'invalid'
)
unless
token_string
.
is_utf8?
access_token
=
Doorkeeper
::
AccessToken
.
by_token
(
token_string
)
access_token_status
=
Oauth2
::
AccessTokenValidationService
.
validate
(
access_token
)
if
access_token_status
==
Oauth2
::
AccessTokenValidationService
::
VALID
...
...
lib/gitlab/geo/oauth_session.rb
View file @
29cfb411
...
...
@@ -66,7 +66,8 @@ module Gitlab
cipher
=
OpenSSL
::
Cipher
::
AES
.
new
(
128
,
:CBC
)
cipher
.
send
(
operation
)
cipher
.
iv
=
salt
cipher
.
key
=
Gitlab
::
Application
.
secrets
.
secret_key_base
cipher
.
key
=
Gitlab
::
Application
.
secrets
.
db_key_base
cipher
.
auth_data
=
''
cipher
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment