Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Bump react-syntax-highlighter to fix regex dos vulnerability, fix cypress #74

Merged
merged 3 commits into from
Jan 15, 2021

Conversation

joshuali925
Copy link
Contributor

Issue #, if available:

Description of changes:

  • bump react-syntax-highlighter to use a newer version of highlight.js
  • make cypress input box selector more specific so it's not affected if a visualization in the notebook also contains an input box

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -274,7 +274,7 @@ describe('Testing paragraphs', () => {
cy.wait(delay);
cy.get('.euiContextMenuItem__text').contains('Rename notebook').click();
cy.wait(delay);
cy.get('input.euiFieldText').type(' (rename)');
cy.get('input.euiFieldText[data-autofocus="true"]').type(' (rename)');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, what does the [data-autofocus="true"] flag change in this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be other input.euiFieldText in embedded visualizations on the page, this makes sure cypress selects the input box inside the rename toast. Using custom class/id selector is better, but none of the euiFieldText in sample visualizations has autofocus, so this works as well

Copy link
Contributor

@davidcui1225 davidcui1225 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joshuali925 joshuali925 merged commit 5433f58 into opendistro-for-elasticsearch:dev Jan 15, 2021
joshuali925 added a commit that referenced this pull request Feb 1, 2021
…ress (#74)

* bump highlight.js

* bump react-syntax-highlighter

* fix cypress
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants