You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/05/15 16:45:05 UTC
DO NOT REPLY [Bug 34923] New: -
HostConfig fails for relative docBase containing ".."
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34923>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34923
Summary: HostConfig fails for relative docBase containing ".."
Product: Tomcat 5
Version: Nightly Build
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: werbung@kuhnle.net
When configuring a context's docBase relative to the server's docBase using
"..", HostConfig org.apache.catalina.startup.HostConfig fails beause it thinks
the context's docBase is inside the server's. This is because HostConfig
compares the directory prefixes with getAbsolutePath, while it should use
getCanonicalPath
Example with catalina base="c:/tomcat", server docBase="webapps", context
docBase="../special"
getAbsolutePath now returns "c:/tomcat/webapps" for the server's docBase and
"c:/tomcat/webapps/../special" for the context's docBase. Since the prefixes are
the same, HostConfig thinks the context's docBase is inside of the server's.
getCanonicalPath returns "c:/tomcat/special" for the context's docBase, and
HostConfig works.
getCanonicalPath
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org