On 5/2/07, <b class="gmail_sendername">Tegan Dowling</b> &lt;<a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 5/2/07, Ciaran &lt;<a href="mailto:ciaranj@gmail.com">ciaranj@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; On 4/30/07, Tegan Dowling &lt;<a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>&gt; wrote:<br>&gt; &gt;<br>
&gt; &gt;&nbsp;&nbsp;Bump ... PM?&nbsp;&nbsp;Anyone?<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ---------- Forwarded message ----------<br>&gt; &gt; From: Tegan Dowling &lt; <a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>&gt;<br>&gt; &gt;&nbsp;&nbsp;Date: Apr 28, 2007 4:05 PM
<br>&gt; &gt; Subject: uploads security vs PmWikiDraw<br>&gt; &gt; To: PmWiki Users &lt;<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a> &gt;<br>&gt; &gt;<br>&gt; &gt; I typically secure uploads to my wikis by using the method, described on the page&nbsp;&nbsp;
<a href="http://www.pmwiki.org/wiki/Cookbook/SecureAttachments">http://www.pmwiki.org/wiki/Cookbook/SecureAttachments</a>, which uses an .htaccess file in the uploads/ directory, with the following two lines:<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order Deny,Allow
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deny from all<br>&gt; &gt;<br>&gt; &gt; and then the following in local/config.php:<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $EnableDirectDownload = 0;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; I find this conflicts with the use of the (wonderful!) PmWikiDraw recipe.&nbsp;&nbsp;
<a href="http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw">http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw</a>.<br>&gt; &gt;<br>&gt; &gt; When I create a drawing<br>&gt; &gt; (named &quot;drawingname&quot; on a page in the wikigroup&nbsp;&nbsp; 
<a href="http://www.myaddress.com/uploads/ExampleGroupname">http://www.myaddress.com/uploads/ExampleGroupname</a>),<br>&gt; &gt; the java drawing applet displays a warning:<br>&gt; &gt; Error:java.io.IOException:Server returned HTTP response code: 403 for URL:&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.myaddress.com/uploads/ExampleGroupname/drawingname.draw">http://www.myaddress.com/uploads/ExampleGroupname/drawingname.draw</a><br>&gt; &gt;<br>&gt; &gt; And although I can create the drawing, and it does save and upload successfully, it won&#39;t display the image -- I guess because the recipe doesn&#39;t use the display syntax ?action=download&amp;upname= 
file.ext ?<br>&gt; &gt;<br>&gt; &gt; If I change local/config.php: to<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$EnableDirectDownload = 1;<br>&gt; &gt;<br>&gt; &gt; and I remove the .htaccess file from the uploads/ directory, then the PmWikiDraw works ok.
<br>&gt; &gt;<br>&gt; &gt; SO is there some way that I can have both?&nbsp;&nbsp;Could I make $EnableDirectDownload = 1; conditional on the wikigroup I&#39;m working in, AND somehow get the .htaccess file to be ignored there as well?
<br>&gt; &gt;<br>&gt; &gt; Ideas?<br>&gt;<br>&gt; Eek! do you know if this directdownload option is newish, as I wasn&#39;t aware of it when I<br>&gt; wrote the pmwikidraw scripts originally.&nbsp;&nbsp;FWIW we&#39;re currently in the process of re-writing
<br>&gt; PmWikiDraw as a far more advanced AnyWikiDraw tool, with an intended PmWiki variant<br>&gt; so it has to an extent been forgotten about [we intend to support the original format at<br>&gt; least for initial loading of drawings!]
<br>&gt;&nbsp;&nbsp;- ciaran<br><br>Hi!&nbsp;&nbsp;The PmWikiDraw tool is so terrific, I would love to be able to<br>enable it on all my wikis!</blockquote><div><br>Well soon you should be able, to, plus with versioning, svg support, and much much more ;)
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The &quot;$EnableDirectDownload = 0;&quot; security option is not new, but it&#39;s
<br>not the default configuration, either (although it is for my wikis).</blockquote><div><br>I&#39;d not come across it before&nbsp; ! <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you look into how the option works, it seems to me that you may be<br>able to adjust your PmWikiDraw code so that it works in this<br>environment.&nbsp;&nbsp;On these sites, attachments are displayed with<br>&quot;<a href="http://address.com/Group/Page?action=download&amp;upname=file.ext">
http://address.com/Group/Page?action=download&amp;upname=file.ext</a>&quot; (as<br>opposed to other configurations that display<br>&quot;<a href="http://address.com/uploads/Group/file.ext">http://address.com/uploads/Group/file.ext
</a>&quot;</blockquote><div><br>Right, I&#39;ve enabled a work-around I think,&nbsp; please try the new version I&#39;ve put up on PmWiki.org for  you ! <br>Let me know how it goes :)<br><br>I also made a change to make it work in Java 6 runtimes, which was a little random, but sorted now :) 
<br>Take care<br>- Ciaran<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;ve just been hoping to find a work-around that would let me revert
<br>to the regular configuration on pages/groups where the PmWikiDraw is<br>either in use or enabled, and I&#39;m sure I could switch to a setting of<br>$EnableDirectDownload = 1; for such pages/groups, but I don&#39;t know of
<br>any way to get the wiki to disregard the .htaccess file in the uploads<br>directory when rendering attachments to those pages/groups.<br><br>Does anyone know of anything I could put in the .htaccess file itself,<br>that would get it ignored for certain pages or groups?
<br></blockquote></div><br><br clear="all"><br>-- <br>- Ciaran