Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
34dc06a8
Commit
34dc06a8
authored
Oct 11, 2011
by
Romano Licker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#652] fixes wrong redirect after login
when url contains umlaute
parent
489566a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
application_controller.rb
app/controllers/application_controller.rb
+1
-1
account_test.rb
test/integration/account_test.rb
+9
-0
No files found.
app/controllers/application_controller.rb
View file @
34dc06a8
...
...
@@ -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
)
...
...
test/integration/account_test.rb
View file @
34dc06a8
...
...
@@ -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"
...
...
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