Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.7.0, 5.0, 5.1, 5.2
-
PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:24:43) on Ubuntu 12.04
PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli) (built: Aug 23 2013 15:06:16) on Debian 6.0. 7
Description
On eZPageData class when checking for display canonical URL if object language is different from siteaccess language, there is a wrong bitwise AND operation between 2 vars that are strings instead of int, causing unexpected result.
Adding an (int) cast before each var solves the problem, there is a proposed patch:
--- extension/ezwebin/autoloads/ezpagedata.php 2012-09-07 10:16:19.000000000 +0200 +++ extension/ezwebin/autoloads/ezpagedata.php 2014-02-18 08:58:48.000000000 +0100 @@ -236,7 +236,7 @@ if ( $siteaccess !== null ) { $lang = eZContentLanguage::fetchByLocale( $ini->variable( 'RegionalSettings', 'ContentObjectLocale' ) ); - if ( ( $contentInfo['language_mask'] & $lang->attribute('id') ) < 1 ) + if ( ( (int)$contentInfo['language_mask'] & (int)$lang->attribute('id') ) < 1 ) { $handlerOptions = new ezpExtensionOptions(); $handlerOptions->iniFile = 'site.ini';