mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: support query params when redirecting to internal link on login (#7829)
This commit is contained in:
@@ -262,6 +262,13 @@ describe StaticController do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a redirect path with query params' do
|
||||
it 'redirects to the redirect path and preserves query params' do
|
||||
post "/login.json", params: { redirect: '/foo?bar=1' }
|
||||
expect(response).to redirect_to('/foo?bar=1')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a period to force a new host' do
|
||||
it 'redirects to the root path' do
|
||||
post "/login.json", params: { redirect: ".org/foo" }
|
||||
|
Reference in New Issue
Block a user