mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 02:29:59 -04:00
Validate HTTP path passed to dig
The commit makes sure that the HTTP path passed to dig is a valid one.
This commit is contained in:
parent
4ce5f94333
commit
0d5e0b9922
1 changed files with 8 additions and 0 deletions
|
|
@ -1482,6 +1482,14 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||
lookup->https_path = isc_mem_strdup(
|
||||
mctx, ISC_NM_HTTP_DEFAULT_PATH);
|
||||
} else {
|
||||
if (!isc_nm_http_path_isvalid(value)) {
|
||||
fprintf(stderr,
|
||||
";; The given HTTP path \"%s\" "
|
||||
"is not "
|
||||
"a valid absolute path\n",
|
||||
value);
|
||||
goto invalid_option;
|
||||
}
|
||||
lookup->https_path = isc_mem_strdup(mctx,
|
||||
value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue