[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-23 Thread Neal Norwitz

Neal Norwitz added the comment:

Committed revision 58625. (2.5)

--
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-23 Thread Guido van Rossum

Guido van Rossum added the comment:

Committed revision 58618.

There better not be any others. :-)

Neal, can you add this to 2.5.2 and then close?

--
assignee: gvanrossum -> nnorwitz
status: closed -> open

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-23 Thread Derek Shockey

Derek Shockey added the comment:

I'm really sorry I didn't notice this earlier, but RCPT has the same bug! 
This patch applies the same fix to that function as well.

Added file: http://bugs.python.org/file8597/smtpd-patch2.diff

__
Tracker <[EMAIL PROTECTED]>

__

smtpd-patch2.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-22 Thread Neal Norwitz

Neal Norwitz added the comment:

Thanks for the patch.

Committed revision 58599. (2.5)

--
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-22 Thread Neal Norwitz

Neal Norwitz added the comment:

It would be great to get this into 2.5.2.

--
assignee: nnorwitz -> gvanrossum

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-22 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks!

Committed revision 58594.

Is there time to backport this to 2.5.2?

--
assignee:  -> nnorwitz
nosy: +gvanrossum, nnorwitz
resolution:  -> accepted

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-21 Thread Georg Brandl

Changes by Georg Brandl:


--
keywords: +patch

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-20 Thread Derek Shockey

Derek Shockey added the comment:

Very simple patch that adds a ternary operator to skip the call to 
__getaddr if there is no arg.

Added file: http://bugs.python.org/file8583/smtpd.diff

__
Tracker <[EMAIL PROTECTED]>

__

smtpd.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1307] smtpd.SMTPServer throws exception on MAIL command with no arg

2007-10-20 Thread Derek Shockey

New submission from Derek Shockey:

smtpd.SMTPChannel contains a bug such that when connected to an 
SMTPServer (or any subclass thereof), issuing a MAIL command with no 
argument closes the socket and gives this error on the server:

(:'NoneType' object is unsubscriptable ... 
smtpd.py|__getaddr|212])

The desired result is of course is to respond with a 501 Syntax error. 
The problem arises because the arg parameter passed to each smtp_* 
command handler function is None when there is no argument. arg is 
passed on to __getaddr which attempts a slice on the None object.

A check for None in __getaddr that returns will allow the existing code 
to issue the appropriate 501 Syntax error.

--
components: Library (Lib)
messages: 56616
nosy: dshockey
severity: normal
status: open
title: smtpd.SMTPServer throws exception on MAIL command with no arg
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com