Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
config:filter_files [2017/12/09 13:47] – [Filter Exemption Files] Added link to default ipfilter_exempt.cfg digital manconfig:filter_files [2019/02/07 19:22] – Mention that C-style escapes are now supported. More examples. digital man
Line 3: Line 3:
 Filter configuration (''[[dir:ctrl]]/*.cfg'') and trash can (''[[dir:text]]/*.can'') files allow the sysop to specify words (or any sequence of characters) that will be used to disallow clients, users, or their content. Filter configuration (''[[dir:ctrl]]/*.cfg'') and trash can (''[[dir:text]]/*.can'') files allow the sysop to specify words (or any sequence of characters) that will be used to disallow clients, users, or their content.
  
-Each line in a filter file may contain a comparison sequence.  Blank lines and lines beginning with a semicolon are ignored+Each line in a filter file may contain a comparison sequence.  Blank lines and lines beginning with a semicolon are ignored.
  
 ===== Comparison Sequences ===== ===== Comparison Sequences =====
 +  * Leading white-space characters are ignored
   * Sequences of alphabetic letters are treated case-insensitively   * Sequences of alphabetic letters are treated case-insensitively
 +  * C-style string-literal backslash (''\'') [[wp>C_syntax#Strings|escape sequences]] are supported (as of v3.17c)
   * Sequences //beginning// with an exclamation mark (''!'') negate the match logic for that sequence   * Sequences //beginning// with an exclamation mark (''!'') negate the match logic for that sequence
   * Sequences //beginning// with an asterisk (''*'') match only if the characters following the ''*'' are found at the end of the comparison string   * Sequences //beginning// with an asterisk (''*'') match only if the characters following the ''*'' are found at the end of the comparison string
   * Sequences //ending// with an asterisk (''*'') or caret (''^'') match only if the characters preceding are found at the beginning of the comparison string   * Sequences //ending// with an asterisk (''*'') or caret (''^'') match only if the characters preceding are found at the beginning of the comparison string
-  * Sequences //ending// with a tilde (''~'') match only if the preceding characters are found anywhere within comparison string+  * Sequences //ending// with a tilde (''~'') match when the preceding string of characters are found //anywhere// within the comparison string
   * All other sequences are "exact match" string comparisons   * All other sequences are "exact match" string comparisons
    
-Examples+==== Examples ==== 
   * ''sysop'' in the ''name.can'' file would mean users could not use the name "sysop".   * ''sysop'' in the ''name.can'' file would mean users could not use the name "sysop".
-  * ''sysop*'' would mean users could not use names beginning with the word "sysop", like "sysopa" or "sysops" etc+  * ''sysop*'' would mean users could not use names //beginning// with the word "sysop", like "sysop the" or "sysops"
-  * ''sysop~'' would mean users could not use names that have the word "sysop" anywhere in them, like "imthesysop" or "mesysophere".+  * ''sysop~'' would mean users could not use names that have the word "sysop" //anywhere// in them, like "imthesysop" or "Joe Sysop".
  
-===== IPv4 CIDR Notation =====+=== Match strings with the character sequence "viagra" anywhere within === 
 +  viagra~ 
 +   
 +=== Match strings beginning with the character sequence "[adv]" === 
 +  [adv]* 
 + 
 +=== Match strings beginning with a space === 
 +  \ * 
 +   
 +=== Match the string "administrator", exactly (but case-insensitively) === 
 +  administrator   
 +   
 +=== Match strings that do not begin with the character sequence: "the " === 
 +  !the * 
 + 
 +==== IPv4 CIDR Notation ====
  
 An additional comparison format was introduced in v3.17 (Feb-9-2017) specifically for partial (ranges of) IPv4 address matching following standard [[wp>Classless_Inter-Domain_Routing]] (CIDR) notation. For example, rather than using the comparison string "192.168.1.*" to match all IP addresses that begin with the first 3 octets of 192, 168, and 1, you could specify the same thing using CIDR notation: An additional comparison format was introduced in v3.17 (Feb-9-2017) specifically for partial (ranges of) IPv4 address matching following standard [[wp>Classless_Inter-Domain_Routing]] (CIDR) notation. For example, rather than using the comparison string "192.168.1.*" to match all IP addresses that begin with the first 3 octets of 192, 168, and 1, you could specify the same thing using CIDR notation:
Line 31: Line 47:
  
 IPv6 CIDR notation is not supported at this time. IPv6 CIDR notation is not supported at this time.
 + 
 ===== Trash Can Files ===== ===== Trash Can Files =====
  
 The following table lists the supported trash can files, a description of their use, and optional rejection message (''.msg'') files that may be displayed to users that are (or have their content) filtered. Trash can files and their respective optional rejection message files are located in the ''[[dir:text]]'' directory: The following table lists the supported trash can files, a description of their use, and optional rejection message (''.msg'') files that may be displayed to users that are (or have their content) filtered. Trash can files and their respective optional rejection message files are located in the ''[[dir:text]]'' directory:
  
-^Filename / Page     ^Default Contents^Rejection Message^Description^+^Filename / Page     ^Default Contents^Rejection Message((Rejection message files are only used/displayed by the terminal server))^Description^
 |''[[email.can]]''   |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/text/email.can|email.can]]|''[[bademail.msg]]''|Disallowed (source or destination) e-mail addresses (see also ''[[twitlist.cfg]]'')| |''[[email.can]]''   |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/text/email.can|email.can]]|''[[bademail.msg]]''|Disallowed (source or destination) e-mail addresses (see also ''[[twitlist.cfg]]'')|
 |''[[file.can]]''   |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/text/file.can|file.can]]|''[[badfile.msg]]''|Disallowed filenames for upload| |''[[file.can]]''   |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/text/file.can|file.can]]|''[[badfile.msg]]''|Disallowed filenames for upload|
Line 67: Line 83:
   * [[:config:|Configuration]]   * [[:config:|Configuration]]
  
-{{tag>filter abuse}}+{{tag>filter abuse spam}}
  
config/filter_files.txt · Last modified: 2023/12/18 19:51 by digital man
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0