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

Security check before writing subtitle #31

Open
met opened this issue Feb 8, 2021 · 0 comments
Open

Security check before writing subtitle #31

met opened this issue Feb 8, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@met
Copy link
Owner

met commented Feb 8, 2021

Subtitles are displayed byt innerHTML method: cueElem.innerHTML = simpleText;
This could be dangerous if subtitle text contains some malicious code.
That should be already handled by vttTextToSimple function that removes all unknown HTML tags, but what if any filter include some malicious code after vttTextToSimple call?

Better make some security check just before cueElem.innerHTML = simpleText; is written.
Make a list of allowed HTML tags (and their attribudes), remove the others, write warning to console.

cueElem.innerHTML = simpleText;

@met met added the enhancement New feature or request label Feb 8, 2021
@met met added this to the v0.6 milestone Feb 8, 2021
@met met self-assigned this Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant