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

It would be safer to use .innerText instead of .innerHTML when it's possible #4

Closed
mossroy opened this issue May 13, 2022 · 0 comments · Fixed by #5
Closed

It would be safer to use .innerText instead of .innerHTML when it's possible #4

mossroy opened this issue May 13, 2022 · 0 comments · Fixed by #5

Comments

@mossroy
Copy link
Contributor

mossroy commented May 13, 2022

.innerHTML usage usually raises warnings from code security scanners.

It might indeed be a security issue if you let anybody provide the slideshow URLs.

It's possible to replace by .innerText everywhere in slideshow.js, except line 6, where it's actually (static) HTML that is inserted.

I can make a PR for that.

And this last usage of .innerHTML might be replaced by javascript code, too (but I did not do it)

mossroy added a commit to mossroy/slide-show that referenced this issue May 13, 2022
Fixes codepo8#2: video from on top of next image
Fixes codepo8#3: handle HTTP error on images
Fixes codepo8#4: avoid .innerHTML (fixes potential security issue)
@mossroy mossroy mentioned this issue May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant