<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>LiquidFoot &#187; Subversion</title>
	<atom:link href="http://www.liquidfoot.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 17 Apr 2010 16:36:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Subversion with mod_security</title>
		<link>http://www.liquidfoot.com/2007/03/06/subversion-with-mod_security/</link>
		<comments>http://www.liquidfoot.com/2007/03/06/subversion-with-mod_security/#comments</comments>
		<pubDate>Tue, 06 Mar 2007 23:35:02 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=196</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>I ran into a bit of an issue while setting up a new subversion server today. On that box we&#8217;re running <a href="http://www.modsecurity.org/">mod_security</a> on all vhosts to add another layer of security to our web apps. I got everything configured with the the security, but when I was testing, I kept getting 403 errors when I attempted to get the files in anything other than a web browser.</p>
<p>After scratching my head for a while, I looked at the Apache logs, and noticed that mod_rewrite was causing the issue with lines like this:</p>
<div class="code">[Tue Mar 06 13:46:46 2007] [error] [client xxx.xxx.xxx.xxx] mod_security: Access denied with code 403. Pattern match <span style="color: #0000ff;">&#8220;!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)&#8221;</span> at HEADER(<span style="color: #0000ff;">&#8220;Content-Type&#8221;</span>) [severity <span style="color: #0000ff;">"EMERGENCY"</span>] [hostname <span style="color: #0000ff;">"svn.example.com"</span>] [uri <span style="color: #0000ff;">"/test"</span>]</div>
<p>I stumbled on <a href="http://blog.charlvn.za.net/2006/09/subversion-modsecurity.html">Charl van Niekerk&#8217;s</a> entry on this. One of the comments suggested that the following is the bare minimum to run mod_security on a vhost running subversion:</p>
<div class="code">SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(PROPFIND|PROPPATCH)$&#8221;</span> allow<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(REPORT|OPTIONS)$&#8221;</span> allow<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(MKACTIVITY|CHECKOUT)$&#8221;</span> allow<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(PUT|DELETE|MERGE)$&#8221;</span> allow</div>
<p>This should be in the first directives in your mod_security call:</p>
<div class="code"><span style="color: #000080;">&lt;IfModule mod_security.c&gt;</span></p>
<p># Enable ModSecurity<br />
SecFilterEngine On</p>
<p># Allow SVN requests<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(PROPFIND|PROPPATCH)$&#8221;</span> allow<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(REPORT|OPTIONS)$&#8221;</span> allow<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(MKACTIVITY|CHECKOUT)$&#8221;</span> allow<br />
SecFilterSelective REQUEST_METHOD <span style="color: #0000ff;">&#8220;^(PUT|DELETE|MERGE)$&#8221;</span> allow</p>
<p>&#8230;<br />
# rest of your directives<br />
<span style="color: #000080;">&lt;/IfModule&gt;</span></div>
<p>If you run a Subversion repository and have run into this issue, these security filters should help!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2007/03/06/subversion-with-mod_security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
