steffen: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php, 1.43, 1.44
cvs at intevation.de
cvs at intevation.de
Thu Nov 18 14:27:59 CET 2004
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv22541/kolab-webadmin/www/admin/user
Modified Files:
user.php
Log Message:
a bit of validation for policies. I dont want to make it too strict because we want to accept both internal addresses, external ones, dist. lists. and uids
Index: user.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/user.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- user.php 25 Oct 2004 09:10:51 -0000 1.43
+++ user.php 18 Nov 2004 13:27:57 -0000 1.44
@@ -105,6 +105,19 @@
return '';
}
+// Check uid/gid used in invitation policy
+// We're pretty relaxed about what is entered
+// here and only check some basic syntax
+function checkpolicy( $form, $key, $value ) {
+ foreach( $value as $v ) {
+ $v = trim($v);
+ if( !empty($v) && !ereg('^([0-9a-zA-Z._@ ]|-)*$', $v ) ) {
+ return _("Illegal user or group $v");
+ }
+ }
+ return '';
+}
+
// Check that password match
function checkpw( $form, $key, $value ) {
global $action;
@@ -327,6 +340,7 @@
'resourceaction' => array( 'name' => _('Resource/Group Policies'),
'type' => 'resourcepolicy',
'policies' => array('anyone' => 4),
+ 'validation' => 'checkpolicy',
'comment' => _('For automatic invitation handling<br/>'.
'NOTE: For regular accounts to use this feature, give the \'calendar\' user access to the Calendar folder') ),
'title_0' => array( 'name' => _('Title') ) );
More information about the commits
mailing list