Commit 78b93fda authored by Shane Hathaway's avatar Shane Hathaway

Minor corrections to the MailHost security patch that fix an issue with

the PTK.
parent a0d4dc20
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""SMTP mail objects """SMTP mail objects
$Id: MailHost.py,v 1.57 2000/11/27 16:01:21 brian Exp $""" $Id: MailHost.py,v 1.58 2000/12/11 17:49:13 shane Exp $"""
__version__ = "$Revision: 1.57 $"[11:-2] __version__ = "$Revision: 1.58 $"[11:-2]
from Globals import Persistent, HTMLFile, HTML, MessageDialog from Globals import Persistent, HTMLFile, HTML, MessageDialog
from smtplib import SMTP from smtplib import SMTP
...@@ -99,10 +99,10 @@ from cStringIO import StringIO ...@@ -99,10 +99,10 @@ from cStringIO import StringIO
smtpError = "SMTP Error" smtpError = "SMTP Error"
MailHostError = "MailHost Error" MailHostError = "MailHost Error"
addForm=HTMLFile('addMailHost_form', globals()) manage_addMailHostForm=HTMLFile('addMailHost_form', globals())
def add(self, id, title='', smtp_host=None, def manage_addMailHost(self, id, title='', smtp_host=None,
localhost='localhost', smtp_port=25, localhost='localhost', smtp_port=25,
timeout=1.0, REQUEST=None): timeout=1.0, REQUEST=None):
' add a MailHost into the system ' ' add a MailHost into the system '
id=str(id) id=str(id)
...@@ -122,6 +122,8 @@ def add(self, id, title='', smtp_host=None, ...@@ -122,6 +122,8 @@ def add(self, id, title='', smtp_host=None,
if REQUEST is not None: if REQUEST is not None:
REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main') REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
add = manage_addMailHost
class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager): class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
'a mailhost...?' 'a mailhost...?'
meta_type='Mail Host' meta_type='Mail Host'
......
...@@ -83,8 +83,8 @@ ...@@ -83,8 +83,8 @@
# #
############################################################################## ##############################################################################
__doc__='''MailHost Product Initialization __doc__='''MailHost Product Initialization
$Id: __init__.py,v 1.19 2000/12/08 21:05:23 shane Exp $''' $Id: __init__.py,v 1.20 2000/12/11 17:49:13 shane Exp $'''
__version__='$Revision: 1.19 $'[11:-2] __version__='$Revision: 1.20 $'[11:-2]
import MailHost import MailHost
import SendMailTag import SendMailTag
...@@ -93,7 +93,8 @@ def initialize(context): ...@@ -93,7 +93,8 @@ def initialize(context):
context.registerClass( context.registerClass(
MailHost.MailHost, MailHost.MailHost,
permission='Add MailHost objects', permission='Add MailHost objects',
constructors=(MailHost.addForm, MailHost.add), constructors=(MailHost.manage_addMailHostForm,
MailHost.manage_addMailHost),
icon='www/MailHost_icon.gif', icon='www/MailHost_icon.gif',
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment