Skip to content. Skip to navigation

High Speed Rails.com

Personal tools
You are here: Home Support Howtos How to Make Zope Think its Someone Else
Navigation
Included with all plans
Root Access
99-Day Money-Back Guarantee
Undercrowding
Phone Support
Premium Connectivity
99.99% Uptime
Free Website Accelerator
1GB Email Accounts
Convenient Control Panel
... and much more!
 
Document Actions

How to Make Zope Think its Someone Else

All HTTP servers identify themselves. Here's how to change Zope's default identity.

How to Make Zope Think its Someone Else

If you have a Zope 2.8.1 instance with Plone installed, and look at the HTTP headers, which anyone can do, you will see something like this:

Server: Zope/(Zope 2.8.1-final, python 2.3.5, freebsd4) ZServer/1.1 Plone/Unknown

Now this gives a lot of information out to the general public, including potential attackers. What if a security issue comes out for Zope 2.8.1 and you don't hear about it or upgrade? An attacker could simply write a script to check for servers that identify themselves as Zope 2.8.1 and potentially exploit your Zope application, causing untold problems.

You'll first of course need to login via SSH.

You'll now need to edit as follows:

vi /usr/local/zope/281/lib/python/ZServer/HTTPResponse.py

This assumes that you are using Zope 2.8.1. You may need to adjust if you're using a different Zope version.

Scroll all the way down to the end of the file and edit this line:

response._server_version=request.channel.server.SERVER_IDENT

You could for example change it to this:

response._server_version='Apache'

Or you can put any other string in there instead of Apache, for example:

response._server_version='High Speed Rails, Python, Zope, Plone & Me'
response._server_version='All My Servers Are Belong To Me'

Just in case:

rm /usr/local/zope/281/lib/python/ZServer/HTTPResponse.pyc

... and restart your zope:

zopectl restart

Check your New Headers

One way you can view your headers and make sure the change went through is to go here:

http://www.webmaster-toolkit.com/http-header-viewer.shtml

... and enter the url to your zope site.

Conclusion

This is a very small part of any security strategy, but it definitely can be worth implementing.

Questions?

Please contact us with your questions and we will get back to you right away.

Creative Commons License


© 2005-2006 High Speed Rails incorporated

701 Fifth Avenue, Suite 4200
Seattle, Washington 98104
+1 206-774-8566
+1 800-969-1452
UK: 020-7101-9307 (2PM-12AM BST)
Mexico: 55-5351-2449 - Se Habla Español
France: 01-7281-3666 (3PM-1AM CET)
Italia: 068 7720079 (3PM-1AM CET)

Powered by Plone Powered by High Speed Rails

2Checkout is an authorized retailer of our services.