Add addPolicyName/removePolicyName methods for TrustedTypesDirective#11
Add addPolicyName/removePolicyName methods for TrustedTypesDirective#11sideshowbarker wants to merge 1 commit intoHtmlUnit:mainfrom
Conversation
Port the remaining manipulation API from shapesecurity/salvation#273 that was not included in 34b5635: - Add ManipulationErrorConsumer interface to Directive - Add removeValueExact() to Directive for case-sensitive value removal - Add addPolicyName() and removePolicyName() to TrustedTypesDirective - Add tests for validation, duplicates, case sensitivity, round-trip serialization, and edge cases
|
I'm not against these methods but if I recall correctly all the manipulation functionality was removed when the library was brought into this repo. |
Ah OK — well, if the manipulation functionality was intentionally removed, then I don’t feel strongly about adding it back. And in that case, we could just close this unmerged. I don’t need that functionality for the HTML checker, and I don’t personally have any other use cases for it. I had raised this only in a kind of due-diligence spirit of having the patch check off all the boxes only being complete as I could make it. But it seems like we don’t need for it be quite so “complete”… |
The readme also states this
Removing the edit part makes maintenance a bit simpler and as long as noone needs this I like to stay with this. ❤️ cool to have you on board @sideshowbarker, thanks! |
OK, then I’ll go ahead and close this.
Cheers~ Excited to be here 😄 |
Summary
ManipulationErrorConsumerinterface andremoveValueExact()toDirectivebase classaddPolicyName()andremovePolicyName()toTrustedTypesDirective