Project

General

Profile

« Previous | Next » 

Revision 1653

Added by darkviper over 12 years ago

fixed change_mode() against a very old problem with invalid calling arguments

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
28 Mar-2012 Build 1653 Werner v.d.Decken(DarkViper)
15
# fixed change_mode() against a very old problem with
16
invalid calling arguments
14 17
27 Mar-2012 Build 1652 Dietmar Woellbrink (Luisehahne)
15 18
! fixed path to globalExceptionHandler.php in wysiwyg
16 19
26 Mar-2012 Build 1651 Werner v.d.Decken(DarkViper)
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1652');
54
if(!defined('REVISION')) define('REVISION', '1653');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/framework/functions.php
416 416

  
417 417
/**
418 418
 * Function to chmod files and/or directories
419
 * the function also prevents the owner to loose rw-rights
419 420
 * @param string $sName
420 421
 * @param int rights in dec-value. 0= use wb-defaults
421
 * @return bool
422
 * @return bool 
422 423
 */
423 424
function change_mode($sName, $iMode = 0)
424 425
{
425 426
	$bRetval = true;
427
	$iMode = intval($iMode) & 0777; // sanitize value
426 428
	if((substr(__FILE__, 0, 1)) == '/')
427 429
	{ // Only chmod if os is not windows
428 430
		$bRetval = false;
429 431
		if(!$iMode) {
430 432
			$iMode = (is_file($sName) ? octdec(STRING_FILE_MODE) : octdec(STRING_DIR_MODE));
431 433
		}
434
		$iMode |= 0600; // set o+rw
432 435
		if(is_writable($sName)) {
433 436
			$bRetval = chmod($sName, $iMode);
434 437
		}

Also available in: Unified diff