Skip to content

Comments

Fixing a bug in redirect_back when query params would fail to match t…#2014

Merged
jwoertink merged 2 commits intomainfrom
issues/1889
Jan 22, 2026
Merged

Fixing a bug in redirect_back when query params would fail to match t…#2014
jwoertink merged 2 commits intomainfrom
issues/1889

Conversation

@jwoertink
Copy link
Member

Purpose

Fixes #1889

Description

There was a little inconsistency between previous_url and redirect_back that caused some issues. When request.resource is used, that will include any query params. So when you do a comparison between request.resource == referer_path this might look like if "/path?a=1" == "/path".

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

@jwoertink jwoertink merged commit 07a3ca9 into main Jan 22, 2026
9 checks passed
@jwoertink jwoertink deleted the issues/1889 branch January 22, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

redirect_back not work as expected as previous_url

1 participant