Harden Windows DLP enforcement and Electron runtime packaging
This commit is contained in:
1 parent
e7d778aeac
commit
8a253eda89
120 files changed
+3569
-135
No files matched your search
@@ -12,6 +12,7 @@ function snapshotHeaders(input,policy){
|
||||
if(!('value'in descriptor)||!/^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,256}$/.test(name)||typeof descriptor.value!=='string')throw Error('headers-uninspectable');
|
||||
const value=descriptor.value;
|
||||
if(value.length>limit)throw Error('headers-size-limit');
|
||||
// eslint-disable-next-line no-control-regex -- Explicitly reject control characters in security-sensitive input.
|
||||
if(/[\x00-\x08\x0A-\x1F\x7F]|[\uD800-\uDFFF]/u.test(value))throw Error('headers-uninspectable');
|
||||
bytes+=Buffer.byteLength(name)+Buffer.byteLength(value)+4;
|
||||
if(bytes>limit)throw Error('headers-size-limit');
|
||||
|
||||
Reference in new issue
Block a user