Re: [Zope-dev] MailHost, 2.2.1, and tracebacks

2000-09-04 Thread Bill Anderson

Bill Anderson wrote:
> 
> Bill Anderson wrote:
> ...
> >
> > The following patch seems to alleviate the problem, but I dunno if it affects 
>anything else:
> 
> yeah, it makes zope ignore the cookie login setup, and instead triggers basic Auth 
>... will work on it today. Ugh.


Thi sis getting old, replying to my own posts... But anyway, I wa sincorrect, it was a 
lack of a  causing
this problem.

So far, it works fine.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] MailHost, 2.2.1, and tracebacks

2000-09-04 Thread Bill Anderson

Bill Anderson wrote:
...
> 
> The following patch seems to alleviate the problem, but I dunno if it affects 
>anything else:


yeah, it makes zope ignore the cookie login setup, and instead triggers basic Auth ... 
will work on it today. Ugh.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] MailHost, 2.2.1, and tracebacks

2000-09-04 Thread Bill Anderson

Shane Hathaway wrote:
> 
> Bill Anderson wrote:
...
> >   File /local/ZopeSites/TestBed/lib/python/AccessControl/Owned.py, line 152, in 
>getOwner
> > (Object: mailPasswordTemplate)
> > ValueError: (see above)
> 
> By any chance does it say something to the effect of "Unpack tuple of
> incorrect size"?  If so, I suggest you add a "print owner" statement
> just before line 152 of Owner.py and tell us what it says.


Hi Shane, I apologize for the delay, been working on other aspects of it.
I added a print statement, and it prints [].
line 52 reads:
udb, oid = owner
Which makes sense that it would barf, since the list is zero-length.

Here is the code bit, with my print statement added in:
-
def getOwner(self, info=0,
 aq_get=aq_get, None=None, UnownableOwner=UnownableOwner,
 ):
"""Get the owner

If a true argument is provided, then only the owner path and id are
returned. Otherwise, the owner object is returned.
"""
owner=aq_get(self, '_owner', None, 1)
if owner is None: return owner

if info: return owner

if owner is UnownableOwner: return None
print owner
udb, oid = owner
root=self.getPhysicalRoot()
udb=root.unrestrictedTraverse(udb, None)
if udb is None: return SpecialUsers.nobody
owner = udb.getUserById(oid, None)
if owner is None: return SpecialUsers.nobody
return owner
--

The following patch seems to alleviate the problem, but I dunno if it affects anything 
else:
==
--- lib/python/AccessControl/Owned.py   Mon Sep  4 13:56:52 2000
+++ lib/python/AccessControl/Owned.py   Mon Sep  4 13:55:40 2000
@@ -149,6 +149,8 @@
 
 if owner is UnownableOwner: return None
 
+if len(owner)==0: return None
+
 udb, oid = owner
 root=self.getPhysicalRoot()
 udb=root.unrestrictedTraverse(udb, None)
===

Basically, I test for an empty list, and return None.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] MailHost, 2.2.1, and tracebacks

2000-09-01 Thread Shane Hathaway

Bill Anderson wrote:
> 
> OK, I've bee trailing this bug for quite some time, and haven't found a solution 
>other than not use 2.2.1 :(
> (snip)
>   File /local/ZopeSites/TestBed/lib/python/OFS/DTMLMethod.py, line 172, in __call__
> (Object: mailPasswordTemplate)
>   File /local/ZopeSites/TestBed/lib/python/DocumentTemplate/DT_String.py, line 528, 
>in __call__
> (Object: mailPasswordTemplate)
>   File /local/ZopeSites/TestBed/lib/python/Products/MailHost/SendMailTag.py, line 
>182, in render
> (Object: MailHost)
>   File /local/ZopeSites/TestBed/lib/python/OFS/DTMLMethod.py, line 194, in validate
> (Object: mailPasswordTemplate)
>   File /local/ZopeSites/TestBed/lib/python/AccessControl/SecurityManager.py, line 
>139, in validate
>   File /local/ZopeSites/TestBed/lib/python/AccessControl/ZopeSecurityPolicy.py, line 
>178, in validate
>   File /local/ZopeSites/TestBed/lib/python/AccessControl/Owned.py, line 152, in 
>getOwner
> (Object: mailPasswordTemplate)
> ValueError: (see above)

By any chance does it say something to the effect of "Unpack tuple of
incorrect size"?  If so, I suggest you add a "print owner" statement
just before line 152 of Owner.py and tell us what it says.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] MailHost, 2.2.1, and tracebacks

2000-08-31 Thread Bill Anderson

OK, I've bee trailing this bug for quite some time, and haven't found a solution other 
than not use 2.2.1 :(


In PortalMembership's acl_users folder's MailPassword Process ...
We have mailPasswordTemplate.

==



From: "&dtml-email_from_name;" <&dtml-email_from_address>
To: 
Subject: Membership reminder

Your password: 

Request made by IP  at 

Your password has been mailed.  It should arrive in your mailbox momentarily.

=

And when called via the mailPassword method I get:
===
Traceback (innermost last):
  File /local/ZopeSites/TestBed/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
  File /local/ZopeSites/TestBed/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /local/ZopeSites/TestBed/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: Transactional)
  File /local/ZopeSites/TestBed/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /local/ZopeSites/TestBed/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: mailPassword)
  File /local/ZopeSites/TestBed/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
(Object: mailPassword)
  File /local/ZopeSites/TestBed/lib/python/Products/PythonMethod/PythonMethod.py, line 
168, in __call__
(Object: mailPassword)
(Info: ((, 'Bill2',#Isnippedformcontents#), {}, 
None))
  File , line 10, in mailPassword
(Object: Transactional)
  File /local/ZopeSites/TestBed/lib/python/OFS/DTMLMethod.py, line 172, in __call__
(Object: mailPasswordTemplate)
  File /local/ZopeSites/TestBed/lib/python/DocumentTemplate/DT_String.py, line 528, in 
__call__
(Object: mailPasswordTemplate)
  File /local/ZopeSites/TestBed/lib/python/Products/MailHost/SendMailTag.py, line 182, 
in render
(Object: MailHost)
  File /local/ZopeSites/TestBed/lib/python/OFS/DTMLMethod.py, line 194, in validate
(Object: mailPasswordTemplate)
  File /local/ZopeSites/TestBed/lib/python/AccessControl/SecurityManager.py, line 139, 
in validate
  File /local/ZopeSites/TestBed/lib/python/AccessControl/ZopeSecurityPolicy.py, line 
178, in validate
  File /local/ZopeSites/TestBed/lib/python/AccessControl/Owned.py, line 152, in 
getOwner
(Object: mailPasswordTemplate)
ValueError: (see above)
===


The exact same code (copy->paste, also prior product) works under 2.2.0.
Also, for some reason, I have to have a MailHost in the acl_users folder, and that 
shouldn't be...I have one in root.

Grumpily, Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )