summaryrefslogtreecommitdiff
path: root/ext/fetch/20_headers.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-03-01 08:14:16 +0900
committerGitHub <noreply@github.com>2023-03-01 08:14:16 +0900
commit55833cf799979e63c6b027fbbf018272308caf5c (patch)
treecc0ae9aa9116e6296e5e74e1c926cfd94fa26449 /ext/fetch/20_headers.js
parent6ffbf8a9410f5ea41669efdece60f7f47f77e3c7 (diff)
fix(core): introduce `SafeRegExp` to primordials (#17592)
Diffstat (limited to 'ext/fetch/20_headers.js')
-rw-r--r--ext/fetch/20_headers.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/fetch/20_headers.js b/ext/fetch/20_headers.js
index b8fd8ab83..a432e76f4 100644
--- a/ext/fetch/20_headers.js
+++ b/ext/fetch/20_headers.js
@@ -32,6 +32,7 @@ const {
ObjectEntries,
RegExpPrototypeTest,
SafeArrayIterator,
+ SafeRegExp,
Symbol,
SymbolFor,
SymbolIterator,
@@ -88,7 +89,7 @@ function fillHeaders(headers, object) {
// Regex matching illegal chars in a header value
// deno-lint-ignore no-control-regex
-const ILLEGAL_VALUE_CHARS = /[\x00\x0A\x0D]/;
+const ILLEGAL_VALUE_CHARS = new SafeRegExp(/[\x00\x0A\x0D]/);
/**
* https://fetch.spec.whatwg.org/#concept-headers-append