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

Sanitize file: protocol in escapeHTML #201

Open
mmichaelis opened this issue Oct 24, 2023 · 0 comments
Open

Sanitize file: protocol in escapeHTML #201

mmichaelis opened this issue Oct 24, 2023 · 0 comments
Assignees
Labels
P2 Normal issue

Comments

@mmichaelis
Copy link

Despite data: and javascript: as well-known attack-vectors for XSS, the file: protocol may also cause malicious behavior. I think, it is rather safe (thus, backward-compatible) to also escape it here:

.replace(/(javascript|data|vbscript):/gi, '$1%3A');

Only for local use of BBob, the file: protocol may be relevant. Thus, for full backward-compatiblity, we would require to add some flag to the options.

@JiLiZART JiLiZART self-assigned this Oct 24, 2023
@JiLiZART JiLiZART added the P2 Normal issue label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Normal issue
Projects
None yet
Development

No branches or pull requests

2 participants