Author: ralfbecker
New Revision: 26892
URL: http://www.egroupware.org/viewvc/egroupware?rev=3D26892&view=3Drev
Log:
“prevent empty account-names from deleting whole /home”
Modified:
trunk/phpgwapi/inc/class.vfs_home_hooks.inc.php
Modified: trunk/phpgwapi/inc/class.vfs_home_hooks.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/inc/class.v=
fs_home_hooks.inc.php?rev=3D26892&r1=3D26891&r2=3D26892&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
— trunk/phpgwapi/inc/class.vfs_home_hooks.inc.php (original)
+++ trunk/phpgwapi/inc/class.vfs_home_hooks.inc.php Wed Apr 29 21:15:54 2009
@@ -89,10 +89,14 @@
// make the new owner the owner of the dir and it’s content
egw_vfs::find($new_dir,array(),array(‘egw_vfs’,‘chown’),$data[‘new_owne=
r’]);
}
-
else
-
elseif(!empty($data['account_lid']) && $data['account_lid'] !=3D '/') { // delete the user-directory egw_vfs::remove('/home/'.$data['account_lid']); -
} -
else -
{ -
throw new egw_exception_assertion_failed(__METHOD__.'('.array2string($d=
ata).’) account_lid NOT set!’);
}
egw_vfs::$is_root =3D false;
}
@@ -147,6 +151,11 @@
static function deleteGroup($data)
{
if (self::LOG_LEVEL > 0) error_log(METHOD.’(’.array2string($data).’)=
’);
+
-
if(empty($data['account_name']) || $data['account_name'] =3D=3D '/') -
{ -
throw new egw_exception_assertion_failed(__METHOD__.'('.array2string($d=
ata).’) account_name NOT set!’);
-
} // delete the group-directory egw_vfs::$is_root =3D true; egw_vfs::remove('/home/'.$data['account_name']);
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O’Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs