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