-
- Downloads
Merge branch 'secure-oauth-state' into 'master'
Added random salt and hashing to oauth state parameter This ensures signs state parameter. The generated state is built like this: ``` salt = random_hex(16bytes) secret = sha256_hex(gitlab_ci_secret + salt + return_to) state = "salt:secret:return_to" ``` This prevents from faking the state and forcing redirect to provided URL. However this doesn't prevent replay attacks if you know the valid `state` parameter for specific `return_to`. Should we be concerned about it? /cc @vsizov @jacobvosmaer See merge request !192
No related branches found
No related tags found
Showing
- app/controllers/application_controller.rb 3 additions, 1 deletionapp/controllers/application_controller.rb
- app/controllers/user_sessions_controller.rb 13 additions, 2 deletionsapp/controllers/user_sessions_controller.rb
- app/helpers/user_sessions_helper.rb 28 additions, 0 deletionsapp/helpers/user_sessions_helper.rb
- app/views/projects/_public.html.haml 1 addition, 1 deletionapp/views/projects/_public.html.haml
- app/views/user_sessions/new.html.haml 1 addition, 1 deletionapp/views/user_sessions/new.html.haml
- spec/helpers/user_sessions_helper_spec.rb 69 additions, 0 deletionsspec/helpers/user_sessions_helper_spec.rb
spec/helpers/user_sessions_helper_spec.rb
0 → 100644
Please register or sign in to comment