backport
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Thu, 30 Dec 2004 15:06:37 +0000 (15:06 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:07 +0000 (23:27 +0200)
Patches applied:

 * opensource@polytechnique.org--2005/platal--release--0.9.3--patch-14
   fix xface for once

git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-201

htdocs/banana/xface.php

index e83e9b2..98078c3 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
-$face = base64_decode(Env::get('face'));
-$face = ereg_replace("'", "'\\''", $face);
+$face = base64_decode($_REQUEST['face']);
+$face = escapeshellarg($face);
 
 header("Content-Type: image/png");
-passthru("echo '$face'|uncompface -X |convert xbm:- png:-");
+passthru("echo $face|uncompface -X |convert xbm:- png:-");
+
 ?>