gitlab-org--gitlab-foss/app/controllers/import
Stan Hu 88f2e9615c
Alias GitHub and BitBucket OAuth2 callback URLs
To prevent an OAuth2 covert redirect vulnerability, this commit adds and
uses an alias for the GitHub and BitBucket OAuth2 callback URLs to the
following paths:

GitHub: /users/auth/-/import/github
Bitbucket: /users/auth/-/import/bitbucket

This allows admins to put a more restrictive callback URL in the OAuth2
configuration settings. Instead of https://example.com, admins can now use:

https://example.com/users/auth

It's possible but not trivial to change Devise and OmniAuth to use a
different prefix for callback URLs instead of /users/auth. For now,
aliasing the import URLs under the /users/auth namespace should suffice.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56663
2019-01-31 16:52:48 +01:00
..
base_controller.rb API for importing external repos 2019-01-17 10:37:08 +00:00
bitbucket_controller.rb Alias GitHub and BitBucket OAuth2 callback URLs 2019-01-31 16:52:48 +01:00
bitbucket_server_controller.rb Fix Bitbucket Server import not allowing personal projects 2019-01-28 13:06:27 -08:00
fogbugz_controller.rb Enable more frozen string in app/controllers/ 2018-09-23 12:48:02 -07:00
gitea_controller.rb Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
github_controller.rb Alias GitHub and BitBucket OAuth2 callback URLs 2019-01-31 16:52:48 +01:00
gitlab_controller.rb Enable more frozen string in app/controllers/ 2018-09-23 12:48:02 -07:00
gitlab_projects_controller.rb Enable more frozen string in app/controllers/ 2018-09-23 12:48:02 -07:00
google_code_controller.rb Enable more frozen string in app/controllers/ 2018-09-23 12:48:02 -07:00
manifest_controller.rb Enable more frozen string in app/controllers/ 2018-09-23 12:48:02 -07:00