芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/public_html/panel/fckeditor/editor/filemanager/connectors/php/util.php
$val ) { $lcaseHtmlExtensions[$key] = strtolower( $val ) ; } return in_array( $ext, $lcaseHtmlExtensions ) ; } /** * Detect HTML in the first KB to prevent against potential security issue with * IE/Safari/Opera file type auto detection bug. * Returns true if file contain insecure HTML code at the beginning. * * @param string $filePath absolute path to file * @return boolean */ function DetectHtml( $filePath ) { $fp = @fopen( $filePath, 'rb' ) ; //open_basedir restriction, see #1906 if ( $fp === false || !flock( $fp, LOCK_SH ) ) { return -1 ; } $chunk = fread( $fp, 1024 ) ; flock( $fp, LOCK_UN ) ; fclose( $fp ) ; $chunk = strtolower( $chunk ) ; if (!$chunk) { return false ; } $chunk = trim( $chunk ) ; if ( preg_match( "/= 4.0.7 if ( function_exists( 'version_compare' ) ) { $sCurrentVersion = phpversion(); if ( version_compare( $sCurrentVersion, "4.2.0" ) >= 0 ) { $imageCheckExtensions[] = "tiff"; $imageCheckExtensions[] = "tif"; } if ( version_compare( $sCurrentVersion, "4.3.0" ) >= 0 ) { $imageCheckExtensions[] = "swc"; } if ( version_compare( $sCurrentVersion, "4.3.2" ) >= 0 ) { $imageCheckExtensions[] = "jpc"; $imageCheckExtensions[] = "jp2"; $imageCheckExtensions[] = "jpx"; $imageCheckExtensions[] = "jb2"; $imageCheckExtensions[] = "xbm"; $imageCheckExtensions[] = "wbmp"; } } if ( !in_array( $extension, $imageCheckExtensions ) ) { return true; } if ( @getimagesize( $filePath ) === false ) { return false ; } return true; } ?>