]> git.ipfire.org Git - thirdparty/curl.git/commit
urlapi: don't accept blank port number field without scheme
authorDaniel Stenberg <daniel@haxx.se>
Fri, 4 Dec 2020 16:27:57 +0000 (17:27 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 6 Dec 2020 23:50:49 +0000 (00:50 +0100)
commitabd846c374c5269809ce11740754bc6f00a0b193
tree29d4b2139f86ca3989bcb5431c4feb0f1d92b7b6
parent2260e0ebe6d45529495231b3e37a0c58fb92a6a2
urlapi: don't accept blank port number field without scheme

... as it makes the URL parser accept "very-long-hostname://" as a valid
host name and we don't want that. The parser now only accepts a blank
(no digits) after the colon if the URL starts with a scheme.

Reported-by: d4d on hackerone
Closes #6283
lib/urlapi-int.h
lib/urlapi.c
tests/data/test1653
tests/unit/unit1653.c