1
0
mirror of https://git.kore.io/kore.git synced 2024-11-15 22:46:21 +01:00

Set req->agent to "-" if it is NULL, as do other major HTTP servers.

This avoids passing a NULL value to a format string when writing a log
entry.
This commit is contained in:
Frederic Cambus 2019-06-09 21:16:28 +02:00 committed by Joris Vink
parent d4f4e007e0
commit bae117b68c

View File

@ -102,6 +102,9 @@ kore_accesslog(struct http_request *req)
else
referer = "-";
if (req->agent == NULL)
req->agent = "-";
cn = "-";
#if !defined(KORE_NO_TLS)
if (req->owner->cert != NULL) {