Files
ofbiz-framework/framework/base/config/owasp.properties
T
Jacques Le Roux 14c58a11c8 Improved: OWASP sanitizer breaks proper rendering of HTML code (OFBIZ-12653)
Allows both <br> and <br /> to pass in UtilCodec::checkStringForHtmlSafe, both
are correct.

Clarifies owasp.properties documentation about how to create own sanitizer
policies
2022-06-21 20:57:37 +02:00

38 lines
1.8 KiB
Properties

###############################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
###############################################################################
####
# OFBiz OWASP properties File https://www.owasp.org/index.php/Main_Page
####
# By default we use a permissive sanitizer policy
# This has a slight impact on the HTML code rendered, look for "cmssite" in OFBIZ-6669 description.
# You will an example based on rendering cmssite, as it was before using the sanitizer.
# You might want to adapt the PERMISSIVE_POLICY to your needs.
# Be sure to check https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet before...
sanitizer.enable=true
# Use sanitizer.permissive.policy=CUSTOM to use your custom permissive PolicyFactory (see OFBIZ-10187)
sanitizer.permissive.policy=DEFAULT
sanitizer.custom.permissive.policy.class=org.apache.ofbiz.base.html.CustomPermissivePolicy
# Use sanitizer.safe.policy=CUSTOM to use your custom safe PolicyFactory (see OFBIZ-5254)
sanitizer.safe.policy=DEFAULT
sanitizer.custom.safe.policy.class=org.apache.ofbiz.base.html.CustomSafePolicy