Bug 56463 - Allow to disable ServerInfo in directory listings in DefaultServlet
Allow to disable ServerInfo in directory listings in DefaultServlet
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
PC All
: P2 enhancement with 5 votes (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2014-04-27 18:30 UTC by Konstantin Kolinko
Modified: 2014-05-08 07:31 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2014-04-27 18:30:56 UTC
Discussion on dev@:

Looking at Tomcat bug 56383 - "Securing ErrorReportValve" (
https://issues.apache.org/bugzilla/show_bug.cgi?id=56383 ), i think a
similar thing can also be done for the Tomcat version number reported by
the DefaultServlet.
This servlet will show the version information from ServerInfo when the
listings are enabled. Currently it seems there is no way of disabling
version reporting other than 'hacking' the ServerInfo.

There is a way to customize those listings: define an XSLT style sheet.

That said, it is possible to introduce a configuration option for DefaultServlet.

Places to patch:
- DefaultServlet.java
- webapps/docs/default-servlet.xml
- webapps/docs/security-howto.xml
Comment 1 Michael Osipov 2014-04-27 19:45:47 UTC
This is meant to be security by obscurity?
Comment 2 Konstantin Kolinko 2014-04-27 20:07:42 UTC
It is not meant to be security. It is that some people like to hide that information.

I am just saying that new feature have to be documented.
Comment 3 Violeta Georgieva 2014-05-08 07:31:56 UTC
This has been fixed in trunk for 8.0.6 and in 7.0.x for 7.0.54 onwards.