cvs: livedocs / handlers.php

From: Date: Tue, 27 Apr 2004 15:12:28 +0000
Subject: cvs: livedocs / handlers.php
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969360289@lists.php.net to get a copy of this message
nlopess Tue Apr 27 11:12:28 2004 EDT Modified files: /livedocs handlers.php Log: fixing a half sql injection bug http://cvs.php.net/diff.php/livedocs/handlers.php?r1=1.3&r2=1.4&ty=u Index: livedocs/handlers.php diff -u livedocs/handlers.php:1.3 livedocs/handlers.php:1.4 --- livedocs/handlers.php:1.3 Tue Apr 27 10:07:11 2004 +++ livedocs/handlers.php Tue Apr 27 11:12:28 2004 @@ -18,7 +18,7 @@ // | Special Handlers for $aliases | // +----------------------------------------------------------------------+ // -// $Id: handlers.php,v 1.3 2004/04/27 14:07:11 nlopess Exp $ +// $Id: handlers.php,v 1.4 2004/04/27 15:12:28 nlopess Exp $ /*********************************** @@ -64,10 +64,10 @@ echo "</div><hr />\n"; /* Sanitize index letter */ - if (!isset($_GET['i'])) { - $idxl = 'a'; + if (preg_match('/^[A-Z]{0,1}$/i', $_GET['i'])) { + $idxl = $_GET['i']; } else { - $idxl = substr($_GET['i'], 0, 1); + $idxl = 'a'; } /* Create function call back for STARTS_WITH and TO_LOWER */

« previous php.doc (#969360289) next »