[SPIP] v3.0.22-->v3.0.24
[lhc/web/www.git] / www / ecrire / public / aiguiller.php
index ed084a4..d34c686 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2012                                                *
+ *  Copyright (c) 2001-2016                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -12,8 +12,9 @@
 
 if (!defined('_ECRIRE_INC_VERSION')) return;
 
-function securiser_redirect_action($redirect){
-       if (tester_url_absolue($redirect) AND !defined('_AUTORISER_ACTION_ABS_REDIRECT')){
+function securiser_redirect_action($redirect) {
+       if ((tester_url_absolue($redirect) or preg_match(',^\w+:,',trim($redirect)))
+               and !defined('_AUTORISER_ACTION_ABS_REDIRECT')) {
                // si l'url est une url du site, on la laisse passer sans rien faire
                // c'est encore le plus simple
                $base = $GLOBALS['meta']['adresse_site']."/";
@@ -129,7 +130,7 @@ function traiter_appels_inclusions_ajax(){
                        http_status(403);
                        $texte = _L('signature ajax bloc incorrecte');
                }
-               ajax_retour($texte);
+               ajax_retour($texte, false);
                return true; // on a fini le hit
        }
        return false;