[Zope-DB] mxDateTime result

Andreas Jung Andreas Jung <lists@andreas-jung.com>
Wed, 30 Oct 2002 18:10:19 +0100


Maybe ;-) but there only a number of standard module regarded
as safe. And since mxDateTime is not part of the Zope/Python
it is treated  as any other 3rd party module and you must
grant the permission to the module.


-aj

--On Mittwoch, 30. Oktober 2002 17:49 +0100 "M.-A. Lemburg" 
<mal@lemburg.com> wrote:

> Andreas Jung wrote:
>> Use an external method or refer to the README.txt in the PythonScripts
>> folder.
>
> Isn't that a bit silly ? mxDateTime instances are immutable. There's
> nothing you could do to trick the system into any security problems.
>
>> --On Mittwoch, 30. Oktober 2002 16:40 +0100 Godefroid Chapelle
>> <gotcha@swing.be> wrote:
>>
>>> Hello,
>>>
>>> I am using ZFirebirdDA which returns mxDateTime instances in query
>>> results.
>>>
>>> At the moment, I have to make a double cast to be able to use the
>>> strftime method :
>>>
>>> DateTime(str(myresult)).strftime("%d/%m/%Y")
>>>
>>> I have to do that because I cannot access directly the strftime method
>>> of the mxDateTime instance.
>>>
>>> If I try it, I get
>>>
>>> Error Type: Unauthorized
>>> Error Value: You are not allowed to access strftime in this context
>>>
>>> Is there a way to 'security wrap' the mxDateTime instances in the DA so
>>> that I can access directly the mxDateTime attributes ?
>>>
>>> Thanks
>>> --
>>>
>>> Godefroid Chapelle
>>>
>>> BubbleNet sprl
>>> rue Victor Horta, 18 / 202
>>> 1348 Louvain-la-Neuve
>>> Belgium
>>>
>>> Tel + 32 (10) 459901
>>> Mob + 32 (477) 363942
>>>
>>> TVA 467 093 008
>>> RC Niv 49849
>>>
>>>
>>> _______________________________________________
>>> Zope-DB mailing list
>>> Zope-DB@zope.org
>>> http://lists.zope.org/mailman/listinfo/zope-db
>>
>>
>>
>>
>>
>>    ---------------------------------------------------------------------
>>   -    Andreas Jung                     http://www.andreas-jung.com   -
>>  -   EMail: andreas at andreas-jung.com                              -
>>   -            "Life is too short to (re)write parsers"               -
>>    ---------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Zope-DB mailing list
>> Zope-DB@zope.org
>> http://lists.zope.org/mailman/listinfo/zope-db
>
> --
> Marc-Andre Lemburg
> CEO eGenix.com Software GmbH
> _______________________________________________________________________
> eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
> Python Consulting:                               http://www.egenix.com/
> Python Software:                    http://www.egenix.com/files/python/
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db




    ---------------------------------------------------------------------
   -    Andreas Jung                     http://www.andreas-jung.com   -
  -   EMail: andreas at andreas-jung.com                              -
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------