Fixed
Details
Assignee
UnassignedUnassignedReporter
Zac SpitzerZac SpitzerPriority
NewNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Zac Spitzer
Zac SpitzerPriority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 8 September 2020 at 11:50
Updated 19 August 2024 at 20:47
Resolved 19 August 2024 at 20:47
this.scriptprotect="all"; only invalidates tags, but not dangerous attributes like onclick, onload, onerror etc, etc
https://docs.lucee.org/reference/tags/application.html#attribute-scriptprotect
scriptProtect should be updated to strip any on* attributes, perhaps using jsoup (which is already supports osgi)
https://github.com/jhy/jsoup/
https://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer
or
https://github.com/nahsra/antisamy
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/security/ScriptProtect.java
any html tag should have any an on* attributes automatically stripped out or invalidAttribute added, when scriptProtect is enabled
it would be good to expose this as a BIF too, i.e. getSafeHtml() https://luceeserver.atlassian.net/browse/LDEV-838
https://dev.lucee.org/t/would-it-make-sense-to-add-a-tag-function-to-validate-and-or-sanitize-html-input-to-lucee/1253