Skip to content

Commit

Permalink
Merge pull request #89 from 008agent/path2xml_strict_fix
Browse files Browse the repository at this point in the history
api_path2xml_vec strict mode check on list key length mismatch
  • Loading branch information
olofhagsand authored Jun 19, 2019
2 parents 45de5e9 + bf2a9bf commit c683bc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/clixon_xml_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c683bc9

Please sign in to comment.