You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@infra.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/06/06 19:03:20 UTC

[jira] [Reopened] (INFRA-6345) moinmoin view attachments always 403 for anon users on /solr (and probably /lucene-java

     [ https://issues.apache.org/jira/browse/INFRA-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man reopened INFRA-6345:
-----------------------------


Rainer: thanks for you help. but I think your fix only addresses part of the problem?  

(Apparently) when you attach an image to MoinMoin pages, it automatically creates scaled down versions that it uses for inline image links, and clicking on those lets you download the original image.

Your fix seems to have made the inline viewing of the scaled images work for anon users, but attempting to click the link to view the full image still fails.

the distinction seems to be that MoinMoin uses "do=get" in the URLs to view the images inline, and "do=view" to download the images (seems backwards to me, but that's what it is)...

<a class="attachment" href="/solr/SolrOnAmazonEC2?action=AttachFile&amp;do=view&amp;target=1-launch-instance.png" title="{{attachment:1-launch-instance.png|Launch Instance|width=600}}"><img alt="Launch Instance" class="attachment" src="/solr/SolrOnAmazonEC2?action=AttachFile&amp;do=get&amp;target=1-launch-instance.png" title="Launch Instance" width="600"></a>

At the moment, the "do=get" URLs work, but the "do=view" URLs do not...

$ curl -I 'https://wiki.apache.org/solr/SolrOnAmazonEC2?action=AttachFile&do=get&target=1-launch-instance.png'
HTTP/1.1 200 OK
Date: Thu, 06 Jun 2013 17:01:08 GMT
Server: Apache/2.4.4 (Unix) mod_wsgi/3.4 Python/2.7.3 OpenSSL/1.0.0g
Vary: Cookie,User-Agent
Expires: Wed, 06 Jun 2012 17:01:08 GMT
Content-Disposition: inline; filename="1-launch-instance.png"
Last-Modified: Wed, 22 May 2013 13:12:10 GMT
Content-Length: 155771
Content-Type: image/png

$ curl -I 'https://wiki.apache.org/solr/SolrOnAmazonEC2?action=AttachFile&do=view&target=1-launch-instance.png'
HTTP/1.1 403 Forbidden
Date: Thu, 06 Jun 2013 17:01:14 GMT
Server: Apache/2.4.4 (Unix) mod_wsgi/3.4 Python/2.7.3 OpenSSL/1.0.0g
Content-Type: text/html; charset=iso-8859-1


(Sorry for not mentioning this earlier, I didn't notice myself until someone else pointed it out after you resolved)
                
> moinmoin view attachments always 403 for anon users on /solr (and probably /lucene-java
> ---------------------------------------------------------------------------------------
>
>                 Key: INFRA-6345
>                 URL: https://issues.apache.org/jira/browse/INFRA-6345
>             Project: Infrastructure
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: MoinMoin
>            Reporter: Hoss Man
>            Assignee: Rainer Jung
>
> A while back, the /solr and /lucene-java wikis switched to using hte ContributorsGroup ACL model to cut down on spam.  Shortly after that, contributors noticed that the wiki attachment screens were working and started using that to upload screenshots to the wiki -- but recently we've come to realize that these attachments are only visible to users logged into the wiki.
> Based on the "OurWikiFarm" docs, I suspect that the fact that attachments can currently be uploaded at all is just a fluke of our ACL settings, and no one thought to explicitly request attachments be enabled when we locked down editing.  
> If i'm correct, please consider this a request to enable attachments on both of these MoinMoin wikis.
> If i'm wrong, and wiki attachments are enabled, then there is some weird bug happening here. 
> a concrete example for testing...
> https://wiki.apache.org/solr/SolrOnAmazonEC2
> ...that screen has a dozen or so screenshots, but they are only visible if you are logged into the wiki (regardless of wether you are in the Admin or Contributor groups).  If you are an anon user, the URLs for the images return 403 responses...
> <img class="attachment" width="600" title="Launch Instance" src="/solr/SolrOnAmazonEC2?action=AttachFile&do=get&target=1-launch-instance.png" alt="Launch Instance"></img>
> $ curl -I 'https://wiki.apache.org/solr/SolrOnAmazonEC2?action=AttachFile&do=get&target=1-launch-instance.png'
> HTTP/1.1 403 Forbidden
> Date: Tue, 04 Jun 2013 23:06:48 GMT
> Server: Apache/2.4.4 (Unix) mod_wsgi/3.4 Python/2.7.3 OpenSSL/1.0.0g
> Content-Type: text/html; charset=iso-8859-1

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira