Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* IP.Board v3.2.3
* Virus scanner
* Last Updated: $Date: 2010-09-15 17:14:23 -0400 (Wed, 15 Sep 2010) $
* Last Updated: $Date: 2011-07-06 16:54:25 -0400 (Wed, 06 Jul 2011) $
* </pre>
*
* @author $Author: terabyte $
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @license This is NULLED!
* @package IP.Board
* @link http://www.invisionpower.com
* @link http://hatynka.in
* @since Tue. 17th August 2004
* @version $Rev: 6881 $
* @version $Rev: 9172 $
*
*/
@@ -66,9 +66,12 @@ class virusChecker
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
@@ -76,7 +79,7 @@ class virusChecker
*
* @access public
* @param object ipsRegistry reference
* @return void
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
@@ -104,7 +107,7 @@ class virusChecker
// Known names
//-----------------------------------------
$KNOWN_NAMES = array();
require( IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_known_names.php' );
require( IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_known_names.php' );/*noLibHook*/
$this->known_names = $KNOWN_NAMES;
}
@@ -115,7 +118,7 @@ class virusChecker
* $this->bad_files array
*
* @access public
* @return void
* @return @e void
*/
public function runScan()
{
@@ -131,7 +134,7 @@ class virusChecker
// Get libs
//-----------------------------------------
$WRITEABLE_DIRS = array();
require( IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_writeable_dirs.php' );
require( IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_writeable_dirs.php' );/*noLibHook*/
//-----------------------------------------
// Sort out directory separator
@@ -295,13 +298,13 @@ class virusChecker
// Check emoticons
//-----------------------------------------
$this->deepScan( $root_dir . $this->dir_split . 'public/style_emoticons', 'all' );
$this->deepScan( $root_dir . $this->dir_split . PUBLIC_DIRECTORY . '/style_emoticons', 'all' );
//-----------------------------------------
// Check image directories
//-----------------------------------------
$this->deepScan( $root_dir . $this->dir_split . 'public/style_images', '(php|cgi|pl|perl|php3|php4|php5|php6|phtml|shtml)' );
$this->deepScan( $root_dir . $this->dir_split . PUBLIC_DIRECTORY . '/style_images', '(php|cgi|pl|perl|php3|php4|php5|php6|phtml|shtml)' );
//-----------------------------------------
// Check upload directories
@@ -324,12 +327,12 @@ class virusChecker
* Modified in the 30 days + 1
* In non PHP folder + 3
*
* @access private
* @access protected
* @param string Full file path and name
* @param array stat info
* @return int Score (0 - 10 )
*/
private function _scoreFile( $file_name, $stat=array() )
protected function _scoreFile( $file_name, $stat=array() )
{
//-----------------------------------------
// INIT
@@ -410,7 +413,7 @@ class virusChecker
// Non PHP folder...
//-----------------------------------------
if ( preg_match( "#(?:style_images|style_emoticons|uploads|style_avatars|default|1|skin_acp|html|skin)/#i", $file_name ) )
if ( preg_match( "#(?:style_images|style_emoticons|uploads|default|1|skin_acp|html|skin)/#i", $file_name ) )
{
$SCORE += 3;
}
@@ -431,12 +434,11 @@ class virusChecker
if( strpos( $_name, '.php' ) )
{
include_once( $file->getPathname() );
$classToLoad = IPSLib::loadLibrary( $file->getPathname(), 'virusScannerPlugin_' . str_replace( '.php', '', $_name ) );
if( class_exists( 'virusScannerPlugin_' . str_replace( '.php', '', $_name ) ) )
if( class_exists( $classToLoad ) )
{
$class = 'virusScannerPlugin_' . str_replace( '.php', '', $_name );
$plugin = new $class( $this->registry );
$plugin = new $classToLoad( $this->registry );
if( method_exists( $plugin, 'run' ) )
{