Restconf https fixes after nmap and fuzz:

- segv in PUT/POST of /
- Dont return bad request on error, just close socket
This commit is contained in:
Olof hagsand 2021-05-28 15:42:15 +02:00
parent af88b974fd
commit c405a08ff8
5 changed files with 233 additions and 9 deletions

View file

@ -287,7 +287,7 @@ api_data_write(clicon_handle h,
cxobj *xfrom;
cxobj *xac;
xfrom = api_path?xml_parent(xbot):xbot;
xfrom = (api_path && strcmp(api_path,"/"))?xml_parent(xbot):xbot; // XXX xbot is /config has NULL parent
if (xml_copy_one(xfrom, xdata0) < 0)
goto done;
xa = NULL;