Re: Accès restreint : protection des docu ments HS

nicod_ <[email protected]>
Newsgroups gmane.comp.web.spip.devel
Message-ID <[email protected]>
Le 06/05/2020 à 20:21, nicod_ a écrit :
> En 3.2 ça crée un htaccess dans IMG :
> 
> RewriteEngine On
> RewriteCond %{QUERY_STRING} ^(\d+/[\da-f]+)$
> RewriteRule ^\w+/.*$     ../spip.php?action=api_docrestreint&arg=%1/$0 
> [skip=100]
> RewriteRule ^\w+/.*$     ../spip.php?action=api_docrestreint&arg=0/0/$0 
> [skip=100]
> 
> Avec ces règles, un appel à /IMG/pdf/patate.pdf est servi directement 
> par Apache (la redirection ne s'applique pas).

Calomnie !

Avec ces règles, ça passe bien par l'API aussi en chopant la deuxième 
RewriteRule, ce qui donne un id_document à 0 dans l'action.

-- 
nicod_
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.