Skip to content

Commit

Permalink
Merge branch '4.x' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleytodd authored Sep 11, 2024
2 parents eeafcc5 + 7d36477 commit 06bca79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
unreleased
==========

* Deprecate `res.location("back")` and `res.redirect("back")` magic string
* deps: serve-static@1.16.2
* includes send@0.19.0
* deps: finalhandler@1.3.1
* deps: qs@6.13.0

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
4 changes: 2 additions & 2 deletions 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 All @@ -53,7 +53,7 @@
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
"send": "0.19.0",
"serve-static": "1.16.0",
"serve-static": "1.16.2",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"type-is": "~1.6.18",
Expand Down

0 comments on commit 06bca79

Please sign in to comment.