From f653b2a70e36bccd6128c4f4b973e09ea898e2cf Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 9 Sep 2010 08:16:57 -0700 Subject: Two potential XSS vulnerabilities have been identified and fixed. --- Mailman/Cgi/listinfo.py | 4 +- Mailman/HTMLFormatter.py | 7 +- Mailman/Utils.py | 187 ++++++++++++++++++++++++----------------------- 3 files changed, 100 insertions(+), 98 deletions(-) (limited to 'Mailman') diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py index 22ab9d5f..8aaae14c 100644 --- a/Mailman/Cgi/listinfo.py +++ b/Mailman/Cgi/listinfo.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2010 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -97,7 +97,7 @@ def listinfo_overview(msg=''): else: advertised.append((mlist.GetScriptURL('listinfo'), mlist.real_name, - mlist.description)) + Utils.websafe(mlist.description))) if msg: greeting = FontAttr(msg, color="ff5060", size="+1") else: diff --git a/Mailman/HTMLFormatter.py b/Mailman/HTMLFormatter.py index 3a21d961..dad51e74 100644 --- a/Mailman/HTMLFormatter.py +++ b/Mailman/HTMLFormatter.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2010 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -383,8 +383,9 @@ class HTMLFormatter: '' : self.GetMailmanFooter(), '' : self.real_name, '' : self._internal_name, - '' : self.description, - '' : BR.join(self.info.split(NL)), + '' : Utils.websafe(self.description), + '' : + '' + BR.join(self.info.split(NL)) + '', '' : self.FormatFormEnd(), '' : self.FormatArchiveAnchor(), '' : '', diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 5cba077e..d5babc14 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2010 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -911,99 +911,100 @@ _badwords = [ # Kludge to allow the specific tag that's in the options.html template. ')', '