Hi, i want to encrypt a string with an algorithm, like DES for example. I've tried many examples, published in Internet, but i get always the same error: Error Type: ImportError Error Value: import of "des" is unauthorized I don't know why i can't import "des", in spite of i have the Manager role. Can anyone help me, please? Bye.
I don't know why i can't import "des", in spite of i have the Manager role.
Most likely because 'des' might not be available in python on all platforms. If you trus the module is safe (should be), then you can add it by editing lib/python/Products/GlobalModules/__init__.py. Should look something like: from Products.PythonScripts.Utility import allow_module, allow_class from AccessControl import ModuleSecurityInfo, ClassSecurityInfo from Globals import InitializeClass allow_module('crypt') And maybe restart your zoe-server.. -jf
Error Type: ImportError Error Value: import of "des" is unauthorized
I don't know why i can't import "des", in spite of i have the Manager role.
Isn't it because python scripts are limited in zope? You should try an external method. Philippe
=?iso-8859-1?Q?Juan=5FGarc=EDa=5FGarc=EDa?= writes:
i want to encrypt a string with an algorithm, like DES for example. I've tried many examples, published in Internet, but i get always the same error:
Error Type: ImportError Error Value: import of "des" is unauthorized
I don't know why i can't import "des", in spite of i have the Manager role.
Can anyone help me, please? Search the mailing list archives!
There are excellent posts explaining how to make modules importable in Python scripts! Dieter
participants (4)
-
Dieter Maurer -
Jan-Frode Myklebust -
Juan García García -
Philippe Jadin