changeset 4720:9a26c69ccf5a

merged moin/1.8
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 01 May 2009 21:36:12 +0200
parents 5c962bbcd797 (current diff) f976af4e61f1 (diff)
children 56548b251138
files .hgtags MoinMoin/i18n/MoinMoin.pot MoinMoin/i18n/ar.MoinMoin.po MoinMoin/i18n/bg.MoinMoin.po MoinMoin/i18n/ca.MoinMoin.po MoinMoin/i18n/cs.MoinMoin.po MoinMoin/i18n/da.MoinMoin.po MoinMoin/i18n/de.MoinMoin.po MoinMoin/i18n/el.MoinMoin.po MoinMoin/i18n/en.MoinMoin.po MoinMoin/i18n/es.MoinMoin.po MoinMoin/i18n/fa.MoinMoin.po MoinMoin/i18n/fi.MoinMoin.po MoinMoin/i18n/fr.MoinMoin.po MoinMoin/i18n/gl.MoinMoin.po MoinMoin/i18n/he.MoinMoin.po MoinMoin/i18n/hi.MoinMoin.po MoinMoin/i18n/hr.MoinMoin.po MoinMoin/i18n/hu.MoinMoin.po MoinMoin/i18n/id.MoinMoin.po MoinMoin/i18n/it.MoinMoin.po MoinMoin/i18n/ja.MoinMoin.po MoinMoin/i18n/ko.MoinMoin.po MoinMoin/i18n/ku.MoinMoin.po MoinMoin/i18n/lt.MoinMoin.po MoinMoin/i18n/lv.MoinMoin.po MoinMoin/i18n/mk.MoinMoin.po MoinMoin/i18n/mn.MoinMoin.po MoinMoin/i18n/nb.MoinMoin.po MoinMoin/i18n/nl.MoinMoin.po MoinMoin/i18n/pl.MoinMoin.po MoinMoin/i18n/pt-br.MoinMoin.po MoinMoin/i18n/pt.MoinMoin.po MoinMoin/i18n/ro.MoinMoin.po MoinMoin/i18n/ru.MoinMoin.po MoinMoin/i18n/sk.MoinMoin.po MoinMoin/i18n/sl.MoinMoin.po MoinMoin/i18n/sr.MoinMoin.po MoinMoin/i18n/sv.MoinMoin.po MoinMoin/i18n/tr.MoinMoin.po MoinMoin/i18n/uk.MoinMoin.po MoinMoin/i18n/vi.MoinMoin.po MoinMoin/i18n/zh-tw.MoinMoin.po MoinMoin/i18n/zh.MoinMoin.po MoinMoin/parser/_tests/test_text_creole.py MoinMoin/script/migration/1080200.py MoinMoin/script/migration/1080300.py MoinMoin/theme/__init__.py MoinMoin/version.py docs/CHANGES docs/INSTALL.html moin.spec wiki/config/more_samples/ui_wikiconfig_snippet wiki/config/wikiconfig.py wiki/config/wikifarm/farmconfig.py wiki/data/meta wiki/server/moin.wsgi wiki/underlay.tar wikiconfig.py
diffstat 9 files changed, 77 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Apr 29 23:19:13 2009 +0200
+++ b/.hgtags	Fri May 01 21:36:12 2009 +0200
@@ -33,5 +33,6 @@
 7fee549f435d119801075f0d18fc57822f78f0eb 1.8.0
 fad2936d33a7eac9370f3cdc28f0ec375518d5cf 1.8.1
 1f0db10c207f697de8d496f298167d7de76f30ac 1.8.2
+f25e6286fe1306017cda1bc614f5a9f60b382670 1.8.3
 d706f5d4f4ecc935a69b0c6c5b90d47a643e82c4 1.9.0beta1
 a04008fe123371f144707ac237196fd7cc37ae90 1.9.0beta2
--- a/MoinMoin/mail/_tests/test_sendmail.py	Wed Apr 29 23:19:13 2009 +0200
+++ b/MoinMoin/mail/_tests/test_sendmail.py	Fri May 01 21:36:12 2009 +0200
@@ -89,21 +89,20 @@
     def testComposite(self):
         """ mail.sendmail: encode address: 'Phrase <local@domain>' """
         address = u'Phrase <local@domain>'
-        phrase = str(Header(u'Phrase '.encode('utf-8'), self.charset))
-        expected = phrase + '<local@domain>'
+        expected = str(address)
         assert sendmail.encodeAddress(address, self.charset) == expected
 
     def testCompositeUnicode(self):
         """ mail.sendmail: encode Uncode address: 'ויקי <local@domain>' """
         address = u'ויקי <local@domain>'
-        phrase = str(Header(u'ויקי '.encode('utf-8'), self.charset))
-        expected = phrase + '<local@domain>'
+        phrase = str(Header(u'ויקי'.encode('utf-8'), self.charset))
+        expected = phrase + ' ' + '<local@domain>'
         assert sendmail.encodeAddress(address, self.charset) == expected
 
     def testEmptyPhrase(self):
         """ mail.sendmail: encode address with empty phrase: '<local@domain>' """
         address = u'<local@domain>'
-        expected = address.encode(config.charset)
+        expected = 'local@domain'
         assert sendmail.encodeAddress(address, self.charset) == expected
 
     def testEmptyAddress(self):
@@ -113,8 +112,7 @@
         case, but we don't do error checking for mail addresses.
         """
         address = u'Phrase <>'
-        phrase = str(Header(u'Phrase '.encode('utf-8'), self.charset))
-        expected = phrase + '<>'
+        expected = str(address)
         assert sendmail.encodeAddress(address, self.charset) == expected
 
     def testInvalidAddress(self):
@@ -125,7 +123,7 @@
         out.
         """
         address = u'Phrase <blah'
-        expected = address.encode(config.charset)
+        expected = str(address)
         assert sendmail.encodeAddress(address, self.charset) == expected
 
 coverage_modules = ['MoinMoin.mail.sendmail']
--- a/MoinMoin/mail/sendmail.py	Wed Apr 29 23:19:13 2009 +0200
+++ b/MoinMoin/mail/sendmail.py	Fri May 01 21:36:12 2009 +0200
@@ -32,15 +32,25 @@
     @rtype: string
     @return: encoded address
     """
-    composite = re.compile(r'(?P<phrase>.+)(?P<angle_addr>\<.*\>)', re.UNICODE)
+    assert isinstance(address, unicode)
+    composite = re.compile(r'(?P<phrase>.*?)(?P<blanks>\s*)\<(?P<addr>.*)\>', re.UNICODE)
     match = composite.match(address)
     if match:
-        phrase = match.group('phrase').encode(config.charset)
-        phrase = str(Header(phrase, charset))
-        angle_addr = match.group('angle_addr').encode(config.charset)
-        return phrase + angle_addr
+        phrase = match.group('phrase')
+        try:
+            str(phrase)  # is it pure ascii?
+        except UnicodeEncodeError:
+            phrase = phrase.encode(config.charset)
+            phrase = Header(phrase, charset)
+        blanks = match.group('blanks')
+        addr = match.group('addr')
+        if phrase:
+            return "%s%s<%s>" % (str(phrase), str(blanks), str(addr))
+        else:
+            return str(addr)
     else:
-        return address.encode(config.charset)
+        # a pure email address, should encode to ascii without problem
+        return str(address)
 
 
 def sendmail(request, to, subject, text, mail_from=None):
--- a/MoinMoin/parser/_creole.py	Wed Apr 29 23:19:13 2009 +0200
+++ b/MoinMoin/parser/_creole.py	Fri May 01 21:36:12 2009 +0200
@@ -19,6 +19,7 @@
     @copyright: 2007 MoinMoin:RadomirDopieralski (creole 0.5 implementation),
                 2007 MoinMoin:ThomasWaldmann (updates)
     @license: GNU GPL, see COPYING for details.
+    @license: BSD, see COPYING for details.
 """
 
 import re
@@ -258,13 +259,16 @@
     _head_text_repl = _head_repl
 
     def _text_repl(self, groups):
+        text = groups.get('text', '')
         if self.cur.kind in ('table', 'table_row', 'bullet_list',
             'number_list'):
             self.cur = self._upto(self.cur,
                 ('document', 'section', 'blockquote'))
         if self.cur.kind in ('document', 'section', 'blockquote'):
             self.cur = DocNode('paragraph', self.cur)
-        self.parse_inline(groups.get('text', '')+' ')
+        else:
+            text = u' ' + text
+        self.parse_inline(text)
         if groups.get('break') and self.cur.kind in ('paragraph',
             'emphasis', 'strong', 'code'):
             DocNode('break', self.cur, '')
@@ -280,6 +284,7 @@
         tb = self.cur
         tr = DocNode('table_row', tb)
 
+        text = ''
         for m in self.cell_re.finditer(row):
             cell = m.group('cell')
             if cell:
@@ -310,7 +315,6 @@
 
     def _line_repl(self, groups):
         self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))
-        self.text = None
 
     def _code_repl(self, groups):
         DocNode('code', self.cur, groups.get('code_text', u'').strip())
@@ -388,3 +392,5 @@
         self.content = content
         if self.parent is not None:
             self.parent.children.append(self)
+
+
--- a/MoinMoin/parser/_tests/test_text_creole.py	Wed Apr 29 23:19:13 2009 +0200
+++ b/MoinMoin/parser/_tests/test_text_creole.py	Fri May 01 21:36:12 2009 +0200
@@ -327,7 +327,7 @@
 }}}"""
         output = self.parse(raw)
         output = ''.join(output)
-        assert 'Example </p><pre>You can use {{{brackets}}}</pre>' in output
+        assert 'Example</p><pre>You can use {{{brackets}}}</pre>' in output
 
     def testManyNestingPreBrackets(self):
         """ tests two nestings  ({{{ }}} and {{{ }}}) in one line for the wiki parser
--- a/MoinMoin/script/migration/1080200.py	Wed Apr 29 23:19:13 2009 +0200
+++ b/MoinMoin/script/migration/1080200.py	Fri May 01 21:36:12 2009 +0200
@@ -9,5 +9,5 @@
 """
 
 def execute(script, data_dir, rev):
-    return 1089999
+    return 1080300
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/script/migration/1080300.py	Fri May 01 21:36:12 2009 +0200
@@ -0,0 +1,13 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - migration from base rev 1080200
+
+    Nothing to do, we just return the new data dir revision.
+
+    @copyright: 2009 by Thomas Waldmann
+    @license: GNU GPL, see COPYING for details.
+"""
+
+def execute(script, data_dir, rev):
+    return 1089999
+
--- a/MoinMoin/theme/__init__.py	Wed Apr 29 23:19:13 2009 +0200
+++ b/MoinMoin/theme/__init__.py	Fri May 01 21:36:12 2009 +0200
@@ -673,8 +673,8 @@
         cfg_css = [self._stylesheet_link(False, *stylesheet) for stylesheet in request.cfg.stylesheets]
 
         msie_css = """
-<!-- css only for MSIE browsers -->
-<!--[if IE]>
+<!-- css only for MS IE6/IE7 browsers -->
+<!--[if lt IE8]>
    %s
 <![endif]-->
 """ % self._stylesheet_link(True, 'all', 'msie')
--- a/docs/CHANGES	Wed Apr 29 23:19:13 2009 +0200
+++ b/docs/CHANGES	Fri May 01 21:36:12 2009 +0200
@@ -104,16 +104,42 @@
       See HelpOnAuthentication.
 
 
-Version 1.8.current:
+Version 1.8.3:
   Bug fixes:
+    * AttachFile XSS fixes: move escaping to error_msg / upload_form
+    * AttachFile move: add more escaping (maybe not XSS exploitable though)
+    * email attachments import with xapian indexing enabled: fix AttributeError
+    * fix wrong links in attachment notifications
+    * AttachFile do=view: quote filename and pagename params for EmbedObject
+      macro call
+    * AttachFile: fix exception when someone just clicks on upload, without
+      giving a file
+    * ldap_login: use None as default value for ssl certs/keys (using '' for
+      the pathes lets it fail with Connect Error)
+    * release edit lock if someone saves an unchanged page
+    * fix sendmail.encodeAddress (do not [QP] encode blanks, do not un-
+      necessarily use [QP] encoding for pure ascii mail addresses)
     * Fixed docs bug: see HINT about secrets configuration at version 1.8.0
       (1.8.0 Other changes).
+    * backup action: add 'self' dummy argument for backup_exclude function
+    * login action: fix formatting of error messages
+    * unsubscribe action: add msg types so icons get displayed
+    * fix quoting for pagehits stats (info action) - was not working for pagenames with blanks
+    * macro.TableOfContents: bug fix for MoinMoinBugs/TableOfContentsIgnoresSectionNumbersPragma
 
   New features:
-    * ...
+    * added modernized_cms theme
+    * use url_prefix_fckeditor if you don't want to use the builtin FCKeditor
+      of moin, but a separate one at some specific url
+    * action.Load: added textcha feature
+    * add mumble protocol (nice and good quality F/OSS VOIP conference chat sw)
+    * ldap auth: new name_callback param to create a custom wiki username (not
+      the ldap login username).
 
   Other changes:
-    * ...
+    * add compatibility code for set to xapwrap.index (fix py 2.6 warnings)
+    * wikiutil: MIMETYPES_MORE extended for .md5 as text/plain
+
 
 Version 1.8.2:
   Bug fixes: