You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Hiroaki Nakamura (JIRA)" <ji...@apache.org> on 2015/12/31 20:31:39 UTC
[jira] [Created] (TS-4106) Cache Inspector fails to split multiline
URLs
Hiroaki Nakamura created TS-4106:
------------------------------------
Summary: Cache Inspector fails to split multiline URLs
Key: TS-4106
URL: https://issues.apache.org/jira/browse/TS-4106
Project: Traffic Server
Issue Type: Bug
Components: Web UI
Reporter: Hiroaki Nakamura
The error is in the length parameter at
https://github.com/apache/trafficserver/blob/413dd51d5dc17bf388805071efdb8f882014b847/iocore/cache/CachePages.cc#L129
Because of this error, ink_strlcpy copies strings from the current poisition to the end of multiline URLs, not to the end of line.
The patch below fixes this bug:
{code:title=cache_inspector_multiline_urls_split.patch}
--- iocore/cache/CachePages.cc.orig 2015-12-31 21:54:56.881997421 +0900
+++ iocore/cache/CachePages.cc 2015-12-31 21:55:53.574506731 +0900
@@ -126,7 +126,7 @@
q = strstr(p, "%0D%0A" /* \r\n */); // we used this in the JS to separate urls
if (!q)
q = t;
- ink_strlcpy(show_cache_urlstrs[s], p, sizeof(show_cache_urlstrs[s]));
+ ink_strlcpy(show_cache_urlstrs[s], p, q ? q - p + 1: sizeof(show_cache_urlstrs[s]));
p = q + 6; // +6 ==> strlen(%0D%0A)
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)