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

Prevent hypothetical XSS #185

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Prevent hypothetical XSS #185

merged 1 commit into from
Mar 14, 2024

Conversation

maxatdetroit
Copy link
Member

Part of #183

See context and example of how the XSS could be exploited in #183.

This PR

Prevent the possibility of user-input flowing into innerHTML and being interpreted as arbitrary JS by always using a static value for size.

Note: I chose to make the default size medium, but we could also set it as null which would effectively hide the icon from display unless data-size attr is set correctly. Medium felt like a more reasonable default.

@maxatdetroit maxatdetroit added the bug Something isn't working label Mar 14, 2024
@maxatdetroit maxatdetroit requested a review from jedgar1mx March 14, 2024 16:41
@maxatdetroit maxatdetroit self-assigned this Mar 14, 2024
@jedgar1mx jedgar1mx merged commit b8b8947 into dev Mar 14, 2024
5 checks passed
@jedgar1mx jedgar1mx deleted the fix.183 branch March 14, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants