first commit

This commit is contained in:
/usr/bin/nano committed 2017-04-15 01:34:36 +03:00
commit c715e2a604
5325 files changed
+329700

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
version=pmwiki-2.2.51 ordered=1 urlencoded=1
author=Petko
charset=UTF-8
csum=update MoinMoin url
ctime=1159592216
name=PmWiki.Blocklist
rev=66
targets=Category.Spam,PmWiki.Security,PmWiki.Passwords,PmWiki.PasswordsAdmin,SiteAdmin.Blocklist,PmWiki.PageHistory,PmWiki.WikiAdministrator,Cookbook.SharedPages,PmWiki.PageVariables
text=(:Summary:Blocking IP addresses, phrases, and expressions to counteract spam and vandalism.:)%0a(:Audience: administrators (basic) :)%0a%0aThe block list is one of a number of [[security]] measures that can be taken to protect your wiki from [[!spam]] and other unwelcome postings.%0a%0aUnfortunately, the open-editability of many wiki systems often makes them attractive targets for "link spam" or "wikispam", in which links are added to pages in an effort to increase search engine rankings or drive traffic to other sites. Also, many link spammers have developed automated systems to locate sites that accept visitor input and attempt to flood the site with unwanted links.%0aAlso, and harder to deal with, is just plain [[PmWiki/Security#wikivandalism|wiki vandalism]] where nonsense changes are made, often replacing entire pages.%0a%0aBy far the best countermeasure against wikispam is to restrict editing through the use of passwords (see [[Passwords]] and [[Passwords Admin]]). Experience has shown that passwords can be effective even if the password is widely known, and even if the password is publicly available on the site itself. However, there are many cases where passwording may be an impediment, so these will generally want to use some form of blocklist.%0a%0a!! Blocklist basics%0a%0aA ''blocklist'' is a list of IP addresses, phrases, and expressions which are prevented from being added into pages on the website. PmWiki is distributed with a built-in blocklisting capability; blocklists can be enabled by adding the following line to ''local/config.php'':%0a%0a-> $EnableBlocklist = 1;%0a%0aThis tells PmWiki to scan the [[SiteAdmin.Blocklist]] page and the "SiteAdmin.Blocklist-Farm" page (and possibly other pages -- see below) looking for phrases and IP addresses to be excluded from posting to the site.%0a%0a!!! Blocking by word or phrase%0aThe simplest form of block is simply a line containing "[@block:@]" followed by a word or phrase to be excluded from postings. For example, a line like %0a%0a-> [@block:spam.com @]%0a%0ain SiteAdmin.Blocklist will block any posts containing the string "spam.com" (case-insensitive) anywhere in the post.%0a%0a[[#blockbyipaddress]]%0a!!! Blocking by IP address%0aSometimes we wish to restrict posts coming from particular addresses or address ranges that are known as sources of wikispam. If a blocklist page contains IP addresses of the form "a.b.c.d" or "a.b.c.*", then any posts coming from that address or range will be blocked. %0a%0a-> %25note%25 To find an author's IP address, try hovering the mouse over the author name in the [[page history]] for a page.%0a%0a!!! Blocking by regular expression or pattern%0aBlocking on simple words can sometimes pose difficulties; for example, a simple "[@block:cial@]" entry will also block the word "specialist". For these cases it's often helpful to use a regular expression, as in:%0a%0a->[@block:/\bcial\b/@]%0a%0aThis says to block "cial" only if it doesn't occur in the middle of a larger word. The leading slash (/) after "block:" tells PmWiki to use a regular expression match instead of a simple string match. (Blocklist uses PCRE or "Perl Compatible Regular Expressions"; see http://php.net/manual/en/ref.pcre.php for more information.)%0a%0a!!!! Regular expression to block 'href'%0a%0aIf you want to block '@@href@@', you can use the following markup:%0a-> [@block:/[^\w\\]href\b/@]%0awhich blocks '@@href@@', but neither '@@\href@@' nor '@@toughref@@'.%0a%0aThe regular expression can be interpreted as follows: Match any character that is '''neither''' a word character%0a'''nor''' a '\', followed by @@href@@ which ends in a word boundary.%0a%0a!! Letting authors know why they've been blocked%0a%0aBy default, blocklist only tells an author that a particular edit has been blocked, but doesn't give a specific reason for the blocking (e.g., the offending phrase). Setting the following in a local customization file will also provide the reasons for the block:%0a%0a-> $EnableWhyBlocked = 1;%0a%0a%0a!! Managing multiple blocklists%0a%0aPmWiki allows blocklist entries to come from multiple pages by setting the $BlocklistPages variable. By default $BlocklistPages is set to "SiteAdmin.Blocklist", as well as any automatically downloaded blocklists as described below. PmWiki will use all entries in all the blocklists for filtering wikispam. Setting a value of $BlocklistPages changes the default:%0a%0a-> $BlocklistPages = array('Main.Blocklist', '{$Group}.Blocklist');%0a%0aThe order of blocklists really doesn't matter -- all of the blocklist%0apages ultimately get used, and the [@unblock:@] entries are processed %0aafter all of the blocklist pages have been loaded.%0a%0a[[#automaticblocklists]]%0a!! Automatically downloaded blocklists%0a%0aMaintaining blocklists is relatively easy to do, but can become tedious over time. Several groups have formed and maintain "shared blocklists", where a common blocklist is made available to all. PmWikiLine truncated
time=1370675693