-
Notifications
You must be signed in to change notification settings - Fork 14
z_html: add property filter callback #95
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
base: master
Are you sure you want to change the base?
Conversation
|
@mmzeeman I had two questions for the 'property' sanitize callback.
|
|
How flexible should it be? Do you want to have multiple sanitizers for different paths? Or a simpler one-sanitizer-fits-all approach? |
Do you want to make it possible to avoid/skip the built-in sanitization? 🤔 If not (which I guess is wiser), then I'd say that it's more convenient to only pass the pre-sanitised data, which is going to happen anyway, and allow custom additional secondary sanitization. Otherwise, I'd only pass the raw data instead (as it's always possible to call the built-in sanitizer first).
I think that would be nice, IMO this could be used to add context-specific sanitization. E.g. one might want to store some CSS in resource properties and do CSS-sanitization, but not necessarily apply it to all fields. |
Good thinking, from a security perspective I indeed would prefer to ensure that data is always sanitized. Problem might be that there is some custom sanitization happening that would be incompatible with the default sanitization. That is why I thought to pass a sanitized key and the content as-is. If the custom code then doesn't do anything we can perform our own sanitization.
Good, I will check if I can keep the path, and then we can pass that.
Indeed. |
TODO: