diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-06-17 21:07:41 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-06-17 21:07:41 +0200 |
commit | 73021645d1d1fa0e851bae7e003982f9ee491e84 (patch) | |
tree | dc34667c0d93cdfde5f0726722bf17b72499f816 /src | |
parent | 1d40561bbd3aac552c8585d09d8436884aabdee7 (diff) | |
download | vyos-1x-73021645d1d1fa0e851bae7e003982f9ee491e84.tar.gz vyos-1x-73021645d1d1fa0e851bae7e003982f9ee491e84.zip |
[HTTP API] T1431: disallow empty config paths.
Diffstat (limited to 'src')
-rwxr-xr-x | src/services/vyos-http-api-server | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index 834c06b4d..e11eb6d52 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -119,6 +119,9 @@ def configure(): op = c['op'] path = c['path'] + if not path: + raise ConfigSessionError("Malformed command \"{0}\": empty path".format(json.dumps(c))) + # Type checking if not isinstance(path, list): raise ConfigSessionError("Malformed command \"{0}\": \"path\" field must be a list".format(json.dumps(c))) |