Commit f9cfeb51 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Throw away the reqbuf stuff as it was not well designed. Removing it and...

Throw away the reqbuf stuff as it was not well designed. Removing it and restoring usage of %H *fixes* #1942 not just workaround it with opening security holes. close #1942

svn path=/icecast/trunk/icecast/; revision=18901
parent 3d9f6643
......@@ -120,7 +120,6 @@ int get_clf_time (char *buffer, unsigned len, struct tm *t)
void logging_access(client_t *client)
{
char datebuf[128];
char reqbuf[1024];
struct tm thetime;
time_t now;
time_t stayed;
......@@ -136,12 +135,6 @@ void logging_access(client_t *client)
#else
strftime (datebuf, sizeof(datebuf), LOGGING_FORMAT_CLF, &thetime);
#endif
/* build the request */
snprintf (reqbuf, sizeof(reqbuf), "%s %s %s/%s",
httpp_getvar (client->parser, HTTPP_VAR_REQ_TYPE),
httpp_getvar (client->parser, HTTPP_VAR_URI),
httpp_getvar (client->parser, HTTPP_VAR_PROTOCOL),
httpp_getvar (client->parser, HTTPP_VAR_VERSION));
stayed = now - client->con->con_time;
......@@ -159,11 +152,14 @@ void logging_access(client_t *client)
user_agent = "-";
log_write_direct (accesslog,
"%s - %s [%s] \"%s\" %d %" PRIu64 " \"%s\" \"%s\" %lu",
"%s - %H [%s] \"%H %H %H/%H\" %d %" PRIu64 " \"% H\" \"% H\" %lu",
client->con->ip,
username,
datebuf,
reqbuf,
httpp_getvar (client->parser, HTTPP_VAR_REQ_TYPE),
httpp_getvar (client->parser, HTTPP_VAR_URI),
httpp_getvar (client->parser, HTTPP_VAR_PROTOCOL),
httpp_getvar (client->parser, HTTPP_VAR_VERSION),
client->respcode,
client->con->sent_bytes,
referrer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment