Skip to content

Commit 606a9bd

Browse files
committed
fix: lgtm report updates
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
1 parent c60c8b3 commit 606a9bd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Formidable.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ class IncomingForm extends EventEmitter {
409409
_getFileName(headerValue) {
410410
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
411411
const m = headerValue.match(
412-
// eslint-disable-next-line no-useless-escape
413-
/\bfilename=("(.*?)"|([^\(\)<>@,;:\\"\/\[\]\?=\{\}\s\t/]+))($|;\s)/i,
412+
/\bfilename=("(.*?)"|([^()<>{}[\]@,;:"?=\s/\t]+))($|;\s)/i,
414413
);
415414
if (!m) return null;
416415

src/plugins/multipart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function plugin(formidable, options) {
2222
);
2323
if (m) {
2424
const initMultipart = createInitMultipart(m[1] || m[2]);
25-
initMultipart.call(self, self, options);
25+
initMultipart.call(self, self, options); // lgtm [js/superfluous-trailing-arguments]
2626
} else {
2727
const err = new Error('bad content-type header, no multipart boundary');
2828
self._error(err);

0 commit comments

Comments
 (0)