Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

@@ -1,17 +1,19 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Control Panel Functions
* Last Updated: $Date: 2009-10-21 20:34:34 -0400 (Wed, 21 Oct 2009) $
* Last Updated: $Date: 2010-09-15 19:24:12 -0400 (Wed, 15 Sep 2010) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @link http://www.invisionpower.com
* @since Tue. 17th August 2004
* @version $Rev: 5256 $
* @version $Rev: 6882 $
*
*/
class adminFunctions
@@ -68,7 +70,7 @@ class adminFunctions
// Message in a bottle?
//------------------------------------------
if( $this->request['messageinabottleacp'] )
if( isset($this->request['messageinabottleacp']) AND $this->request['messageinabottleacp'] )
{
$this->request['messageinabottleacp'] = IPSText::getTextClass('bbcode')->xssHtmlClean( IPSText::UNhtmlspecialchars( urldecode( $this->request['messageinabottleacp'] ) ) );
$this->registry->output->global_message = $this->request['messageinabottleacp'];
@@ -125,7 +127,7 @@ class adminFunctions
$cookie = ( $_test['sys_cookie'] ) ? unserialize( $_test['sys_cookie'] ) : array();
return $cookie[ $key ];
return ( isset( $cookie[ $key ] ) ) ? $cookie[ $key ] : null;
}
/**
@@ -171,15 +173,13 @@ class adminFunctions
*
* @access public
* @return string MD5 secure hash
* @deprecated Don't think we are using this anywhere now
* @see getSecurityKey()
**/
public function generateSecureHash()
{
/* Generate Secure Hash */
$ip_octets = explode( ".", $this->ip_address );
$crypt_salt = md5( $this->settings['sql_user'].$this->settings['sql_database'].$this->settings['sql_pass'] );
$key = md5( crypt( $this->memberData['member_joined'] . "(&)" . $ip_octets[0] . '(&)' . $ip_octets[1] . '(&)' . $this->memberData['member_login_key'], $crypt_salt ) );
$ip_octets = explode( ".", $this->member->ip_address );
$key = md5( ( isset($this->memberData['joined']) ? $this->memberData['joined'] : 0 ) . "(&)" . $ip_octets[0] . '(&)' . $ip_octets[1] . '(&)' . ( isset($this->memberData['member_login_key']) ? $this->memberData['member_login_key'] : 0 ) );
return $key;
}
@@ -194,7 +194,7 @@ class adminFunctions
**/
public function getSecurityKey()
{
return md5( $this->memberData['email'] . '^' . $this->memberData['joined'] . '^' . $this->memberData['ip_address'] . md5( $this->settings['sql_pass'] ) );
return md5( ( isset($this->memberData['email']) ? $this->memberData['email'] : 0 ) . '^' . ( isset($this->memberData['joined']) ? $this->memberData['joined'] : 0 ) . '^' . $this->member->ip_address . md5( $this->settings['sql_pass'] ) );
}
/**
@@ -218,7 +218,7 @@ class adminFunctions
}
else
{
$this->registry->output->showError( $this->lang->words['func_security_mismatch'], 2100 );
$this->registry->output->showError( $this->lang->words['func_security_mismatch'], 2100, null, null, 403 );
exit();
}
}
@@ -264,8 +264,9 @@ class adminFunctions
// Upload
//-----------------------------------------
$FILE_NAME = $_FILES['FILE_UPLOAD']['name'];
$FILE_TYPE = $_FILES['FILE_UPLOAD']['type'];
$FILE_NAME = $_FILES['FILE_UPLOAD']['name'];
$FILE_TYPE = $_FILES['FILE_UPLOAD']['type'];
$UPLOAD_DIR = ( $this->settings['upload_dir'] AND is_dir( $this->settings['upload_dir'] ) ) ? $this->settings['upload_dir'] : DOC_IPS_ROOT_PATH.'uploads';
//-----------------------------------------
// Naughty Opera adds the filename on the end of the
@@ -277,9 +278,9 @@ class adminFunctions
if ( $FILE_NAME AND ( $FILE_NAME != 'none' ) )
{
if ( move_uploaded_file( $_FILES[ 'FILE_UPLOAD' ]['tmp_name'], DOC_IPS_ROOT_PATH . "uploads/" . $FILE_NAME ) )
if ( move_uploaded_file( $_FILES[ 'FILE_UPLOAD' ]['tmp_name'], $UPLOAD_DIR . "/" . $FILE_NAME ) )
{
$location = DOC_IPS_ROOT_PATH . "uploads/" . $FILE_NAME;
$location = $UPLOAD_DIR . "/" . $FILE_NAME;
}
}
@@ -305,9 +306,9 @@ class adminFunctions
}
/* Unlink the tmp file if it exists */
if ( file_exists( DOC_IPS_ROOT_PATH . "uploads/" . $FILE_NAME ) )
if ( file_exists( $UPLOAD_DIR . "/" . $FILE_NAME ) )
{
@unlink( DOC_IPS_ROOT_PATH . "uploads/" . $FILE_NAME );
@unlink( $UPLOAD_DIR . "/" . $FILE_NAME );
}
return $content;