mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-24 14:36:09 -04:00
Add filtering to Username to prevent XSS
This commit is contained in:
@@ -5,7 +5,7 @@ class Group extends ZM_Object {
|
||||
protected static $table = 'Groups';
|
||||
protected $defaults = array(
|
||||
'Id' => null,
|
||||
'Name' => '',
|
||||
'Name' => array('type'=>'text','filter_regexp'=>'/[^\w\-\.\(\)\:\/ ]/', 'default'=>'Group'),
|
||||
'ParentId' => null,
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class User extends ZM_Object {
|
||||
|
||||
protected $defaults = array(
|
||||
'Id' => null,
|
||||
'Username' => '',
|
||||
'Username' => array('type'=>'text','filter_regexp'=>'/[^\w\.@ ]/'),
|
||||
'Password' => '',
|
||||
'Language' => '',
|
||||
'Enabled' => 1,
|
||||
@@ -25,7 +25,7 @@ class User extends ZM_Object {
|
||||
'MonitorIds' => '',
|
||||
'TokenMinExpiry' => 0,
|
||||
'APIEnabled' => 1,
|
||||
'HomeView' => '',
|
||||
'HomeView' => '',
|
||||
);
|
||||
|
||||
public static function find( $parameters = array(), $options = array() ) {
|
||||
|
||||
Reference in New Issue
Block a user