From f95e8530855a074e83d1f6b3184d9671e0be48e4 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Thu, 7 Jul 2016 08:34:09 +0000
Subject: [PATCH] suite de 23103 : la casse qui peut tout casser

---
 ecrire/inc/utils.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index aaad7d7343..71a29e2920 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -429,7 +429,8 @@ function tester_url_absolue($url) {
 	$url = trim($url);
 	if (preg_match(";^([a-z]{3,7}:)?//;Uims", $url, $m)) {
 		if (isset($m[1])
-			and in_array(rtrim($m[1], ':'), array('file', 'php', 'zlib', 'glob', 'phar', 'ssh2', 'rar', 'ogg', 'expect'))
+			and $p = strtolower(rtrim($m[1], ':'))
+			and in_array($p, array('file', 'php', 'zlib', 'glob', 'phar', 'ssh2', 'rar', 'ogg', 'expect'))
 		  ) {
 			return false;
 		}
-- 
GitLab