version=pmwiki-2.2.74 ordered=1 urlencoded=1
author=Petko
charset=UTF-8
csum=pmcrypt
name=PmWiki.Security
rev=103
targets=Category.Security,PmWiki.Passwords,PmWiki.PasswordsAdmin,PmWiki.AuthUser,PmWiki.UrlApprovals,PmWiki.AnalyzeResults,PmWiki.SiteAnalyzer,PmWiki.Blocklist,PmWiki.Notify,PmWiki.SecurityVariables,Cookbook.Security,Cookbook.HtpasswdForm,Cookbook.SecureAttachments,Cookbook.WebServerSecurity,Cookbook.FarmSecurity,Cookbook.DeObMail,Cookbook.SpamFilters,Cookbook.AuditImages,Cookbook.PrivateGroups,Cookbook.OnlyOneLogin,Cookbook.RecipeCheck,Cookbook.SessionGuard,Cookbook.TrackChanges,PmWiki.ContactUs,PITS.PITS,Category.Spam,PmWiki.DeletingPages,PmWiki.AvailableActions,Cookbook.DeleteAction,Cookbook.Captchas,Cookbook.Captcha,Site.AuthForm,Cookbook.LimitWikiGroups,Cookbook.LimitNewPagesInWikiGroups,Cookbook.AuthDNS,Cookbook.PersistentLogin,PmWiki.Drafts,PmWiki.Uploads,PmWiki.UploadsAdmin
text=(:Summary: Resources for securing your PmWiki installation:)%0aAspects of PmWiki [[!security]] are found on the following pages:%0a%0aPages distributed in a PmWiki release:%0a* [[PmWiki/Passwords]] {PmWiki/Passwords$:Summary}%0a* [[PmWiki/Passwords Admin]] {PmWiki/PasswordsAdmin$:Summary}%0a* [[PmWiki/AuthUser]] {PmWiki/AuthUser$:Summary}%0a* [[PmWiki/Url Approvals]] {PmWiki/UrlApprovals$:Summary}%0a* [[(PmWiki:)Site Analyzer]] {PmWiki/SiteAnalyzer$:Summary}%0a* [[PmWiki/Blocklist]] {PmWiki/Blocklist$:Summary}%0a* [[PmWiki/Notify]] {PmWiki/Notify$:Summary}%0a* [[PmWiki/Security variables]] {PmWiki/SecurityVariables$:Summary}%0a%0a[[Cookbook(:/)]] pages%0a%0a* [[Cookbook:Security | Security recipes]] from the Cookbook%0a* [[Cookbook:HtpasswdForm]] Form based management of users and passwords using .htpasswd/.htgroup files%0a* [[Cookbook:Secure attachments]] Protecting uploaded attachments%0a* [[Cookbook:Web server security]] Making the server more secure with .htaccess%0a* [[Cookbook:Farm security]] Making Farm installations secure%0a* [[Cookbook:DeObMail]] Hide e-mail address%0a* [[Cookbook:Spam filters]] Automatic blocking of some spambots%0a* [[Cookbook:Audit images]] Check to see what images have been uploaded to your wiki.%0a* [[Cookbook:Private groups]] Create and secure private groups on a public wiki%0a* [[Cookbook:Only one login]] Only allow 1 login at the same time for a username%0a* [[Cookbook:Recipe check]] Check for new versions of recipes on pmwiki.org%0a* [[Cookbook:Session guard]] Protects against Session Theft%0a* [[Cookbook:TrackChanges]] Ways to more easily detect and verify all recent edits%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I report a possible security vulnerability of PmWiki?%0a%0aA: [[http://www.pmichaud.com|Pm]] wrote about this in [[http://pmichaud.com/pipermail/pmwiki-users/2006-September/031793.html | a post to pmwiki-users from September 2006]]. In a nutshell he differentiates two cases:%0a## The possible vulnerability isn't already known publicly: In this case please [[contact us]] by private mail.%0a## The possible vulnerability is already known publicly: In this case feel free to discuss the vulnerability in public (e.g. on [[http://www.pmichaud.com/mailman/listinfo/pmwiki-users | pmwiki-users]] or in the [[(PITS:)PITS]]).%0aSee [[http://pmichaud.com/pipermail/pmwiki-users/2006-September/031793.html | his post mentioned above]] for details and rationals.%0a%0aQ: What about the botnet security advisory at %25newwin%25[[http://isc.sans.org/diary.php?storyid=1672]]?%0a%0aA: Sites that are running with PHP's ''register_globals'' setting set to "On" and versions of PmWiki prior to 2.1.21 may be vulnerable to a botnet exploit that is taking advantage of a bug in PHP.  The vulnerability can be closed by turning ''register_globals'' off, upgrading to PmWiki 2.1.21 or later, or upgrading to PHP versions 4.4.3 or 5.1.4.  [[%3c%3c]]In addition, there is a test at [[PmWiki:SiteAnalyzer]] that can be used to determine if your site is vulnerable.%0a%0a[[#wikivandalism]]%0a!! Wiki Vandalism and [[!Spam]]%0a:Assumptions: you are using a [[PmWiki/Blocklist]] and [[PmWiki/Url approvals]].%0a: :You don't want to resort to [[PmWiki/password(s)]] protecting the entire wiki, that's not the point after all.%0a: :Ideally these protections will be invoked in @@config.php@@%0a%0a%0aQ: How do I stop pages being [[PmWiki/DeletingPages|deleted]], eg password protect a page from deletion?%0aA: Use Cookbook:DeleteAction and password protect the page deletion [[(available) action(s)]] by adding [@$DefaultPasswords['delete'] = '*';@] to @@config.php@@ or password protect the action with @@$HandleAuth['delete'] = 'edit';@@%0a->or @@$HandleAuth['delete'] = 'admin';@@ to require the edit or admin password respectively.%0a%0aQ: How do I stop pages being replaced with an empty (all spaces) page?%0aA: Add [@block: /^\s*$/@] to your [[PmWiki/blocklist]].%0a%0aQ: how do I stop pages being completely replaced by an inane comment such as ''excellent site'', ''great information'', where the content cannot be blocked?%0aA: Try using the newer [[PmWiki/Blocklist#automaticblocklists | automatic blocklists]] that pull information and IP addresses about known wiki defacers.%0a%0aA: (OR) Try using [[Cookbook:Captchas]] or [[Cookbook:Captcha]] (note these are different).%0a%0aA: (OR) Set an edit password, but make it publicly available on the [[{$SiteGroup}.AuthForm]] template.%0a%0aQ: How do I password protect the creation of new groups?%0aA: See [[Cookbook:Limit Wiki Groups]] {Cookbook.LimitWikiGroups$:Summary}%0a%0aQ: How do I password protect the creation of new pages?%0aA: See [[Cookbook:Limit new pages in Wiki Groups]] {Cookbook.LimitNewPagesInWikiGroups$:Summary}%0a%0aQ: How do I take a whitelist approach where users from known or trusted IP addresses can edit, and others require a password?%0aA: Put these lines to local/config.php:%0a[@%0a## Allow passwordless editing from own turf, pass for others.%0aif ($action=='edit'%0a && !preg_match("/^90\\.68\\./", $_SERVER['REMOTE_ADDR']) )    %0a { $DefaultPasswords['edit'] = pmcrypt('foobar'); }%0a@]%0aReplace 90.68. with the preferred network prefix and foobar with the default password for others.%0a%0aFor a single IP, you may use %0a[@%0aif($_SERVER['REMOTE_ADDR'] == '127.0.0.1') { # your IP address here%0a $_POST['authpw'] = 'xxx';                  # the admin password%0a}%0a@]%0a%0aPlease note the security issues : this means that you have your admin passwords in clear in config.php and someone with access to the filesystem can read them (for example a technician of your hosting provider) ; your IP address may change from time to time (unless you have a fixed IP contract with your ISP). When that happens, someone with your old IP address will be logged in automatically as admin on your wiki. It is extremely unlikely to become a problem, but you should know it is possible ; if you are behind a router, all other devices which pass through that router will have the same IP address for PmWiki - your wifi phone, your wife's netbook, a neighbour using your wifi connection, etc. All these people become admins of your wiki. Again, you should evaluate if this is a security risk ; In some cases, your ISP will route your traffic through the same proxy as other people. In such a case, thousands of people may have the same IP address.%0a%0aA: See also Cookbook:AuthDNS & Cookbook:PersistentLogin%0a%0aQ: How do I password protect [[PmWiki/AvailableActions|page actions]]?%0aA: See [[PmWiki/Passwords]] for setting in config.php  %0a-> @@$HandleAuth['[==]''pageactionname''[==]'] = 'pageactionname'; # along with :@@%0a-> @@$DefaultPasswords['[==]''pageactionname''[==]'] = pmcrypt('secret&nbsp;phrase');@@%0aA: or %0a-> @@$HandleAuth['[==]''pageactionname''[==]'] = 'anotherpageactionname';@@%0a%0aQ: How do I moderate all postings?%0aA: Enable [[PmWiki.Drafts]]%0a* Set $EnableDrafts, this relabels the "Save" button to "Publish" and a "Save draft" button appears. %0a* Set $EnablePublishAttr, this adds a new "publish" authorization level to distinguish editing from publishing.%0a%0aQ: How do I make a read only wiki?%0aA: In config.php [[PmWiki/PasswordsAdmin | set]] an "edit" password.%0a%0aQ: How do I restrict access to [[PmWiki/Uploads|uploaded attachments]]?%0aA: See%0a* [[PmWiki/UploadsAdmin#direct_download|instructions]] for denying  public access to the uploads directory%0a* see [[Cookbook:Secure attachments]] {Cookbook.SecureAttachments$:Summary}%0a%0aQ: How do I hide the IP addresses in the "diff" pages?%0aA: If the user fills an author name, the IP address is not displayed. To require an author name, set in config.php such a line:%0a%0a  $EnablePostAuthorRequired = 1;%0a%0aA: The IP address can also be seen in a tooltip title when the mouse cursor is over the author name. To disable the tooltip, set in config.php:%0a[@%0a$DiffStartFmt = %0a  "%3cdiv class='diffbox'>%3cdiv class='difftime'>%3ca name='diff\$DiffGMT' href='#diff\$DiffGMT'>\$DiffTime%3c/a>%0a   \$[by] %3cspan class='diffauthor'>\$DiffAuthor%3c/span> - \$DiffChangeSum%3c/div>";%0a@]%0a%0aQ: How do I stop some Apache installations executing a file which has ".php", ".pl" or ".cgi" anywhere in the filename%0aA: Use $UploadBlacklist%0a%0aQ: How do I stop random people from viewing the ?action=source (wiki markup) of my pages?  I have [@(:if auth edit:)@] text that I don't want the world to see.%0aA: [@$HandleAuth['source'] = 'edit';@] or [@$HandleAuth['source'] = 'admin';@]
time=1430062844
