-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Update fbjs to 1.0.0 to fix ReDos Vulnerability #1978
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for upgrading this!
- Can you please make sure the Travis CI is passing. Not sure why this is breaking - maybe it's unrelated to this PR?
- I think these changes need to be propagated to the
yarn.lock
file too & runningyarn
will update this for you.
I updated the yarn lock file but it looks like flow type for joinClasses in fbjs is incorrect as it's typed as joinClasses(className: mixed): string but the correct type would be joinClasses(...className: Array) as joinClasses function take an array of args and pass them inside of variable called className. because of this i had to add a flow fix me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
We can fix the flow fixme in a separate PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@niveditc has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: **Summary** draft-js was using older version of fbjs that uses older version ua-parser-js what has a vulnerability. https://app.snyk.io/vuln/npm:ua-parser-js:20180227 **Test Plan** 1. Run npm test and it passes 2. Run npm build and it passes Pull Request resolved: facebookarchive#1978 Differential Revision: D13746429 fbshipit-source-id: 636e9ad795f97781f6dc8a88125dcea0be005987
Summary: **Summary** draft-js was using older version of fbjs that uses older version ua-parser-js what has a vulnerability. https://app.snyk.io/vuln/npm:ua-parser-js:20180227 **Test Plan** 1. Run npm test and it passes 2. Run npm build and it passes Pull Request resolved: facebookarchive/draft-js#1978 Differential Revision: D13746429 fbshipit-source-id: 636e9ad795f97781f6dc8a88125dcea0be005987
Summary: **Summary** draft-js was using older version of fbjs that uses older version ua-parser-js what has a vulnerability. https://app.snyk.io/vuln/npm:ua-parser-js:20180227 **Test Plan** 1. Run npm test and it passes 2. Run npm build and it passes Pull Request resolved: facebookarchive/draft-js#1978 Differential Revision: D13746429 fbshipit-source-id: 636e9ad795f97781f6dc8a88125dcea0be005987
Summary
draft-js was using older version of fbjs that uses older version ua-parser-js what has a vulnerability.
https://app.snyk.io/vuln/npm:ua-parser-js:20180227
Test Plan