Skip to content

Commit

Permalink
Merge branch '4.x' into serve-static-send-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleytodd authored Sep 11, 2024
2 parents c43b880 + 40d2d8f commit 1be40ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
unreleased
==========

* Deprecate `res.location("back")` and `res.redirect("back")` magic string
* deps: [email protected]
* includes [email protected]
* deps: [email protected]

4.20.0 / 2024-09-10
==========
Expand Down
1 change: 1 addition & 0 deletions lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ res.location = function location(url) {

// "back" is an alias for the referrer
if (url === 'back') {
deprecate('res.location("back"): use res.location(req.get("Referrer") || "/") and refer to https://dub.sh/security-redirect for best practices');
loc = this.req.get('Referrer') || '/';
} else {
loc = String(url);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.2.0",
"finalhandler": "1.3.1",
"fresh": "0.5.2",
"http-errors": "2.0.0",
"merge-descriptors": "1.0.3",
Expand Down

0 comments on commit 1be40ec

Please sign in to comment.