Skip to content
Myr

Allow passing non-strings to res.location with new encoding handling checks fixes #5554 #5555

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Wes Todd · committed by Wes Todd · parent a1fa90f · Browse files · 3 files+21 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+21 added−1 removed

  • tests:+15 added−0 removed
  • other:+6 added−1 removed

3 files+21 added−1 removed

modified:lib/response.js+1 added-1 removed
903 unmodified lines
904 * @public905 */906907res.location = function location(url) {908 var loc = url;908 var loc = String(url);909910 // "back" is an alias for the referrer911 if (url === 'back') {912 loc = this.req.get('Referrer') || '/';
275 unmodified lines
modified:test/res.location.js+15 added
modified:History.md+5 added
1unreleased changes2==========34 * Allow passing non-strings to res.location with new encoding handling checks564.19.0 / 2024-03-207==========89 * Prevent open redirect allow list bypass due to encodeurl
3601 unmodified lines