Skip to content
Permalink
Browse files

Fixed fm_selected parameter exploit

  • Loading branch information...
winskie committed Jan 15, 2017
1 parent 261dbd5 commit 26841d9c81f27ad23b2f6e4bd5eaec7f2f58dfe0
Showing with 7 additions and 0 deletions.
  1. +7 −0 inc/files/files.ctrl.php
@@ -343,8 +343,15 @@
* @global Filelist
*/
$selected_Filelist = new Filelist( $fm_FileRoot, $ads_list_path );
// Prevent directory traversal using '..'
$re = '/\/?\.\.\/+/';
foreach( $fm_selected as $l_source_path )
{
if( preg_match( $re, $l_source_path ) )
{
debug_die( 'Invalid fm_selected parameter value' );
}
$selected_Filelist->add_by_subpath( urldecode($l_source_path), true );
}

0 comments on commit 26841d9

Please sign in to comment.
You can’t perform that action at this time.