Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
92dd2934
Commit
92dd2934
authored
13 years ago
by
Felix Schäfer
Browse files
Options
Downloads
Plain Diff
Merge pull request
#106
from finnlabs/pulls/652/fixes_redirect_containing_umlaute
[#652] fixes wrong redirect after login
parents
3cc95353
34dc06a8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/application_controller.rb
+1
-1
1 addition, 1 deletion
app/controllers/application_controller.rb
test/integration/account_test.rb
+9
-0
9 additions, 0 deletions
test/integration/account_test.rb
with
10 additions
and
1 deletion
app/controllers/application_controller.rb
+
1
−
1
View file @
92dd2934
...
...
@@ -262,7 +262,7 @@ class ApplicationController < ActionController::Base
end
def
redirect_back_or_default
(
default
)
back_url
=
CGI
.
unescape
(
params
[
:back_url
].
to_s
)
back_url
=
URI
.
escape
(
CGI
.
unescape
(
params
[
:back_url
].
to_s
)
)
if
!
back_url
.
blank?
begin
uri
=
URI
.
parse
(
back_url
)
...
...
This diff is collapsed.
Click to expand it.
test/integration/account_test.rb
+
9
−
0
View file @
92dd2934
...
...
@@ -32,6 +32,15 @@ class AccountTest < ActionController::IntegrationTest
assert_template
"my/account"
end
def
test_redirect_after_login
target_url
=
"/my/account?q=%C3%A4"
get
target_url
post
"/login"
,
:username
=>
'jsmith'
,
:password
=>
'jsmith'
,
:back_url
=>
@response
.
redirected_to
[
:back_url
]
assert_redirected_to
target_url
end
def
test_autologin
user
=
User
.
find
(
1
)
Setting
.
autologin
=
"7"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment