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

Consider providing a way to sanitize attribute values more generally #4

Closed
shhnjk opened this issue Jul 30, 2020 · 2 comments
Closed

Comments

@shhnjk
Copy link

shhnjk commented Jul 30, 2020

Providing only way to sanitize attribute value using URL format might not be enough for some people, and I don't see (sorry if there is, just looked this quick) any way to sanitize attribute value except URL.

For example, Script Gadgets shows that sometimes, XSS could occur from id attribute (which is usually safe) with the help of frameworks.

For each website to block id attribute as a whole seems like a fragile approach. We should probably provide a way for people to declare custom sanitizer function for attribute value, or a way to list allowed attribute values at least.

@shhnjk shhnjk changed the title Consider a way to sanitize attribute values more generally Consider providing a way to sanitize attribute values more generally Jul 30, 2020
@shhnjk
Copy link
Author

shhnjk commented Jul 30, 2020

Oh, maybe it has regex? That might be good enough then :)

@otherdaniel
Copy link
Owner

General comment: This repo was my attempt at (re-)starting the discussion around a sanitizer. Meanwhile, all work has migrated to https://github.com/WICG/sanitizer-api, which has active participants from multiple browsers, and we'd very happily welcome more! :-) I intend to archive this repo.

A closely related issue is being discussed here: WICG/sanitizer-api#26

The general consensus there is to initially keep it simple, and to then extend according to developer needs.

@shhnjk shhnjk closed this as completed Aug 3, 2020
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

No branches or pull requests

2 participants