-
Notifications
You must be signed in to change notification settings - Fork 34
Update braces to fix possible ReDoS #1067
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
Comments
Here is the report:
|
It seems like we can't just upgrade So, now this issue is (kind of) blocked by #1063 |
Unblocked. |
Quote from https://babeljs.io/docs/en/env/#babel-7 :
|
After updating to a newest Babel, we could try to use arrow functions instead of bind(): --- src/main/frontend/src/components/SimilarSeriesForm.js
+++ src/main/frontend/src/components/SimilarSeriesForm.js
@@ -15,18 +15,16 @@ class SimilarSeriesForm extends React.Component {
hasServerError: false,
validationErrors: []
};
- this.handleSubmit = this.handleSubmit.bind(this);
- this.handleChange = this.handleChange.bind(this);
}
- handleChange(event) {
+ handleChange = (event) => {
event.preventDefault();
this.setState({
similarSeriesId: event.target.value
});
}
- handleSubmit(event) {
+ handleSubmit = (event) => {
event.preventDefault();
this.setState({ At this moment, the compilation fails with error
|
See #1441 |
Now it fails with another error:
|
See for details: https://www.npmjs.com/advisories/786 and https://snyk.io/vuln/npm:braces:20180219
Because this dependency is required by Babel and used only in build-time, the severity is low in our case.
Tech debt for: 054acbc (#1060)
The text was updated successfully, but these errors were encountered: