From tw at waldmann-edv.de Sun Nov 8 13:22:57 2020 From: tw at waldmann-edv.de (Thomas Waldmann) Date: Sun, 8 Nov 2020 19:22:57 +0100 Subject: [moin-devel] MoinMoin 1.9.11 released, urgent security fixes! Message-ID: MoinMoin 1.9.11 released, urgent security fixes! Details: https://github.com/moinwiki/moin-1.9/releases/tag/1.9.11 -- GPG ID: 9F88FB52FAF7B393 GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393 From paul at boddie.org.uk Sun Nov 8 16:39:02 2020 From: paul at boddie.org.uk (Paul Boddie) Date: Sun, 08 Nov 2020 22:39:02 +0100 Subject: [moin-devel] MoinMoin 1.9.11 released, urgent security fixes! In-Reply-To: References: Message-ID: <3974403.4aY12oELBg@jason> On Sunday, 8 November 2020 19:22:57 CET Thomas Waldmann wrote: > MoinMoin 1.9.11 released, urgent security fixes! > > Details: > > https://github.com/moinwiki/moin-1.9/releases/tag/1.9.11 Thanks for taking care of this release! I don't have a GitHub account that I generally use for personal projects, but there is one very simple patch that I would like to suggest that might help people generally: ---- diff --git a/MoinMoin/i18n/__init__.py b/MoinMoin/i18n/__init__.py index 17061a83..b5abdf25 100644 --- a/MoinMoin/i18n/__init__.py +++ b/MoinMoin/i18n/__init__.py @@ -255,7 +255,7 @@ class Translation(object): def getDirection(lang): """ Return the text direction for a language, either 'ltr' or 'rtl'. """ - return languages[lang]['x-direction'] + return languages and languages[lang]['x-direction'] or 'ltr' def getText(original, request, lang, **kw): """ Return a translation of some original text. ---- Previously, when upgrading Moin, there have been times when it just breaks in a nasty and seemingly inexplicable way, and I am pretty sure we have had to troubleshoot this a few times on this list or via bug reports. In the above, where there is some cache issue, the getDirection function fails because the languages mapping is not set up properly (or at the time of invocation), and I am not even sure that the usual "moin maint cleancache" advice helps. This seems to have occurred in different forms several times over the years. For example: https://moinmo.in/MoinMoinBugs/1.8TypeError_in_i18n.__init__after_upgrade https://moinmo.in/MoinMoinBugs/I18nLanguagesNotSetInSetupI18nPreauth Interestingly, the latter of the above bug reports links to a patch that potentially fixes the problem but only for WSGI. (Yes, I am still using CGI for the few wikis I have running.) Anyway, thanks once again for the hard work! Paul