| xssfilter.ini settings
In most cases, you will not need to modify the xssfiliter.ini file settings. This section is presented for advanced users only. The cross-site scripting (XSS) filter configuration settings are only available through the xssfilter.ini file and must be edited with a text editor. Be very careful to keep a backup of this file. If this file is corrupted, you may receive an error message when running Article Manager. You may not be able to login or use the program at all until the ini file has been fixed. Why use a XSS filter The solution we provide: XSS Filtering works by allowing users to only input known good Web page elements. These includes HTML, CSS, communication protocols and MIME types. XSS Filtering is enabled by default. It may be disabled with "disable_xss_filter = 1" in the <install dir>/exec/config.ini file. What tags are filtered Note that the filter is done to the text entered by the user, not to the contents of the templates that you have, so that you can have scripts in your templates but still be able to filter user contents. However, in some cases your site may require the user to enter certain site-specific HTML constructs that are normally removed (e.g. <%PHP%> tags or custom markup tags). To allow those HTML, you need to modify the xssfilter.ini to allow certain tag types. Configuring the XSS filter enable_xss_filter = 1
[flags] Settings These options configure some of the overall filtering actions. Allow @import in style sheets
[flags][allow]
style_import=1
Allow comment tags
[flags][allow]
comment_tags=1
Allow SSI tags
[flags][allow]
ssi_tags=1
Allow unknown tags
[flags][allow]
unknown_tags=1
Allow non-html tags
[flags][allow]
nonhtml_tags=1
Enable UTF8 filtering
[flags][utf8]
filter=1
[tag] Settings This section determine which HTML tags are allowed. Tags that are not listed here will be treated as "unknown" tags (see the section [flags][allow] unknown_tags for more details). Allow a new tag [tags][tag_name] example: allow the <page> tag [tags][page] Disallow an existing tag
example: disallow the <center> tag
[tags][center]
handling=ignore
Disallow a new/existing tag and its contents
example: disallow the <map> tag and its contents
[tags][map]
enclosing=1
handling=ignore
Allow a new tag and its unfiltered contents
example: allow the <danger> tag
[tags][danger]
enclosing=1
Note that the contents between the tags are NOT filtered,
so there is almost no reason to allow a tag this way. It is documented here
so you know what not to do. If the tag contents are formatted like a style
sheet, you can add "handling=style" to filter the contents the same way
as the "style" tag.
[tags][yourstyletag]
enclosing=1
handling=style
[attrs] Settings This section determine which HTML tag attributes are allowed. Attributes that are not listed here will be removed. The values of permitted attributes are used as-is. If you specify an additional handling method, then the value of that attributes will also be filtered. Note: The attribute filtering is applied to all tags. You cannot filter only the attributes of a certain tag. Allow a new attribute [attrs][attribute_name] example: allow the version attribute [attrs][version] Disallow an existing attribute example: disallow the size attribute #[attrs][size] Filter a new/existing attribute
[attrs][attribute_name]
handling=style
or
handling=type
or
handling=url
example: allow the background attribute which is an URL
[attrs][background]
handling=url
[css_attrs] Settings This section determine which CSS attributes are allowed. Attributes that are not listed here will be removed. The values of permitted attributes are used as-is. Note: The attribute filtering is applied to all CSS tags. You cannot filter only the attributes of a certain tag. Allow a new attribute [css_attrs][attribute_name] example: allow the font-stretch attribute [css_attrs][font-stretch] Disallow an existing attribute
[protocols] Settings This section determines which protocols (e.g. http) are allowed in URLs. URLs that begin with protocols not listed here will be removed. Allow a new protocol [protocols][protocol_name] example: allow links to use telnet (e.g. href="telnet://www.yoursite.com") [protocols][telnet] Disallow an existing protocol
[types] Settings This section determines which "type" values are allowed for the TYPE attribute. Note that the TYPE attribute is used for several different purposes. The single-letter and single-digit values are used in lists, and are generally safe. The MIME-types are the ones you should be careful of. Allow a new type [types][mime_type] example: add media/MP3 as a MIME-type [types][media/MP3] Disallow an existing protocol |