Version 3.4.8

This commit is contained in:
Neo committed 2025-12-19 00:42:42 -08:00
1 parent b45ea0dffb
commit c603205a25
1398 files changed
+36675 -31023

No files matched your search

+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -391,6 +391,10 @@ class HTMLPurifier_Encoder
$str = utf8_decode($str);
return $str;
}
else
{
return IPSText::convertCharsets( $str, $encoding );
}
trigger_error('Encoding not supported', E_USER_ERROR);
// You might be tempted to assume that the ASCII representation
// might be OK, however, this is *not* universally true over all
@@ -68,18 +68,57 @@ http://en.wikipedia.org/wiki/Assassin's_Creed
{
if( $matches[1][$k] )
{
if ( stripos( $matches[1][$k], '[' ) !== FALSE AND stripos( $matches[4][$k], ']' ) !== FALSE )
{
/* Concatenate and test to make sure we're not linking inside a bbcode option */
$test = $matches[1][$k] . $matches[3][$k] . $matches[4][$k];
if ( preg_match( '#\[([a-zA-Z]+)\=(http:\/\/|https:\/\/|ftp"\/\/)#i', $test ) )
{
$matches[1][$k] .= $matches[3][$k] . $matches[4][$k];
unset( $matches[3][$k] );
unset( $matches[4][$k] );
}
}
$token[] = new HTMLPurifier_Token_Text($matches[1][$k]);
}
if( $matches[2][$k] )
{
$token[] = new HTMLPurifier_Token_Text($matches[2][$k]);
}
if( !$matches[2][$k] AND !in_array( $matches[4][$k], array( '!', '.', ',' ) ) AND strpos( $matches[4][$k], ' ' ) === false AND ! preg_match( "#(\r|\n|\r\n)#i", $matches[4][$k] ) )
/**
* This looks a little weird so bare with me. When attempting to detect the URL, a space is added to try and separate it from any non-URL text (ending BBCode tag, for example)
* Previously, the if() statement below checked to see if ANY spaces were added at all, and if so, we just stopped processing immediately. The posed problems where a URL such as:
* [mybbcode]https://test.domain.com/linkwith#!strangechars[/mybbcode] would be cut off at the exclamation point.
*
* As such, rather than trying to detect if there is a space anywhere in the string, we only check at the end of it. Inside the conditional, we look for the presence of a space,
* and if found, explode the string into to two pieces, starting from the first space found. If the first bit is not an exclamation point, full stop, or comma, then we add it to
* the URL, and reassign the other bit to $matches[4][$k]. Otherwise, we just recompile the bits together again into $matches[4][$k] and ignore them.
*
* mind = blown
*/
if( !$matches[2][$k] AND !in_array( $matches[4][$k], array( '!', '.', ',' ) ) AND substr( $matches[4][$k], 0, -1 ) !== ' ' AND ! preg_match( "#(\r|\n|\r\n)#i", $matches[4][$k] ) )
{
$matches[3][$k] .= $matches[4][$k];
unset($matches[4][$k]);
if ( stripos( $matches[4][$k], ' ' ) !== FALSE )
{
$bits = explode( ' ', $matches[4][$k], 2 );
if ( ! in_array( $bits[0], array( '!', '.', ',' ) ) )
{
$matches[3][$k] .= $bits[0];
$matches[4][$k] = $bits[1];
}
else
{
$matches[4][$k] = implode( ' ', $bits );
}
}
else
{
$matches[3][$k] .= $matches[4][$k];
unset($matches[4][$k]);
}
}
$token[] = new HTMLPurifier_Token_Start('a', array('href' => str_replace( '\'', '%27', $matches[3][$k] )));
@@ -112,6 +151,7 @@ http://en.wikipedia.org/wiki/Assassin's_Creed
{
$token[] = new HTMLPurifier_Token_Text( $matches[5][$k] );
}
}
}
}
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* AJAX input parsing and handling
* Last Updated: $Date: 2012-08-28 17:56:22 -0400 (Tue, 28 Aug 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class can act as an API server, handling API requests
* Last Updated: $Date: 2012-12-27 11:37:49 -0500 (Thu, 27 Dec 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -8,7 +8,7 @@
* $Author: bfarber $
* @since Friday 19th May 2006 17:33
* $LastChangedDate: 2012-02-10 20:05:52 -0500 (Fri, 10 Feb 2012) $
* @version v3.4.6
* @version v3.4.8
* $Revision: 10288 $
*/
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since Friday 19th May 2006 17:33
* $LastChangedDate: 2012-02-10 20:05:52 -0500 (Fri, 10 Feb 2012) $
* @version v3.4.6
* @version v3.4.8
* $Revision: 10288 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -50,7 +50,7 @@ define("RECAPTCHA_VERIFY_SERVER", "http://www.google.com");
* $Author: rashbrook $
* @since Friday 19th May 2006 17:33
* $LastChangedDate: 2013-10-16 19:11:24 -0400 (Wed, 16 Oct 2013) $
* @version v3.4.6
* @version v3.4.8
* $Revision: 12381 $
*/
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Character set conversion library
* Last Updated: $Date: 2012-12-07 14:02:27 -0500 (Fri, 07 Dec 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Custom fields library
* Last Updated: $Date: 2013-10-14 17:55:18 -0400 (Mon, 14 Oct 2013) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Database Abstraction Layer
* Last Updated: $Date: 2013-05-20 16:38:23 -0400 (Mon, 20 May 2013) $
* </pre>
+20 -6
View File
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* MySQL Database Driver :: Further loads mysql or mysqli client appropriately
* Last Updated: $Date: 2012-09-17 11:58:03 -0400 (Mon, 17 Sep 2012) $
* Last Updated: $Date: 2014-11-11 15:53:26 -0500 (Tue, 11 Nov 2014) $
* </pre>
*
* @author $Author: mark $
* @author $Author: rashbrook $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Kernel
* @link http://www.invisionpower.com
* @since Monday 28th February 2005 16:46
* @version $Revision: 11341 $
* @version $Revision: 12568 $
*/
/**
@@ -1086,13 +1086,27 @@ abstract class db_main_mysql extends dbMain
* @param boolean Search in boolean mode
* @param boolean Return a "as ranking" statement from the build
* @param boolean Use fulltext search
* @param string And or Or search? (for non-fulltext only)
* @return @e string
*/
public function buildSearchStatement( $column, $keyword, $booleanMode=true, $returnRanking=false, $useFulltext=true )
public function buildSearchStatement( $column, $keyword, $booleanMode=true, $returnRanking=false, $useFulltext=true, $addor = 'and' )
{
if( !$useFulltext OR strtolower($this->connect_vars['mysql_tbl_type']) != 'myisam' )
{
return "{$column} LIKE '%{$keyword}%'";
if ( stripos( $keyword, ' ' ) !== FALSE AND $addor == 'or' )
{
$where = array();
foreach( explode( ' ', $keyword ) AS $word )
{
$where[] = "{$column} LIKE '%{$word}%'";
}
return "( " . implode( ' OR ', $where ) . " )";
}
else
{
return "{$column} LIKE '%{$keyword}%'";
}
}
else
{
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* MySQL Database Driver :: MySQL client
* Last Updated: $Date: 2012-05-25 13:17:47 -0400 (Fri, 25 May 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* MySQL Database Driver :: MySQLi client
* Last Updated: $Date: 2012-05-25 13:17:47 -0400 (Fri, 25 May 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Compare and highlight differences between two strings or files
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
+32 -5
View File
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Send email using php mail() or SMTP
* Last Updated: $Date: 2012-11-12 11:43:40 -0500 (Mon, 12 Nov 2012) $
* Last Updated: $Date: 2015-02-13 15:16:16 -0500 (Fri, 13 Feb 2015) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: rashbrook $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Kernel
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 11592 $
* @version $Revision: 12597 $
*
*
* Example usage:
@@ -248,7 +248,7 @@ class classEmail implements interfaceEmail
*
* @var string
*/
protected $boundry = "----=_NextPart_000_0022_01C1BD6C.D0C0F9F0";
protected $boundry = NULL;
/**
* HTML email flag
@@ -391,6 +391,8 @@ class classEmail implements interfaceEmail
$this->wrap_brackets = !empty($opts['wrap_brackets']) ? true : false;
$this->extra_opts = !empty($opts['extra_opts']) ? $opts['extra_opts'] : '';
$this->boundry = "----" . md5( uniqid() . mt_rand( 11111, 99999 ) );
if ( ! defined( 'EMAIL_MULTI_HEADERS_IN_BODY' ) )
{
define( 'EMAIL_MULTI_HEADERS_IN_BODY', false );
@@ -1064,6 +1066,14 @@ class classEmail implements interfaceEmail
*/
protected function _smtpConnect()
{
$tls = FALSE;
if ( substr( $this->smtp_host, 0, 6 ) == 'tls://' )
{
$tls = TRUE;
$this->smtp_host = str_replace( 'tls://', '', $this->smtp_host );
}
$this->smtp_fp = @fsockopen( $this->smtp_host, intval($this->smtp_port), $errno, $errstr, 30 );
if ( ! $this->smtp_fp )
@@ -1090,6 +1100,23 @@ class classEmail implements interfaceEmail
return false;
}
if ( $tls == TRUE )
{
$this->_smtpSendCmd( "STARTTLS" );
if ( $this->smtp_code != 220 )
{
$this->_smtpError( "STARTTLS Failed" );
return false;
}
if ( ! @stream_socket_enable_crypto( $this->smtp_fp, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT ) )
{
$this->_smtpError( "Failed to enable crypto (TLS)" );
return false;
}
}
//-----------------------------------------
// Do you like my user!
//-----------------------------------------
+31 -35
View File
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Wrapper for retrieving file contents. Methods available for removing files and directories as well.
* Last Updated: $Date: 2013-04-23 22:13:24 -0400 (Tue, 23 Apr 2013) $
* Last Updated: $Date: 2015-04-22 12:58:04 -0400 (Wed, 22 Apr 2015) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: stuarts $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Kernel
* @link http://www.invisionpower.com
* @since Tuesday 22nd February 2005 (16:55)
* @version $Revision: 12195 $
* @version $Revision: 12625 $
*/
if ( ! defined( 'IPS_CLASSES_PATH' ) )
@@ -312,6 +312,8 @@ class classFileManagement
// Open connection
//-------------------------------
$post_back_str = FALSE;
if ( ! $fp = @fsockopen( $url_parts['scheme'] == 'https' ? "ssl://" . $host : $host, $port, $errno, $errstr, $this->timeout ) )
{
$this->errors[] = "Could not establish a connection with {$host}";
@@ -344,11 +346,28 @@ class classFileManagement
$post_back_str = $post_array;
}
$header = "POST {$path} HTTP/1.0\r\nHost:{$host}\r\nContent-Type: application/x-www-form-urlencoded\r\nConnection: Keep-Alive{$userAgent}\r\nContent-Length: " . strlen($post_back_str) . "\r\n{$final_carriage}{$post_back_str}";
$header = "POST {$path} HTTP/1.0\r\nHost: {$host}\r\nContent-Type: application/x-www-form-urlencoded\r\nConnection: Keep-Alive{$userAgent}\r\nContent-Length: " . strlen($post_back_str) . "\r\n{$final_carriage}";
}
else
{
$header = "GET {$path} HTTP/1.0\r\nHost:{$host}\r\nConnection: Keep-Alive{$userAgent}\r\n{$final_carriage}";
$header = "GET {$path} HTTP/1.0\r\nHost: {$host}\r\nConnection: Keep-Alive{$userAgent}\r\n{$final_carriage}";
}
if ( $this->auth_req )
{
if ( $this->auth_user && $this->auth_pass )
{
$header .= "Authorization: Basic ".base64_encode("{$this->auth_user}:{$this->auth_pass}")."\r\n\r\n";
}
}
elseif ( $this->auth_raw )
{
$header .= $this->auth_raw."\r\n\r\n";
}
if ( $post_back_str !== FALSE )
{
$header .= $post_back_str;
}
if ( ! fputs( $fp, $header ) )
@@ -356,30 +375,6 @@ class classFileManagement
$this->errors[] = "Unable to send request to {$host}!";
return FALSE;
}
if ( $this->auth_req )
{
if ( $this->auth_user && $this->auth_pass )
{
$header = "Authorization: Basic ".base64_encode("{$this->auth_user}:{$this->auth_pass}")."\r\n\r\n";
if ( ! fputs( $fp, $header ) )
{
$this->errors[] = "Authorization Failed!";
return FALSE;
}
}
}
elseif ( $this->auth_raw )
{
$header = $this->auth_raw."\r\n\r\n";
if ( ! fputs( $fp, $header ) )
{
$this->errors[] = "Authorization Failed!";
return FALSE;
}
}
}
@stream_set_timeout( $fp, $this->timeout );
@@ -562,7 +557,10 @@ class classFileManagement
$data = curl_exec($ch);
}
}
/* Grab info for header removal */
$info = curl_getinfo( $ch );
curl_close($ch);
if ( stristr( $data, 'HTTP/1.0 100 Continue' ) or stristr( $data, 'HTTP/1.1 100 Continue' ) )
@@ -576,10 +574,8 @@ class classFileManagement
if ( $data )
{
$tmp = preg_split("/\r\n\r\n/", $data, 2);
$data = trim($tmp[1]);
$this->raw_headers = trim($tmp[0]);
$this->raw_headers = substr( $data, 0, $info['header_size'] );
$data = substr( $data, $info['header_size'] );
}
$this->http_status_code = substr( $this->raw_headers, 9, 3 );
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* FTP Class
* Last Updated: $Date: 2013-02-06 10:51:28 -0500 (Wed, 06 Feb 2013) $ BY $Author: mark $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Image Handler: create thumbnails, apply watermarks and copyright tests, save or display final image
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Image Handler: GD2 Library
* Last Updated: $Date: 2013-02-06 19:48:42 -0500 (Wed, 06 Feb 2013) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Image Handler: ImageMagick Library
* Last Updated: $Date: 2013-08-05 19:04:11 -0400 (Mon, 05 Aug 2013) $
* </pre>
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Three Way Merge Class
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $ BY $author$
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* RSS handler: handles importing of RSS documents and exporting of RSS v2 documents
* Last Updated: $Date: 2012-07-10 06:47:19 -0400 (Tue, 10 Jul 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Template Parser : Converts HTML "logic" into PHP code
* Last Updated: $Date: 2012-10-18 10:27:08 -0400 (Thu, 18 Oct 2012) $
* </pre>
+12 -3
View File
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Upload handler : Handles $_FILES and checks for security
* Last Updated: $Date: 2013-02-19 06:02:12 -0500 (Tue, 19 Feb 2013) $
* Last Updated: $Date: 2014-09-09 04:24:53 -0400 (Tue, 09 Sep 2014) $
* </pre>
*
* @author $Author: mmecham $
@@ -15,7 +15,7 @@
* @subpackage Kernel
* @link http://www.invisionpower.com
* @since 15th March 2004
* @version $Revision: 12001 $
* @version $Revision: 12497 $
*
*
* Example Usage:
@@ -413,6 +413,13 @@ class classUpload
{
$img_attributes = @getimagesize( $this->saved_upload_name );
if( !in_array( $img_attributes[2], array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG ) ) )
{
@unlink( $this->saved_upload_name );
$this->error_no = 5;
return false;
}
if ( ! is_array( $img_attributes ) or !count( $img_attributes ) )
{
@unlink( $this->saved_upload_name );
@@ -478,6 +485,8 @@ class classUpload
$this->error_no = 5;
return false;
}
# Check against local file-inclusion PHP code
//else if( strpos( $file_check, '<' . '?php' ) !== false OR strpos( $file_check, 'eval' ) !== false OR strpos( $file_check, 'base64_decode' ) !== false )
//{
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* XML Handler: Rewritten for PHP5
* By Matt Mecham
* Last Updated: $Date: 2012-07-27 11:43:25 -0400 (Fri, 27 Jul 2012) $
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* XML Archive Hanlder: Can create XML Archives (gzips) of multiple files, binary and ascii
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* XML-RPC Server: Send, receive and process XML-RPC requests
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* XML Handler: Can use PHP's internal XML handler, or a lite hand-rolled parser, to create and read XML files
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -8,7 +8,7 @@
* $Author: AndyMillne $
* @since Tuesday 1st March 2005 15:40
* $LastChangedDate: 2013-05-07 11:14:15 -0400 (Tue, 07 May 2013) $
* @version v3.4.6
* @version v3.4.8
* $Revision: 12235 $
*/
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
File diff suppressed because it is too large. Load diff
+144 -9
View File
@@ -15,7 +15,7 @@
* under the License.
*/
require_once( IPS_KERNEL_PATH . 'facebook/base_facebook.php' );/*noLibHook*/
require_once "base_facebook.php";
/**
* Extends the BaseFacebook class with the intent of using
@@ -23,31 +23,117 @@ require_once( IPS_KERNEL_PATH . 'facebook/base_facebook.php' );/*noLibHook*/
*/
class Facebook extends BaseFacebook
{
/**
* Cookie prefix
*/
const FBSS_COOKIE_NAME = 'fbss';
/**
* We can set this to a high number because the main session
* expiration will trump this.
*/
const FBSS_COOKIE_EXPIRE = 31556926; // 1 year
/**
* Stores the shared session ID if one is set.
*
* @var string
*/
protected $sharedSessionID;
/**
* Identical to the parent constructor, except that
* we start a PHP session to store the user ID and
* access token if during the course of execution
* we discover them.
*
* @param Array $config the application configuration.
* @see BaseFacebook::__construct in facebook.php
* @param array $config the application configuration. Additionally
* accepts "sharedSession" as a boolean to turn on a secondary
* cookie for environments with a shared session (that is, your app
* shares the domain with other apps).
*
* @see BaseFacebook::__construct
*/
public function __construct($config) {
if (!session_id()) {
if ((function_exists('session_status')
&& session_status() !== PHP_SESSION_ACTIVE) || !session_id()) {
session_start();
}
parent::__construct($config);
if (!empty($config['sharedSession'])) {
$this->initSharedSession();
// re-load the persisted state, since parent
// attempted to read out of non-shared cookie
$state = $this->getPersistentData('state');
if (!empty($state)) {
$this->state = $state;
} else {
$this->state = null;
}
}
}
/**
* Supported keys for persistent data
*
* @var array
*/
protected static $kSupportedKeys =
array('state', 'code', 'access_token', 'user_id');
/**
* Initiates Shared Session
*/
protected function initSharedSession() {
$cookie_name = $this->getSharedSessionCookieName();
if (isset($_COOKIE[$cookie_name])) {
$data = $this->parseSignedRequest($_COOKIE[$cookie_name]);
if ($data && !empty($data['domain']) &&
self::isAllowedDomain($this->getHttpHost(), $data['domain'])) {
// good case
$this->sharedSessionID = $data['id'];
return;
}
// ignoring potentially unreachable data
}
// evil/corrupt/missing case
$base_domain = $this->getBaseDomain();
$this->sharedSessionID = md5(uniqid(mt_rand(), true));
$cookie_value = $this->makeSignedRequest(
array(
'domain' => $base_domain,
'id' => $this->sharedSessionID,
)
);
$_COOKIE[$cookie_name] = $cookie_value;
if (!headers_sent()) {
$expire = time() + self::FBSS_COOKIE_EXPIRE;
setcookie($cookie_name, $cookie_value, $expire, '/', '.'.$base_domain);
} else {
// @codeCoverageIgnoreStart
self::errorLog(
'Shared session ID cookie could not be set! You must ensure you '.
'create the Facebook instance before headers have been sent. This '.
'will cause authentication issues after the first request.'
);
// @codeCoverageIgnoreEnd
}
}
/**
* Provides the implementations of the inherited abstract
* methods. The implementation uses PHP sessions to maintain
* methods. The implementation uses PHP sessions to maintain
* a store for authorization codes, user ids, CSRF states, and
* access tokens.
*/
/**
* {@inheritdoc}
*
* @see BaseFacebook::setPersistentData()
*/
protected function setPersistentData($key, $value) {
if (!in_array($key, self::$kSupportedKeys)) {
self::errorLog('Unsupported key passed to setPersistentData.');
@@ -58,6 +144,11 @@ class Facebook extends BaseFacebook
$_SESSION[$session_var_name] = $value;
}
/**
* {@inheritdoc}
*
* @see BaseFacebook::getPersistentData()
*/
protected function getPersistentData($key, $default = false) {
if (!in_array($key, self::$kSupportedKeys)) {
self::errorLog('Unsupported key passed to getPersistentData.');
@@ -69,6 +160,11 @@ class Facebook extends BaseFacebook
$_SESSION[$session_var_name] : $default;
}
/**
* {@inheritdoc}
*
* @see BaseFacebook::clearPersistentData()
*/
protected function clearPersistentData($key) {
if (!in_array($key, self::$kSupportedKeys)) {
self::errorLog('Unsupported key passed to clearPersistentData.');
@@ -76,18 +172,57 @@ class Facebook extends BaseFacebook
}
$session_var_name = $this->constructSessionVariableName($key);
unset($_SESSION[$session_var_name]);
if (isset($_SESSION[$session_var_name])) {
unset($_SESSION[$session_var_name]);
}
}
/**
* {@inheritdoc}
*
* @see BaseFacebook::clearAllPersistentData()
*/
protected function clearAllPersistentData() {
foreach (self::$kSupportedKeys as $key) {
$this->clearPersistentData($key);
}
if ($this->sharedSessionID) {
$this->deleteSharedSessionCookie();
}
}
/**
* Deletes Shared session cookie
*/
protected function deleteSharedSessionCookie() {
$cookie_name = $this->getSharedSessionCookieName();
unset($_COOKIE[$cookie_name]);
$base_domain = $this->getBaseDomain();
setcookie($cookie_name, '', 1, '/', '.'.$base_domain);
}
/**
* Returns the Shared session cookie name
*
* @return string The Shared session cookie name
*/
protected function getSharedSessionCookieName() {
return self::FBSS_COOKIE_NAME . '_' . $this->getAppId();
}
/**
* Constructs and returns the name of the session key.
*
* @see setPersistentData()
* @param string $key The key for which the session variable name to construct.
*
* @return string The name of the session key.
*/
protected function constructSessionVariableName($key) {
return implode('_', array('fb',
$this->getAppId(),
$key));
$parts = array('fb', $this->getAppId(), $key);
if ($this->sharedSessionID) {
array_unshift($parts, $this->sharedSessionID);
}
return implode('_', $parts);
}
}
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* This class acts as a cache layer, allowing you to store and retrieve data in
* external cache sources such as memcache or APC
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
IP.Board
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>