pkgsrc/lang/python26/patches/patch-bc
tron a99c0c697c Add fix for CVE-2010-3492 and update the fix for CVE-2010-3493. Both
fixes taken from the Python 2.7 branch in the Python SVN repository.
2010-11-23 08:24:04 +00:00

86 lines
1.8 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$NetBSD: patch-bc,v 1.1 2010/11/23 08:24:04 tron Exp $
Fix for CVE-2010-3492 and CVE-2010-3493, taken from the Python SVN repository:
http://svn.python.org/view?view=rev&revision=86084
--- Lib/smtpd2.6.py.orig 2010-11-22 18:18:59.000000000 +0000
+++ Lib/smtpd2.6.py 2010-11-22 18:19:03.000000000 +0000
@@ -35,7 +35,6 @@
and if remoteport is not given, then 25 is used.
"""
-
# Overview:
#
# This file implements the minimal SMTP protocol as defined in RFC 821. It
@@ -96,7 +95,6 @@
COMMASPACE = ', '
-
def usage(code, msg=''):
print >> sys.stderr, __doc__ % globals()
if msg:
@@ -104,7 +102,6 @@
sys.exit(code)
-
class SMTPChannel(asynchat.async_chat):
COMMAND = 0
DATA = 1
@@ -276,7 +273,6 @@
self.push('354 End data with <CR><LF>.<CR><LF>')
-
class SMTPServer(asyncore.dispatcher):
def __init__(self, localaddr, remoteaddr):
self._localaddr = localaddr
@@ -331,7 +327,6 @@
raise NotImplementedError
-
class DebuggingServer(SMTPServer):
# Do something with the gathered message
def process_message(self, peer, mailfrom, rcpttos, data):
@@ -347,7 +342,6 @@
print '------------ END MESSAGE ------------'
-
class PureProxy(SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
lines = data.split('\n')
@@ -388,7 +382,6 @@
return refused
-
class MailmanProxy(PureProxy):
def process_message(self, peer, mailfrom, rcpttos, data):
from cStringIO import StringIO
@@ -467,13 +460,11 @@
msg.Enqueue(mlist, torequest=1)
-
class Options:
setuid = 1
classname = 'PureProxy'
-
def parseargs():
global DEBUGSTREAM
try:
@@ -530,7 +521,6 @@
return options
-
if __name__ == '__main__':
options = parseargs()
# Become nobody