zsql-based ZPT put processor in infinite crawling

Bug #143704 reported by mohamed banaouas
2
Affects Status Importance Assigned to Milestone
Products.ZSQLMethods
Invalid
Medium
Unassigned

Bug Description

sql_data is a ZSQL with no parameter ('Select SOME_DATE From SOME_TABLE') returning single row (firebird 1.5, kinterbasedb).

this works well:
<div tal:repeat="result here/sql/sql_data" >
  <span tal:define = "fdate python:result.SOME_DATE"
  tal:replace="fdate">Date goes here</span>
</div>

but this put processor in infinite crawling
<div tal:repeat="result here/sql/sql_data" >
  <span tal:define = "fdate python:DateTime(result.SOME_DATE).strftime('%m %d %Y')"
  tal:replace="fdate">Date goes here</span>
</div>

and this shows authentification prompt that if not filled gives this error:
Error Type: Unauthorized
Error Value: You are not allowed to access 'strftime' in this context
<div tal:repeat="result here/sql/sql_data" >
  <span tal:define = "fdate python:result.SOME_DATE.strftime('%m %d %Y')"
  tal:replace="fdate">Date goes here</span>
</div>

Tags: bug zope
Revision history for this message
Andreas Jung (ajung) wrote :

Are you sure that this issue is not directly related to the DA itself?

Revision history for this message
mohamed banaouas (mbanaouas) wrote :

I would like to be sure about it.
Can you suggest me a test method ? thanks.

>Comment - Entry #2 by ajung on May 18, 2006 12:21 am
>Are you sure that this issue is not directly related to the DA
>itself?

Revision history for this message
Paul Winkler (slinkp) wrote :

I tested all three examples with ZMySQLDA 2.0.8.
No such problems.

What type does kinterbasedb return for datetime fields? ZMySQLDA wraps them as zope's DateTime.DateTime.
It looks like kinterbasedb is returning something that A) DateTime can't handle in its __init__, which would be a Zope bug - nothing should make that "infinite crawling"; and B) doesn't have security declarations, so you're not allowed to call its strftime() methdod in restricted code.

Revision history for this message
Jens Vagelpohl (dataflake-deactivatedaccount-deactivatedaccount) wrote :

No reply in 3,5 years, marking as incomplete

Changed in zope2:
status: New → Incomplete
assignee: nobody → Jens Vagelpohl (jens-dataflake)
affects: zope2 → products.zsqlmethods
Revision history for this message
Colin Watson (cjwatson) wrote :

The products.zsqlmethods project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/products.zsqlmethods.

Changed in products.zsqlmethods:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.