added a check agains ldap-insertion in the login-name

This commit is contained in:
Ralf Becker 2003-10-02 21:01:37 +00:00
parent 01dcc7cae1
commit c218e158b1

View File

@ -37,6 +37,11 @@
*/ */
error_reporting(0); error_reporting(0);
if (ereg('[()|&=*,<>!~]',$username))
{
return False;
}
if(!$ldap = @ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host'])) if(!$ldap = @ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']))
{ {
$GLOBALS['phpgw']->log->message('F-Abort, Failed connecting to LDAP server for authenication, execution stopped'); $GLOBALS['phpgw']->log->message('F-Abort, Failed connecting to LDAP server for authenication, execution stopped');