[Zope-dev] Zope Tests: 8 OK, 1 Failed
Summary of messages to the zope-tests list. Period Sun Nov 26 12:00:00 2006 UTC to Mon Nov 27 12:00:00 2006 UTC. There were 9 messages: 9 from Zope Unit Tests. Test failures - Subject: FAILED (failures=2) : Zope-2.8 Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:39:38 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006679.html Tests passed OK --- Subject: OK : Zope-2.6 Python-2.1.3 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:32:06 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006674.html Subject: OK : Zope-2.6 Python-2.3.6 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:33:36 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006675.html Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:35:08 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006676.html Subject: OK : Zope-2.7 Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:36:38 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006677.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:38:08 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006678.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:41:08 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006680.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:42:38 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006681.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Nov 26 21:44:08 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006682.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-PAS] PluggableAuthService colon-in-cookie bug
Hey guys, recently I discovered a bug (or a feature???!!) in the way credentials are stored in cookies with PluggableAuthService. When somebody includes a colon in his password, the authentication for this user doesn't work anymore because of this code in PluggableAuthService.plugins.CookieAuthHelper.extractCredentials() line 122: cookie_val = decodestring(unquote(cookie)) login, password = cookie_val.split(':') .. which will fail if there are more but one colons in cookie_val. So, basically, nobody with a colon in his loginname or password can login at zope anymore. My first suggestion of bugfixing this unwanted behaviour was cookie_val = decodestring(unquote(cookie)) login = cookie_val[:cookie_val.find(':')] password = cookie_val[cookie_val.find(':')+1:] .. but then I realized that there also can be colons in the loginname as well since it shouldn't be part of PAS' job to decide whether a loginname or password is valid or not (and, in fact, PAS does not check the validity of the credentials before deciding to join or split them by a colon...). So I wrote a bugfix, which solves this problem by encoding the loginname and password before delivering these to credentials-update plugins (which happens in PluggableAuthService.updateCredentials line 1080). In addition, credentials have to be separately decoded in CookieAuthHelper.extractCredentials. Patch for PluggableAuthService.py: 28a29 from base64 import encodestring 1080c1081,1083 updater.updateCredentials(request, response, login, new_password) --- updater.updateCredentials(request, response, \ encodestring(login), \ encodestring(new_password)) Patch for plugins/CookieAuthHelper.py 125,126c125,126 creds['login'] = login creds['password'] = password --- creds['login'] = decodestring(login) creds['password'] = decodestring(password) These bugfixes work very well but being aware that these are bugfixes on two different levels of the authentication process, I do not see any other possibility to fix this problem, because CookieAuthHandler extracts credentials from the request as well, which IMHO shouldn't be part of this plugin either... After trying to get in contact with Tres Seaver directly, I finally found this awesome news group to post on.. If somebody can help me out explaining this esoteric behaviour of PAS or can give me an advice to avoid this problem I would be very grateful! Regards, -dany ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope] Help! Can't Log Into ZMI!!
When you have access to the ssh on your server i think you can set an 'master password' I couldn't even pull up the ZMI password dialog box. But I figured it out. I changed IP addresses and needed to update that in the zope.conf because ZEO listens on port . I wonder why I can't just use the localhost address: 127.0.0.1 ? Doesn't seem to work. Nancy ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zdb
Paul Winkler wrote: On Fri, Nov 24, 2006 at 02:46:25PM +0100, Christian Steinhauer wrote: ... i cant use pdb on zopeĀ“s python script i think? Normally true, but you can google for Chris Withers' zdb product which allows debugging from scripts very nicely. http://www.simplistix.co.uk/software/zope/zdb Sadly doesn't work with .cpy's in Plohn... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] error with simple python script loop
Christian Steinhauer wrote: http://www.blunck.se/iehttpheaders/iehttpheaders.html What a nice tool. Now more debugging with some interesting results. ### for i in range(2): context.MailHost.send('bodytext', [EMAIL PROTECTED], [EMAIL PROTECTED], 'subj'+str(i)) ### This script produces: HTTP/1.1 204 No Content Moral of the story: if you want sane things to happen, make sure your script returns a string output. Otherwise you risk tickling some of the more arcane features of Zope 2's publisher. They include no content responses if you return None and even weirder things if you return a two-element tuple. This isn't a bug, you're doing something silly, stop doing it ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] error with simple python script loop
context.MailHost.send('bodytext', [EMAIL PROTECTED], [EMAIL PROTECTED], 'subj'+str(i)) ### This script produces: HTTP/1.1 204 No Content Moral of the story: if you want sane things to happen, make sure your script returns a string output. Otherwise you risk tickling some of the more arcane features of Zope 2's publisher. They include no content responses if you return None and even weirder things if you return a two-element tuple. This isn't a bug, you're doing something silly, stop doing it ;-) Here i must add that it is an test script for the list only, the real script which has produce the error is bigger and it has an output of string. But the part which is sending the mail has produce the double emails, so i debug this part. Here is a bit of the original script, so tell me again why i get the error, because it has an string output. ### recp_list = [] request.set('Query','SQL SELECT') for i in context.sql_query(): mMsg = 'test' mTo = str(i[m_to]) mFrom = str(i[m_from]) mSubj = str(i[l_subject]) context.MailHost.send(mMsg, mTo, mFrom, mSubj) recp_list.append(i[u_email]) recp_output = str(recp_list) mRet = 'E-Mails send to:br' + recp_output + 'brbr' return mRet ### This script is the part of the devil ;) It has produce the double emails, i have cut some lines codes to get it faster to understand. - cs ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] error with simple python script loop
This script is the part of the devil ;) It has produce the double emails, i have cut some lines codes to get it faster to understand. Have you tried what I posted before? I mean try to add to your script: container.REQUEST.RESPONSE.setHeader('content-type', 'text/html') I'm curious if this changes anything. -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] error with simple python script loop
Chris Withers wrote at 2006-11-27 16:16 +: ... Moral of the story: if you want sane things to happen, make sure your script returns a string output. In fact, an empty string would result in the same behaviour. Thus, the moral should be: make your your script does not return a Python false value. As returning nothing, means returning None which is a Python false value, this implies, return something. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] error with simple python script loop
Have you tried what I posted before? I mean try to add to your script: container.REQUEST.RESPONSE.setHeader('content-type', 'text/html') I'm curious if this changes anything. yes i test this and then the header is everytime 200 OK - so no problem. But i test this only with my 2 lines of code test script, not with the big application. Now the IE7 does it better i think, but i must test this next days. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )