Hello community,

here is the log from the commit of package python-feedparser for openSUSE:11.2
checked in at Wed Apr 27 17:46:06 CEST 2011.



--------
--- old-versions/11.2/UPDATES/all/python-feedparser/python-feedparser.changes   
2011-03-17 02:35:42.000000000 +0100
+++ 11.2/python-feedparser/python-feedparser.changes    2011-04-20 
20:17:37.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Apr 20 11:14:19 UTC 2011 - [email protected]
+
+- Fix bnc#688878 - "global name 'keymap' is not defined"
+
+
+-------------------------------------------------------------------

calling whatdependson for 11.2-i586


New:
----
  feedparser-bnc688878.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-feedparser.spec ++++++
--- /var/tmp/diff_new_pack.o6ri4x/_old  2011-04-27 17:45:00.000000000 +0200
+++ /var/tmp/diff_new_pack.o6ri4x/_new  2011-04-27 17:45:00.000000000 +0200
@@ -20,7 +20,7 @@
 
 Name:           python-feedparser
 Version:        4.1
-Release:        2.<RELEASE3>
+Release:        2.<RELEASE5>
 Summary:        Universal Feed Parser Module for Python
 Url:            http://sourceforge.net/projects/feedparser/
 License:        BSD
@@ -30,6 +30,7 @@
 Patch1:         feedparser-issue255-CVE-2011-1158.patch
 Patch2:         feedparser-issue254-CVE-2011-1157.patch
 Patch3:         feedparser-issue91-CVE-2011-1156.patch
+Patch4:         feedparser-bnc688878.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %{py_requires}
 BuildRequires:  python-devel python-setuptools
@@ -52,6 +53,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4
 chmod 0644 README
 
 %build

++++++ feedparser-bnc688878.diff ++++++
Index: feedparser.py
===================================================================
--- feedparser.py.orig
+++ feedparser.py
@@ -65,6 +65,22 @@ TIDY_MARKUP = 0
 # if TIDY_MARKUP = 1
 PREFERRED_TIDY_INTERFACES = ["uTidy", "mxTidy"]
 
+# If you want feedparser to allow all URL schemes, set this to ()
+# List culled from Python's urlparse documentation at:
+#   http://docs.python.org/library/urlparse.html
+# as well as from "URI scheme" at Wikipedia:
+#   https://secure.wikimedia.org/wikipedia/en/wiki/URI_scheme
+# Many more will likely need to be added!
+ACCEPTABLE_URI_SCHEMES = (
+    'file', 'ftp', 'gopher', 'h323', 'hdl', 'http', 'https', 'imap', 'mailto',
+    'mms', 'news', 'nntp', 'prospero', 'rsync', 'rtsp', 'rtspu', 'sftp',
+    'shttp', 'sip', 'sips', 'snews', 'svn', 'svn+ssh', 'telnet', 'wais',
+    # Additional common-but-unofficial schemes
+    'aim', 'callto', 'cvs', 'facetime', 'feed', 'git', 'gtalk', 'irc', 'ircs',
+    'irc6', 'itms', 'mms', 'msnim', 'skype', 'ssh', 'smb', 'svn', 'ymsg',
+)
+#ACCEPTABLE_URI_SCHEMES = ()
+
 # ---------- required modules (should come with any Python distribution) 
----------
 import sgmllib, re, sys, copy, urlparse, time, rfc822, types, cgi, urllib, 
urllib2
 try:
@@ -1602,6 +1618,22 @@ def _resolveRelativeURIs(htmlSource, bas
     p.feed(htmlSource)
     return p.output()
 
+def _makeSafeAbsoluteURI(base, rel=None):
+    # bail if ACCEPTABLE_URI_SCHEMES is empty
+    if not ACCEPTABLE_URI_SCHEMES:
+        return _urljoin(base, rel or u'')
+    if not base:
+        return rel or u''
+    if not rel:
+        scheme = urlparse.urlparse(base)[0]
+        if not scheme or scheme in ACCEPTABLE_URI_SCHEMES:
+            return base
+        return u''
+    uri = _urljoin(base, rel)
+    if uri.strip().split(':', 1)[0] not in ACCEPTABLE_URI_SCHEMES:
+        return u''
+    return uri
+
 class _HTMLSanitizer(_BaseHTMLProcessor):
     acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area', 'b', 
'big',
       'blockquote', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col',
@@ -1635,6 +1667,7 @@ class _HTMLSanitizer(_BaseHTMLProcessor)
                 self.unacceptablestack += 1
             return
         
+        keymap = {}
         clean_attrs = []
         for key, value in self.normalize_attrs(attrs):
             if key in self.acceptable_attributes:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to