https://redmine.lighttpd.net/
https://redmine.lighttpd.net/favicon.ico?1366732741
2014-03-05T06:08:36Z
lighty labs
Lighttpd - Bug #2559: accesslog_append_escaped does not hex-escape properly
https://redmine.lighttpd.net/issues/2559?journal_id=8324
2014-03-05T06:08:36Z
TheJH
<ul></ul><p>Argh, stupid formatting. This was the access log entry:</p>
<pre>
::1 blah - [05/Mar/2014:05:52:08 +0100] "GET /blah HTTP/1.1" 404 345 "-" "\x+-\x,."
</pre>
<p>And here is the patch again:</p>
<pre>
diff -rpNU 8 lighttpd-1.4.34/src/mod_accesslog.c lighttpd-1.4.34-logescape/src/mod_accesslog.c
--- lighttpd-1.4.34/src/mod_accesslog.c 2013-11-13 18:30:52.000000000 +0100
+++ lighttpd-1.4.34-logescape/src/mod_accesslog.c 2014-03-05 06:01:34.683818499 +0100
@@ -199,19 +199,19 @@ static void accesslog_append_escaped(buf
BUFFER_APPEND_STRING_CONST(dest, "\\t");
break;
case '\v':
BUFFER_APPEND_STRING_CONST(dest, "\\v");
break;
default: {
/* non printable char => \xHH */
char hh[5] = {'\\','x',0,0,0};
- char h = c / 16;
+ char h = ((unsigned char)c) / 16;
hh[2] = (h > 9) ? (h - 10 + 'A') : (h + '0');
- h = c % 16;
+ h = ((unsigned char)c) % 16;
hh[3] = (h > 9) ? (h - 10 + 'A') : (h + '0');
buffer_append_string_len(dest, &hh[0], 4);
}
break;
}
}
}
</pre>
Lighttpd - Bug #2559: accesslog_append_escaped does not hex-escape properly
https://redmine.lighttpd.net/issues/2559?journal_id=8339
2014-03-14T12:17:58Z
stbuehler
<ul><li><strong>Target version</strong> set to <i>1.4.36</i></li></ul>
Lighttpd - Bug #2559: accesslog_append_escaped does not hex-escape properly
https://redmine.lighttpd.net/issues/2559?journal_id=8499
2015-07-05T17:31:36Z
stbuehler
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/8499/diff?detail_id=6607">diff</a>)</li></ul>
Lighttpd - Bug #2559: accesslog_append_escaped does not hex-escape properly
https://redmine.lighttpd.net/issues/2559?journal_id=8500
2015-07-05T18:05:04Z
stbuehler
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset r2992.</p>