File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
lib/travis/api/app/endpoint Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ def handshake
167
167
unless state_ok? ( params [ :state ] )
168
168
log_with_request_id ( "[handshake] Handshake failed (state mismatch)" )
169
169
handle_invalid_response
170
+ return
170
171
end
171
172
172
173
endpoint . path = config [ :access_token_path ]
@@ -197,6 +198,7 @@ def vcs_handshake
197
198
if params [ :code ]
198
199
unless state_ok? ( params [ :state ] , params [ :provider ] )
199
200
handle_invalid_response
201
+ return
200
202
end
201
203
202
204
vcs_data = remote_vcs_user . authenticate (
@@ -269,7 +271,7 @@ def clear_state_cookies
269
271
def handle_invalid_response
270
272
clear_state_cookies
271
273
back_url = headers [ 'Referer' ] || Travis . config . host
272
- response . redirect ( back_url )
274
+ redirect to ( back_url )
273
275
end
274
276
275
277
def create_state
You can’t perform that action at this time.
0 commit comments