Hello, Several times a day I get the errors like the following in my moinmoin server logs:
[Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] Traceback (most recent call last): [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 411, in __call__ [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] return self.app(environ, start_response) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 282, in __call__ [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] response = run(context) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 88, in run [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] response = dispatch(request, context, action_name) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 136, in dispatch [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] response = handle_action(context, pagename, action_name) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 195, in handle_action [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] handler(context.page.page_name, context) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/action/__init__.py", line 268, in do_show [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] content_only=content_only, [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/Page.py", line 1134, in send_page [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] body = self.data [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/Page.py", line 246, in get_data [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] self.__meta, self.__data = wikiutil.get_processing_instructions(self.body) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/dist-packages/MoinMoin/Page.py", line 212, in get_body [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] f = codecs.open(self._text_filename(), 'rb', config.charset) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] File "/usr/lib/python2.7/codecs.py", line 881, in open [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] file = __builtin__.open(filename, mode, buffering) [Wed Oct 01 17:50:31 2014] [error] [client 176.194.6.204] IOError: [Errno 36] File name too long: '/srv/www.rath.org/wiki/pages/mail_err(2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b)Result(3a2befbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbd2befbfbdefbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbd3b2b)Result(3a2befbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbd2befbfbdefbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbd3b2b)Result(3a2befbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbd2befbfbdefbfbdefbfbd2befbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbdefbfbd3b)/revisions/99999999' I believe this is just some attempted exploit failing miserably and no cause for concern. However, the length of the message (and the embedded newlines) makes it very hard to filter, so I'm constantly getting nagged by my log analyzer. What would be the best way to catch this exception and log a short, standard message instead? I am proficient in Python, but not in moinmoin. So my question is mostly *where* to insert the necessary code, and how to generate the error message (just print to stderr, or is there a logging function I should use?). Ideally, I'd also like to change something in /etc rather than changing e.g. "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", so that the changes are not lost on the next update. Best, -Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user