-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Code scanning alert on escapeHash #341
Comments
Hello @RamonvdW Thats interesting... I saw that a Tab-Content Element is added via JQuery Selector and it takes as input the href-hash of the links, Possible solution: |
I looked into it and it should be no security concern... |
What can happen is that untrusted data can injected into the cash-selector via location-hash or link-hash. |
no security concern. |
Before submitting...
Context
/js/global.js contains the function escapeHash()
I enabled Code Scanning with CodeQL in my GitHub project and the following came up:
Incomplete string escaping or encoding
return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, '\\$1');
This does not escape backslash characters in the input.
References: CWE-20, CWE-80 and CWE-116
Current Behavior
No response
Expected behavior
Should also escape backslash characters in the input
Possible Solutions or Causes
Is it a false positive or a real warning?
Your Environment
The text was updated successfully, but these errors were encountered: