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
f08b533d
Commit
f08b533d
authored
Aug 06, 2020
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add a feature flag for redirecting unknown-format requests"
This reverts commit
c6ed8073
.
parent
a0942103
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
15 deletions
+3
-15
lib/gitlab/devise_failure.rb
lib/gitlab/devise_failure.rb
+0
-2
spec/controllers/application_controller_spec.rb
spec/controllers/application_controller_spec.rb
+3
-13
No files found.
lib/gitlab/devise_failure.rb
View file @
f08b533d
...
...
@@ -7,8 +7,6 @@ module Gitlab
# If the request format is not known, send a redirect instead of a 401
# response, since this is the outcome we're most likely to want
def
http_auth?
return
super
unless
Feature
.
enabled?
(
:devise_redirect_unknown_formats
,
default_enabled:
true
)
request_format
&&
super
end
...
...
spec/controllers/application_controller_spec.rb
View file @
f08b533d
...
...
@@ -190,20 +190,10 @@ RSpec.describe ApplicationController do
expect
(
response
).
to
redirect_to
new_user_session_path
end
context
'request format is unknown'
do
it
'redirects if unauthenticated'
do
get
:index
,
format:
'unknown'
it
'redirects if unauthenticated and request format is unknown'
do
get
:index
,
format:
'unknown'
expect
(
response
).
to
redirect_to
new_user_session_path
end
it
'returns a 401 if the feature flag is disabled'
do
stub_feature_flags
(
devise_redirect_unknown_formats:
false
)
get
:index
,
format:
'unknown'
expect
(
response
).
to
have_gitlab_http_status
(
:unauthorized
)
end
expect
(
response
).
to
redirect_to
new_user_session_path
end
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