"allow ajax calls from classes ending with ajax, as starting with ajax does not conform with naming schema"

This commit is contained in:
Ralf Becker 2008-06-07 16:55:50 +00:00
parent ab8a36cede
commit d85ed846fe

View File

@ -91,7 +91,8 @@
$arg0 = ($appName = 'etemplate').'.'.$className.'.'.$functionName; $arg0 = ($appName = 'etemplate').'.'.$className.'.'.$functionName;
break; break;
} }
if(substr($className,0,4) != 'ajax' && $arg0 != 'etemplate.etemplate.process_exec' && substr($functionName,0,4) != 'ajax' || if(substr($className,0,4) != 'ajax' && substr($className,-4) != 'ajax' &&
$arg0 != 'etemplate.etemplate.process_exec' && substr($functionName,0,4) != 'ajax' ||
!preg_match('/^[A-Za-z0-9_]+\.[A-Za-z0-9_]+\.[A-Za-z0-9_]+$/',$arg0)) !preg_match('/^[A-Za-z0-9_]+\.[A-Za-z0-9_]+\.[A-Za-z0-9_]+$/',$arg0))
{ {
// stopped for security reasons // stopped for security reasons