- Timestamp:
- 2007-06-26 00:10:59 (17 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/filemanager/browser/default/connectors/php/io.php
r357 r391 46 46 { 47 47 if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) 48 { 48 { 49 49 SendErrorNode( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ; 50 50 CreateXmlFooter() ; … … 113 113 $slash = ( strpos( $sRealPath, '/' ) === false ) ? '\\' : '/' ; 114 114 $sSelfPath = str_replace( '/', $slash, $sSelfPath ) ; 115 115 116 116 $position = strpos( $sRealPath, $sSelfPath ) ; 117 117 … … 123 123 return substr( $sRealPath, 0, $position ) ; 124 124 } 125 126 function CheckFileName( $fileName, $resourceType ) 127 { 128 global $Config ; 129 130 // SA25719 131 if ( strpos( strtolower( $fileName ), '::$data' ) != false ) 132 return false ; 133 134 // Get the extension. 135 $sExtension = substr( $fileName, ( strrpos($fileName, '.') + 1 ) ) ; 136 $sExtension = strtolower( $sExtension ) ; 137 138 $arDenied = $Config['DeniedExtensions'][$resourceType] ; 139 140 if ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) 141 return false ; 142 143 $arAllowed = $Config['AllowedExtensions'][$resourceType] ; 144 145 if ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) 146 return false ; 147 148 return true ; 149 } 125 150 ?>