Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change content-type-parser to whatwg-mimetype #1169

Closed
wants to merge 2 commits into from
Closed

change content-type-parser to whatwg-mimetype #1169

wants to merge 2 commits into from

Conversation

lagden
Copy link
Contributor

@lagden lagden commented Oct 4, 2021

Regular Expression Denial of Service (ReDoS)
https://snyk.io/test/npm/content-type-parser/1.0.2

@lagden lagden mentioned this pull request Oct 4, 2021
@jsdevel
Copy link
Collaborator

jsdevel commented Nov 3, 2021

@lagden sorry for the late reply, can you resolve the conflicts?

@lagden
Copy link
Contributor Author

lagden commented Nov 4, 2021

done

@jsdevel
Copy link
Collaborator

jsdevel commented Nov 10, 2021

@lagden please ensure the build passes

@nwall123
Copy link

Hi guys. Just wondering is there a plan to fix this and would you have a date in mind? Thanks

@jsdevel
Copy link
Collaborator

jsdevel commented Nov 30, 2021

waiting on the build to be fixed. @lagden can you fix it?

@khadeamolm
Copy link

@jsdevel - Not able to fix the build issue with these code changes. Please assist us to fix this issue. Our project is impacted due to this issue.

@jsdevel
Copy link
Collaborator

jsdevel commented Dec 16, 2021

@khadeamolm you'll have to dig into it and fix it.

jsdevel pushed a commit that referenced this pull request Jan 5, 2022
…1177)

* change content-type-parser to whatwg-mimetype

* Readme.md: Rewrite how to get support for conciseness, update mentions of the old request module to Axios, improve documentation of several functions' arguments.

* Reorder the import from 'whatwg-mimetype' to be alphabetized.

The upstream pull request 1169 failed linting with the following error:
ERROR: /home/runner/work/node-soap/node-soap/src/http.ts:9:1 - Import sources within a group must be alphabetized.

* Add @types/whatwg-mimetype as a developer dependency.

* HttpClient.request(): Change the call to MIMEType's constructor method to MIMEType.parse().

The MIMEType constructor method throws an Error object on failure, unlike the call to contentTypeParser() from the 'content-type-parser' package, which returned null on failure. To maintain backwards compatibility, use MIMEType.parse(), which returns null on failure.

* http.ts: Change the import syntax for MIMEType to be compatible with TypeScript.

* HttpClient.request(): Fix the code that gets the boundary parameter from the parsed HTTP Content-Type header.

Co-authored-by: Thiago Lagden <[email protected]>
@smokhov
Copy link
Contributor

smokhov commented Jan 14, 2022

@jsdevel -- please close this, since you merged #1177 that superseded it. Also #1164 can be addressed with the form and closed.

@jsdevel jsdevel closed this Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants