Commit Graph

373 Commits

Author SHA1 Message Date
Wes Todd
da4d763ff6 Improved fix for open redirect allow list bypass
Co-authored-by: Jon Church <me@jonchurch.com>
Co-authored-by: Blake Embrey <hello@blakeembrey.com>
2024-03-25 09:22:34 -05:00
Wes Todd
a003cfab03 Allow passing non-strings to res.location with new encoding handling checks fixes #5554 #5555 2024-03-20 17:12:46 -05:00
FDrag0n
0867302ddb Prevent open redirect allow list bypass due to encodeurl
Co-authored-by: Jon Church <me@jonchurch.com>
2024-03-20 10:18:54 -05:00
3imed-jaberi
980d881e3b deps: statuses@2.0.1
closes #4336
2022-04-02 22:39:35 -04:00
Douglas Christopher Wilson
a10770286e Use http-errors for res.format error 2022-03-27 23:41:31 -04:00
Chris Barth
5855339455 Fix behavior of null/undefined as "maxAge" in res.cookie
fixes #3935
closes #3936
2022-03-26 23:11:48 -04:00
Nadav Ivgi
9482b82d0b Invoke default with same arguments as types in res.format
closes #3587
2022-03-26 01:29:40 -04:00
Douglas Christopher Wilson
03dc367187 Allow options without filename in res.download 2022-03-25 18:13:42 -04:00
Tommaso Tofacchi
0def9bb659 Add "root" option to res.download
fixes #4834
closes #4855
2022-03-25 00:08:38 -04:00
Jon Church
4847d0efa1 Deprecate string and non-integer arguments to res.status
closes #4223
2022-03-23 23:14:08 -04:00
Tito D. Kesumo Siregar
87279c08aa Support proper 205 responses using res.send
closes #4592
closes #4596
2022-03-23 20:05:05 -04:00
apeltop
d0e166c3c6 docs: fix typo in private api jsdoc
closes #4843
2022-02-28 18:37:41 -05:00
caioagiani
89bb531b31 docs: fix typo in res.download jsdoc
closes #4805
2022-02-03 23:26:17 -05:00
drewm
f275e87dff Fix handling of undefined when "json escape" is enabled
closes #4744
2021-11-17 00:00:56 -05:00
Douglas Christopher Wilson
9dd0e7afdb Fix handling of undefined in res.jsonp 2021-11-16 23:58:17 -05:00
Kim
a1dbb11377 Fix res.jsonp(obj, status) deprecation message
closes #4155
2021-11-16 00:41:19 -05:00
Douglas Christopher Wilson
de081eb70f build: eslint@4.19.1 2021-09-01 19:27:00 -04:00
zhangky
f9a0560a9c docs: fix res.sendStatus/sendFile jsdoc comments
closes #4673
2021-08-14 00:39:56 -04:00
Hussein Mohamed
135a05c524 docs: fix typos in jsdoc
closes #4564
2021-07-31 16:00:00 -04:00
Douglas Christopher Wilson
0a48e18056 Revert "Improve error message for null/undefined to res.status"
fixes #3968
2019-05-25 18:15:13 -04:00
Douglas Christopher Wilson
b8e50568af tests: ignore unreachable line 2019-05-16 10:04:24 -04:00
Louis
6f12eee8ab docs: fix typo in jsdoc comment
closes #3859
2019-04-16 10:29:07 -04:00
Joshua Caron
8da51108e7 Improve error message for null/undefined to res.status
closes #2795
closes #2797
closes #3111
2018-10-27 14:04:49 -04:00
void
6bcdfef6ad Improve error message for non-strings to res.sendFile
closes #3582
2018-10-27 02:27:15 -04:00
Douglas Christopher Wilson
3d10279826 Fix issue where "Request aborted" may be logged in res.sendfile 2018-09-19 23:25:16 -04:00
David Wood
b7817ab1b0 Fix TypeError in res.send when given Buffer and ETag header set
fixes #3445
2017-10-09 22:11:49 -04:00
Greg Guthe
7154014785 Add "escape json" setting for res.json and res.jsonp
closes #3268
closes #3269
2017-09-28 12:03:42 -04:00
Aaron Clover
a24fd0ca6c Add options to res.download
closes #3327
closes #3370
2017-09-28 11:11:08 -04:00
Douglas Christopher Wilson
95fb5cc268 perf: remove dead .charset set in res.jsonp 2017-09-28 10:30:10 -04:00
Douglas Christopher Wilson
12c3712468 Use safe-buffer for improved Buffer API 2017-09-28 08:26:39 -04:00
Douglas Christopher Wilson
48940e6120 Skip Buffer encoding when not generating ETag for small response 2017-09-25 21:12:47 -04:00
Oz Michaeli
ae0b630ac7 Fix error when res.set cannot add charset to Content-Type
fixes #3303
closes #3305
closes #3307
2017-05-14 23:58:25 -04:00
Tony Anisimov
de41c0bfa4 Fix res.cookie jsdoc comment
closes #3304
2017-05-11 15:51:03 -04:00
Douglas Christopher Wilson
12ff56e1e4 Use Object.create to setup request & response prototypes 2017-02-23 01:52:49 -05:00
Wes
034165caeb Use statuses instead of http module for status messages
closes #3215
2017-02-22 02:16:52 -05:00
Douglas Christopher Wilson
76eaa326ee Encode URL in res.location/res.redirect if not already encoded
fixes #2897
fixes #3003
2016-06-13 23:23:29 -04:00
Benjamin Tan
f90f9dde3f Improve performance for res.json/res.jsonp in most cases
closes #2900
2016-05-31 00:32:48 -04:00
Ángel Sanz
b69b7605b0 perf: use strict equality when possible
closes #2722
2016-05-31 00:25:34 -04:00
Andy Fleming
b5a280111f Fix jsdoc comment for res.get
closes #2882
2016-02-10 18:32:51 -05:00
Douglas Christopher Wilson
5b4d4b4ab1 Add statusCode properties to two errors 2015-06-20 15:27:47 -04:00
Douglas Christopher Wilson
5915894af3 Simplify res.cookie to call res.append 2015-06-20 14:38:30 -04:00
Douglas Christopher Wilson
bb53b20d4c perf: remove argument reassignments in response prototype 2015-06-20 14:36:48 -04:00
Behcet Uyar
24d1c98c0a Fix res.format error when only default provided
fixes #2665
2015-06-18 23:08:34 -04:00
Douglas Christopher Wilson
e71014f522 perf: enable strict mode 2015-06-18 23:01:18 -04:00
Thomas Cort
91731b4b9c perf: use saved reference to http.STATUS_CODES
closes #2602
2015-06-18 22:56:30 -04:00
Phat
4b70375d22 docs: update res.set jsdoc
closes #2600
2015-06-18 22:04:41 -04:00
Douglas Christopher Wilson
7e0afa8268 Fix regression where "Request aborted" is logged using res.sendFile
closes #2571
2015-03-02 13:11:31 -05:00
Douglas Christopher Wilson
14a58759c3 Fix ECONNRESET errors from res.sendFile usage
fixes #2571
2015-03-01 17:28:48 -05:00
Douglas Christopher Wilson
dbc61fc191 Fix wrong code on aborted connections from res.sendFile 2015-03-01 17:27:50 -05:00
Douglas Christopher Wilson
531f024e48 Merge tag '3.20.0' 2015-02-18 22:33:47 -05:00