mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSaddon SUPANN::supannParseCompositeValue(): check global value integrity
This commit is contained in:
parent
72933c9408
commit
9879dd3eda
1 changed files with 7 additions and 0 deletions
|
@ -305,6 +305,13 @@ function supannParseLabeledValue($value) {
|
|||
* @retval array Un tableau contenant key->value ou false en cas d'erreur
|
||||
**/
|
||||
function supannParseCompositeValue($val) {
|
||||
// Check value is valid
|
||||
if (!preg_match('/^(\[[^=]+=[^\]\]]*\])+$/', $val)) {
|
||||
LSlog :: get_logger('LSaddon_supann') -> warning("supannParseCompositeValue($val): invalid value");
|
||||
return;
|
||||
}
|
||||
|
||||
// Search for components value
|
||||
if (preg_match_all('/\[([^=]*)=([^\]]*)\]/',$val,$matches)) {
|
||||
$parseValue = array();
|
||||
for($i=0; $i<count($matches[0]); $i++) {
|
||||
|
|
Loading…
Reference in a new issue