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

Error when validate Xss #2685

Closed
lesterpascua opened this issue Jan 21, 2020 · 1 comment
Closed

Error when validate Xss #2685

lesterpascua opened this issue Jan 21, 2020 · 1 comment

Comments

@lesterpascua
Copy link

lesterpascua commented Jan 21, 2020

Describe the bug
When set url:

  1. https://localhost:44302/api/v1/contract?order%5B0%5D.ascendant=false&order%5B0%5D.name=id&pagging.page=0&pagging.pageSize=9&filter.code9=222&filter.onlyAgency=true

  2. https://localhost:44302/api/v1/contract?code9=222&onlyAgency=true

Fail function isValidXss
line: 1464 var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(/*)script/gi;

To Reproduce
Open devTools (F12) in chrome

var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(\/*)script/gi;
xssRegex.test('https://localhost:44302/api/v1/contract?code9=222&onlyAgency=true')

Expected behavior
must print false

Solution
Fix regular expression

Environment:

  • Axios Version: 0.19.1
  • OS: Windows
  • Browser: Chrome
  • Browser Version: 79
  • Additional Library Versions: React 16.12
@chinesedfan
Copy link
Collaborator

Duplicate of #2646. And fixed in 0.19.2.

@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants