You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(oidc): reject backslash authority forms in relative redirects
The relative-redirect validation accepted /\evil.test because it only
rejected values starting with //. URL parsers normalize \ to /, turning
such a value into an external http://evil.test/ target (open redirect).
Add a shared is_safe_relative_redirect helper that also rejects any
backslash, and use it in the three validation sites: logout
verify_logout_params, sqlpage.oidc_logout_url, and validate_redirect_url.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# CHANGELOG.md
2
2
3
+
## Unreleased
4
+
5
+
- **Security (OIDC open redirect): logout and login redirect targets could point at an external site.** SQLPage accepted a relative redirect target if it started with `/` but not `//`. A value like `/\evil.test` passed that check, but the [WHATWG URL Standard](https://url.spec.whatwg.org/#url-parsing) treats `\` as `/` for http/https URLs, so SQLPage's own URL parser (the `url` crate) turns `/\evil.test` into `http://evil.test/` when it builds the absolute `post_logout_redirect_uri`. That makes it a server-side open redirect, independent of the client. The same WHATWG rule is implemented by current browsers (Chromium, Firefox, Safari), so a `Location: /\evil.test` is also followed to the external host. (Parsers that follow RFC 3986 instead, as many proxies do, leave the backslash alone, but SQLPage cannot rely on that.) You are affected only if you use OIDC and build a redirect target from user-controlled input, for example a `redirect_uri` passed to `sqlpage.oidc_logout_url`. SQLPage now rejects any redirect target containing a backslash, on top of the existing `//` check. Normal paths such as `/foo/bar?x=1` keep working; just upgrade.
6
+
3
7
## v0.44.0
4
8
5
9
This release focuses on making production SQLPage apps easier to understand, debug, and operate. Most apps should keep working without SQL changes, but maintainers should review the notes about logging and uploaded-file permissions.
0 commit comments