Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1652)
+++ branches/2.8.x/CHANGELOG	(revision 1653)
@@ -11,6 +11,9 @@
 ! = Update/Change
 ===============================================================================
 
+28 Mar-2012 Build 1653 Werner v.d.Decken(DarkViper)
+# fixed change_mode() against a very old problem with
+invalid calling arguments
 27 Mar-2012 Build 1652 Dietmar Woellbrink (Luisehahne)
 ! fixed path to globalExceptionHandler.php in wysiwyg
 26 Mar-2012 Build 1651 Werner v.d.Decken(DarkViper)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1652)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1653)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1652');
+if(!defined('REVISION')) define('REVISION', '1653');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/functions.php
===================================================================
--- branches/2.8.x/wb/framework/functions.php	(revision 1652)
+++ branches/2.8.x/wb/framework/functions.php	(revision 1653)
@@ -416,13 +416,15 @@
 
 /**
  * Function to chmod files and/or directories
+ * the function also prevents the owner to loose rw-rights
  * @param string $sName
  * @param int rights in dec-value. 0= use wb-defaults
- * @return bool
+ * @return bool 
  */
 function change_mode($sName, $iMode = 0)
 {
 	$bRetval = true;
+	$iMode = intval($iMode) & 0777; // sanitize value
 	if((substr(__FILE__, 0, 1)) == '/')
 	{ // Only chmod if os is not windows
 		$bRetval = false;
@@ -429,6 +431,7 @@
 		if(!$iMode) {
 			$iMode = (is_file($sName) ? octdec(STRING_FILE_MODE) : octdec(STRING_DIR_MODE));
 		}
+		$iMode |= 0600; // set o+rw
 		if(is_writable($sName)) {
 			$bRetval = chmod($sName, $iMode);
 		}
