From 00bd4ce40d09aa59ce6ce7657feefb094c95e7a4 Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Sun, 25 Jun 2006 17:43:06 +0000 Subject: [PATCH] =?UTF-8?q?Qq=20transformations=20de=20url..code=20-->=20r?= =?UTF-8?q?awurl..code=20qui=20avait=20=C3=A9chapp=C3=A9=20=C3=A0=20[5996]?= =?UTF-8?q?.=20C'est=20ncore=20plus=20n=C3=A9cessaire=20d'etre=20syst?= =?UTF-8?q?=C3=A9matique=20l=C3=A0-dessus=20depuis=20que=20mod=5Fsecurity?= =?UTF-8?q?=20se=20r=C3=A9pand=20pour=20=C3=A0=20terme=20r=C3=A9soudre=20l?= =?UTF-8?q?e=20pb=20du=20ticket=20#413.=20A=20suivre.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/action/iconifier.php | 4 ++-- ecrire/balise/formulaire_admin.php | 2 +- ecrire/balise/login_public.php | 2 +- ecrire/balise/url_logout.php | 2 +- ecrire/exec/breves_voir.php | 2 +- ecrire/exec/sites.php | 2 +- ecrire/inc/distant.php | 4 ++-- ecrire/inc/statistiques.php | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ecrire/action/iconifier.php b/ecrire/action/iconifier.php index a29f7a21ee..c87afd4b95 100644 --- a/ecrire/action/iconifier.php +++ b/ecrire/action/iconifier.php @@ -20,7 +20,7 @@ function action_iconifier_dist() include_spip('inc/minipres'); minipres(_T('info_acces_interdit')); } - $arg = urldecode($arg); + $arg = rawurldecode($arg); if (!preg_match(',^unlink\s,',$arg)) action_spip_image_ajouter_dist(); else action_spip_image_effacer_dist(); @@ -29,7 +29,7 @@ function action_iconifier_dist() function action_spip_image_effacer_dist() { global $arg; - $arg = preg_replace(',^unlink\s*,','',urldecode($arg)); + $arg = preg_replace(',^unlink\s*,','',rawurldecode($arg)); if (!strstr($arg, "..")) @unlink(_DIR_LOGOS . $arg); } diff --git a/ecrire/balise/formulaire_admin.php b/ecrire/balise/formulaire_admin.php index 0805cd4c9d..84681acef6 100644 --- a/ecrire/balise/formulaire_admin.php +++ b/ecrire/balise/formulaire_admin.php @@ -108,7 +108,7 @@ function balise_FORMULAIRE_ADMIN_dyn($float='', $debug='') { (parametre_url(self(), 'var_mode', 'debug', '&') .'&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri=' - . urlencode("http://" . $_SERVER['HTTP_HOST'] . nettoyer_uri()))); + . rawurlencode("http://" . $_SERVER['HTTP_HOST'] . nettoyer_uri()))); // hack - ne pas avoir la rubrique si un autre bouton est deja present if ($id_article OR $id_breve) unset ($id_rubrique); diff --git a/ecrire/balise/login_public.php b/ecrire/balise/login_public.php index 3169b9d91e..615ad70c65 100644 --- a/ecrire/balise/login_public.php +++ b/ecrire/balise/login_public.php @@ -47,7 +47,7 @@ function login_explicite($login, $cible) { $cible = parametre_url($cible, 'var_login', '', '&'); } else { if (ereg("[?&]url=([^&]*)", $action, $m)) - $cible = urldecode($m[1]); + $cible = rawurldecode($m[1]); else $cible = _DIR_RESTREINT ; } diff --git a/ecrire/balise/url_logout.php b/ecrire/balise/url_logout.php index 85a2ffbd97..1b6e5f8e9d 100644 --- a/ecrire/balise/url_logout.php +++ b/ecrire/balise/url_logout.php @@ -28,7 +28,7 @@ function balise_URL_LOGOUT_dyn($cible) { $cible = self(); return generer_url_public('spip_cookie', - "logout_public=".urlencode($login)."&url=" . urlencode($cible) + "logout_public=".rawurlencode($login)."&url=" . rawurlencode($cible) ); } ?> diff --git a/ecrire/exec/breves_voir.php b/ecrire/exec/breves_voir.php index f9b37a5bef..161f4a247c 100644 --- a/ecrire/exec/breves_voir.php +++ b/ecrire/exec/breves_voir.php @@ -220,7 +220,7 @@ fin_cadre_relief(); echo "<BR><BR>"; echo "\n<div align='center'>"; - icone(_T('icone_poster_message'), generer_url_ecrire("forum_envoi", "statut=prive&id_breve=$id_breve&titre_message=".rawurlencode($titre) . "&adresse_retour=".urlencode( generer_url_ecrire("breves_voir", "id_breve=$id_breve"))), + icone(_T('icone_poster_message'), generer_url_ecrire("forum_envoi", "statut=prive&id_breve=$id_breve&titre_message=".rawurlencode($titre) . "&adresse_retour=".rawurlencode( generer_url_ecrire("breves_voir", "id_breve=$id_breve"))), "forum-interne-24.gif", "creer.gif"); echo "</div>"; diff --git a/ecrire/exec/sites.php b/ecrire/exec/sites.php index 194ad97074..19253d04bd 100644 --- a/ecrire/exec/sites.php +++ b/ecrire/exec/sites.php @@ -531,7 +531,7 @@ echo "<br><br>\n"; $forum_retour = generer_url_ecrire("sites","id_syndic=$id_syndic", '&'); echo "<div align='center'>"; - icone (_T('icone_poster_message'), generer_url_ecrire('forum_envoi',"id_syndic=$id_syndic&statut=prive&adresse_retour=".urlencode($forum_retour)."&titre_message=$nom_site"), "forum-interne-24.gif", "creer.gif"); + icone (_T('icone_poster_message'), generer_url_ecrire('forum_envoi',"id_syndic=$id_syndic&statut=prive&adresse_retour=".rawurlencode($forum_retour)."&titre_message=$nom_site"), "forum-interne-24.gif", "creer.gif"); echo "</div>"; echo "<p align='left'>\n"; diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php index fc13360141..f400ca91a5 100644 --- a/ecrire/inc/distant.php +++ b/ecrire/inc/distant.php @@ -96,10 +96,10 @@ function prepare_donnees_post($donnees, $boundary = '') { foreach ($donnees as $cle => $valeur) { if (is_array($valeur)) { foreach ($valeur as $val2) { - $chaine[] = rawurlencode($cle).'='.urlencode($val2); + $chaine[] = rawurlencode($cle).'='.rawurlencode($val2); } } else { - $chaine[] = rawurlencode($cle).'='.urlencode($valeur); + $chaine[] = rawurlencode($cle).'='.rawurlencode($valeur); } } $chaine = implode('&', $chaine); diff --git a/ecrire/inc/statistiques.php b/ecrire/inc/statistiques.php index ef28c98984..e09c6912a5 100644 --- a/ecrire/inc/statistiques.php +++ b/ecrire/inc/statistiques.php @@ -133,7 +133,7 @@ function stats_show_keywords($kw_referer, $kw_referer_host) { // supprimer l'eventuelle entite finale mal coupee $keywords = preg_replace('/&#?[a-z0-9]*$/', '', $keywords); } - $buffer["keywords"] = trim(entites_html(urldecode(stripslashes($keywords)))); + $buffer["keywords"] = trim(entites_html(rawurldecode(stripslashes($keywords)))); } return $buffer; @@ -177,7 +177,7 @@ function aff_referers ($result, $limit, $plus) { } if ($tmp) - $lesreferers[$numero][] = "<a href='".quote_amp($referer)."'>".quote_amp(urldecode($tmp))."</a>" . (($visites > 1)?" ($visites)":""); + $lesreferers[$numero][] = "<a href='".quote_amp($referer)."'>".quote_amp(rawurldecode($tmp))."</a>" . (($visites > 1)?" ($visites)":""); else $lesliensracine[$numero] += $visites; $lesdomaines[$numero] = $buff["hostname"]; -- GitLab