Fixed: Getting policy error while editing html text data using cms
(OFBIZ-11265)
Service parameter with allow-html="safe" does not check the OWASP sanitizer flag
ie. enabled or not and perform sanitization which causing policy error while
editing text data
getting following exception error:
"In field [textData] by our input policy, your input has not been accepted for
security reason. Please check and modify accordingly, thanks."
Thanks: Pradeep Choudhary for report and suggestion
(cherry picked from commit 8aea160e04)
This commit is contained in:
@@ -439,7 +439,10 @@ public class UtilCodec {
|
||||
* @param locale
|
||||
*/
|
||||
public static String checkStringForHtmlSafe(String valueName, String value, List<String> errorMessageList,
|
||||
Locale locale) {
|
||||
Locale locale, boolean enableSanitizer) {
|
||||
if (!enableSanitizer) {
|
||||
return value;
|
||||
}
|
||||
PolicyFactory policy = null;
|
||||
try {
|
||||
Class<?> customPolicyClass = null;
|
||||
|
||||
Reference in New Issue
Block a user