<br><br><div><span class="gmail_quote">On 5/2/07, <b class="gmail_sendername">Tegan Dowling</b> &lt;<a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>&gt; wrote:</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; On 5/2/07, Tegan Dowling &lt;<a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; &gt; On 5/2/07, Ciaran &lt;
<a href="mailto:ciaranj@gmail.com">ciaranj@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; On 4/30/07, Tegan Dowling &lt;<a href="mailto:tmdowling@gmail.com">tmdowling@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;Bump ... PM?&nbsp;&nbsp;Anyone?<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; ---------- Forwarded message ----------<br>&gt; &gt; &gt; &gt; From: Tegan Dowling &lt; <a href="mailto:tmdowling@gmail.com">
tmdowling@gmail.com</a>&gt;<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;Date: Apr 28, 2007 4:05 PM<br>&gt; &gt; &gt; &gt; Subject: uploads security vs PmWikiDraw<br>&gt; &gt; &gt; &gt; To: PmWiki Users &lt;<a href="mailto:pmwiki-users@pmichaud.com">
pmwiki-users@pmichaud.com</a> &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; I typically secure uploads to my wikis by using the method, described<br>&gt; on the page<br>&gt; <a href="http://www.pmwiki.org/wiki/Cookbook/SecureAttachments">
http://www.pmwiki.org/wiki/Cookbook/SecureAttachments</a>,<br>&gt; which uses an .htaccess file in the uploads/ directory, with the following<br>&gt; two lines:<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order Deny,Allow<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Deny from all
<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; and then the following in local/config.php:<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $EnableDirectDownload = 0;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; I find this conflicts with the use of the (wonderful!) PmWikiDraw
<br>&gt; recipe.&nbsp;&nbsp; <a href="http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw">http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw</a>.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; When I create a drawing<br>&gt; &gt; &gt; &gt; (named &quot;drawingname&quot; on a page in the wikigroup
<br>&gt; <a href="http://www.myaddress.com/uploads/ExampleGroupname">http://www.myaddress.com/uploads/ExampleGroupname</a>),<br>&gt; &gt; &gt; &gt; the java drawing applet displays a warning:<br>&gt; &gt; &gt; &gt; Error:
java.io.IOException:Server returned HTTP response code: 403 for<br>&gt; URL:<br>&gt; <a href="http://www.myaddress.com/uploads/ExampleGroupname/drawingname.draw">http://www.myaddress.com/uploads/ExampleGroupname/drawingname.draw
</a><br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; And although I can create the drawing, and it does save and upload<br>&gt; successfully, it won&#39;t display the image -- I guess because the recipe<br>&gt; doesn&#39;t use the display syntax ?action=download&amp;upname= 
file.ext ?<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; If I change local/config.php: to<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$EnableDirectDownload = 1;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; and I remove the .htaccess file from the uploads/ directory, then the
<br>&gt; PmWikiDraw works ok.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; SO is there some way that I can have both?&nbsp;&nbsp;Could I make<br>&gt; $EnableDirectDownload = 1; conditional on the wikigroup I&#39;m working in, AND<br>
&gt; somehow get the .htaccess file to be ignored there as well?<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Ideas?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Eek! do you know if this directdownload option is newish, as I wasn&#39;t
<br>&gt; aware of it when I<br>&gt; &gt; &gt; wrote the pmwikidraw scripts originally.&nbsp;&nbsp;FWIW we&#39;re currently in the<br>&gt; process of re-writing<br>&gt; &gt; &gt; PmWikiDraw as a far more advanced AnyWikiDraw tool, with an intended
<br>&gt; PmWiki variant<br>&gt; &gt; &gt; so it has to an extent been forgotten about [we intend to support the<br>&gt; original format at<br>&gt; &gt; &gt; least for initial loading of drawings!]<br>&gt; &gt; &gt;&nbsp;&nbsp;- ciaran
<br>&gt; &gt;<br>&gt; &gt; Hi!&nbsp;&nbsp;The PmWikiDraw tool is so terrific, I would love to be able to<br>&gt; &gt; enable it on all my wikis!<br>&gt;<br>&gt; Well soon you should be able, to, plus with versioning, svg support, and
<br>&gt; much much more ;)<br>&gt;<br>&gt; &gt; The &quot;$EnableDirectDownload = 0;&quot; security option is not new, but it&#39;s<br>&gt; &gt; not the default configuration, either (although it is for my wikis).<br>&gt;
<br>&gt; I&#39;d not come across it before&nbsp;&nbsp;!<br>&gt;<br>&gt; &gt; If you look into how the option works, it seems to me that you may be<br>&gt; &gt; able to adjust your PmWikiDraw code so that it works in this<br>&gt; &gt; environment.&nbsp;&nbsp;On these sites, attachments are displayed with
<br>&gt; &gt; &quot;<br>&gt; <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;<br>&gt; (as<br>&gt; &gt; opposed to other configurations that display
<br>&gt; &gt; &quot;<a href="http://address.com/uploads/Group/file.ext">http://address.com/uploads/Group/file.ext</a> &quot;<br>&gt;<br>&gt; Right, I&#39;ve enabled a work-around I think,&nbsp;&nbsp;please try the new version I&#39;ve
<br>&gt; put up on PmWiki.org for you !<br>&gt; Let me know how it goes :)<br>&gt; --<br>&gt; - Ciaran<br><br>Hi, Ciaran:&nbsp;&nbsp;Success! (mostly)<br><br>I restored the downloads protection as I normally have it, and now I<br>can create and edit PmWikiDraw files.&nbsp;&nbsp;The only thing that&#39;s still odd
<br>is that the java app does display an error message across the bottom<br>of its window when creating a new file.&nbsp;&nbsp;The error doesn&#39;t prevent<br>file creation, so it&#39;s not critical, but it is odd:<br><br>When I create a drawing (named &quot;drawingname&quot; on a page in the
<br>wikigroup <a href="http://www.myaddress.com/uploads/ExampleGroupname">http://www.myaddress.com/uploads/ExampleGroupname</a>),<br>the java drawing applet displays a warning:<br>Error:java.io.FileNotFoundException:</blockquote>
<div>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><a href="http://www.myaddress.com?n=ExampleGroupname.ExamplePagename&amp;action=download&amp;upname=drawingname.draw">
http://www.myaddress.com?n=ExampleGroupname.ExamplePagename&amp;action=download&amp;upname=drawingname.draw</a></blockquote><div><br>Believe it or not, this is expected behaviour :)&nbsp;&nbsp; When the Applet first loads, it tries to download the drawing file , for rendering.&nbsp; The first time you &quot;create a drawing&quot; there isn&#39;t one there until the applet&#39;s first save has completed :) 
<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;">Thanks so much for this tool, and for your terrific responsiveness!</blockquote>
<div><br>No worries, like I said keep an eye out for AnyWikiDraw&nbsp; it should be coming to a wiki near you fairly soonish &lt;g&gt;<br>&nbsp;-Ciaran<br>&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;">
Tegan<br></blockquote></div><br><br clear="all"><br>-- <br>- Ciaran