accepter de charger une image sans avoir le hash

This commit is contained in:
Christophe 2020-12-03 17:34:00 +01:00
parent b7f2495289
commit acc8ed8ded

View file

@ -1,10 +1,19 @@
<?php
if (!defined('_ECRIRE_INC_VERSION')) return;
function action_charger_document_dist(){
function action_charger_document_dist($arg=null){
$securiser_action = charger_fonction('securiser_action', 'inc');
$arg = $securiser_action();
if (is_null($arg)) {
// DEMI sécurité : s'il y a un hash, on teste la sécurité
if (_request('hash')) {
$securiser_action = charger_fonction('securiser_action', 'inc');
$arg = $securiser_action();
}
// Sinon, on prend l'arg direct
else {
$arg = _request('arg');
}
}
include_spip('inc/autoriser');
if (! autoriser("charger","document")) {