diff options
| author | Christian Schneider | 2024-05-07 17:19:58 +0200 | 
|---|---|---|
| committer | Christian Schneider | 2024-05-07 17:19:58 +0200 | 
| commit | 8db292a501feccc66be4eb33a05d02674be89bbd (patch) | |
| tree | a4066960d6a2fbba740b754a41d46ef0e6570dd6 | |
| parent | ec353b98fd0318d129dbc98e4c305d326711cbf8 (diff) | |
| download | itools-8db292a501feccc66be4eb33a05d02674be89bbd.tar.gz itools-8db292a501feccc66be4eb33a05d02674be89bbd.tar.bz2 itools-8db292a501feccc66be4eb33a05d02674be89bbd.zip | |
Abort if table name contains invalid characters
| -rw-r--r-- | it_dbi.class | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/it_dbi.class b/it_dbi.class index d4722e9..12a4ef1 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -85,6 +85,9 @@ function __construct($p = array(), $query = null, ...$args)  	if ($p['table'])		# Standard use: create a table object  	{ +		if (it::match('[^a-z0-9_.]', $p['table'])) +			$this->_fatal("_construct: invalid table name '{$p['table']}''"); +  		if (!isset($GLOBALS[static::$_global_key]))  			new static::$_global_key; |