Merge pull request #89 from 008agent/path2xml_strict_fix

api_path2xml_vec strict mode check on list key length mismatch
This commit is contained in:
Olof Hagsand 2019-06-19 22:20:12 +02:00 committed by GitHub
commit c683bc9d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -194,6 +194,7 @@
### Minor changes
* `api_path2xml_vec` strict mode check added if list key length mismatch
* `startup_extraxml` triggers unnecessary validation
* Renamed startup_db_reset -> xmldb_db_reset (its a general function)
* In startup_extraxml(), check if reset callbacks or extraxml file actually makes and changes to the tmp db.

View file

@ -2494,7 +2494,7 @@ api_path2xml_vec(char **vec,
else{
if ((valvec = clicon_strsep(restval, ",", &nvalvec)) == NULL)
goto done;
if (nvalvec != cvec_len(cvk)){
if ((nvalvec != cvec_len(cvk)) && strict){
clicon_err(OE_XML, EINVAL, "List key %s length mismatch", name);
goto fail;
}