mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
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
This commit is contained in:
parent
3d9f6643bc
commit
f9cfeb51ab
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user