Package: python-moinmoin Version: 1.9.8-1 Severity: important Control: affects -1 wiki.debian.org Tags: patch
On wiki.debian.org, the RecentChanges RSS feed causes a crash (see below). The crash is caused by the following code in rss_rc.py: # prepare output out = StringIO.StringIO() handler = RssGenerator(out) # start SAX stream handler.startDocument() handler._write( u'<!--\n' Essentially, rss_rc.py is mucking about in private members (_write) of the RssGenerator class it inherited from parent classes from the Python standard library (xml.sax.saxutils.XMLGenerator), which is a bad idea. On wiki.debian.org, this change fixes the problem & is more correct: - handler._write( + out.write( Interestingly, if I manually type the code from rss_rc.py into an interactive Python shell, the crash does not occur. So there may be two bugs here rather than one. I don't have time to figure out what is causing the difference between the WSGI and Python shell environments but that shouldn't be needed if the correct thing is done instead. Please get the fix above included upstream, in unstable and stable: https://www.debian.org/doc/manuals/developers-reference/pkgs.html#upload-stable mod_wsgi (pid=1755): Exception occurred processing WSGI script '/srv/wiki.debian.org/bin/moin.wsgi'. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in __call__ return self.app(environ, start_response) File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 264, in __call__ response = run(context) File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 89, in run response = dispatch(request, context, action_name) File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 137, in dispatch response = handle_action(context, pagename, action_name) File "/usr/lib/python2.7/dist-packages/MoinMoin/wsgiapp.py", line 203, in handle_action handler(context.page.page_name, context) File "/usr/lib/python2.7/dist-packages/MoinMoin/action/rss_rc.py", line 178, in execute handler._write( AttributeError: RssGenerator instance has no attribute '_write' -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (900, 'testing'), (860, 'testing-proposed-updates'), (850, 'buildd-testing-proposed-updates'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental'), (690, 'buildd-experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.0.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages python-moinmoin depends on: ii python 2.7.9-1 ii python-parsedatetime 1.4-1 ii python-passlib 1.6.1-1.3 ii python-pygments 2.0.1+dfsg-1.1 ii python-recaptcha 1.0.6-1 ii python-werkzeug 0.9.6+dfsg-1 Versions of packages python-moinmoin recommends: ii exim4-daemon-light [mail-transport-agent] 4.85-3 pn fckeditor <none> pn libapache2-mod-wsgi | httpd-cgi <none> ii python-xapian 1.2.21-1 pn python-xappy <none> Versions of packages python-moinmoin suggests: pn antiword <none> pn catdoc <none> pn cifs-utils <none> pn docbook-dsssl <none> ii poppler-utils [xpdf-utils] 0.26.5-2 pn python-4suite-xml <none> ii python-docutils 0.12+dfsg-1 pn python-flup <none> pn python-gdchart <none> ii python-ldap 2.4.10-1 pn python-mysqldb <none> pn python-openid <none> pn python-pyxmpp <none> ii python-tz 2012c+dfsg-0.1 pn python-xml <none> ii wamerican [wordlist] 7.1-1 ii wbritish [wordlist] 7.1-1 ii wspanish [wordlist] 1.0.27 -- no debconf information -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part