Re: [Zope] Javascript obfuscator and Zope

2005-12-29 Thread David H

Jens Vagelpohl wrote:



On 29 Dec 2005, at 23:45, David H wrote:


Hi list,

I am wondering if anyone is obfuscating JavaScript  using a python  
script or product.  I did some googling but nothing cropped up.   
Seems like a nice idea unless the  realities of javascript  
obfuscation make the exercise pointless.



That exercise is pointless no matter what technology you use to  
implement it. What is your supposed use case, why do you think it  
makes any sense?


If you need processing that cannot be tampered with from the client  
side then pure server-side coding is preferable.


jens

_


Jens,

Thanks for the reply.  I kinda suspected the hostility to the idea.
Anyone else?

David

___
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] Javascript obfuscator and Zope

2005-12-29 Thread Jens Vagelpohl


On 29 Dec 2005, at 23:45, David H wrote:


Hi list,

I am wondering if anyone is obfuscating JavaScript  using a python  
script or product.  I did some googling but nothing cropped up.   
Seems like a nice idea unless the  realities of javascript  
obfuscation make the exercise pointless.


That exercise is pointless no matter what technology you use to  
implement it. What is your supposed use case, why do you think it  
makes any sense?


If you need processing that cannot be tampered with from the client  
side then pure server-side coding is preferable.


jens

___
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] Zope LDAP connection

2005-12-29 Thread Ricardo Alves

Einar Næss Jensen wrote:

On 12/30/05, Ricardo Alves <[EMAIL PROTECTED]> wrote:



Is there any product that features LDAP connections in Zope. Just like
ZMySQLDA for MySQL databases (not a user folder).

In a fast search, I found ZopeLDAP, but it was last released in 2000. Is
there someone working on ldap+zope "low level" stuff?



What exactly are your needs? How low do you need it to be?
If you just need to query an ldap base this is very easy to achieve
via external methods and python-ldap. May also be used to alter the
contents of an ldap base.





However, http://www.dataflake.org/software/ldapuserfolder may also be
used to alter the ldap database (at least I think so. Never tried)


Hi!

I need it to an archetypes ldap storage. CMFMember as an implementation 
(don't know about any other) but it uses LDAPUserFolder, and I think the 
storage should be more generic then that, i.e. should handle all kind of 
content, not only members.


That's why, although I admit this storage can be the base for this work 
(need a deeper look at it), I was asking if there are some working 
"LDAPConnnection" product...



thanks, and best regards,

--ricardo
___
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] Zope LDAP connection

2005-12-29 Thread Einar Næss Jensen
On 12/30/05, Ricardo Alves <[EMAIL PROTECTED]> wrote:

> Is there any product that features LDAP connections in Zope. Just like
> ZMySQLDA for MySQL databases (not a user folder).
>
> In a fast search, I found ZopeLDAP, but it was last released in 2000. Is
> there someone working on ldap+zope "low level" stuff?

What exactly are your needs? How low do you need it to be?
If you just need to query an ldap base this is very easy to achieve
via external methods and python-ldap. May also be used to alter the
contents of an ldap base.

However, http://www.dataflake.org/software/ldapuserfolder may also be
used to alter the ldap database (at least I think so. Never tried)

--
Einar Næss Jensen
http://einar.nidelven-it.no/einarblog
http://www.homemade.no
tlf: +47 90990249
___
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] Re: What's limiting my file uploads?

2005-12-29 Thread Florent Guillaume

Kirk Strauser wrote:

As soon as the length of the submission crosses the 7843 byte barrier,
though, it becomes empty:

  form

  cookies
  ...

I can't figure out what's going on.  In zope.conf, "cgi-maxlen" is unset
(and therefore should default to zero).  "http-header-max-length" defaults
to 8192, which is pretty close to 7843 plus a little overhead, but the problem
remained even after I increased that value to 32768.

Any idea why Zope seems to be limiting my file upload size to this script to
just under 8KB?


In your mail there's a method="post". You're sure you're actually 
executing this same code?


Otherwise no clue, I'd do a network trace to know what's really posted.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] Zope LDAP connection

2005-12-29 Thread Ricardo Alves

Hi!

Is there any product that features LDAP connections in Zope. Just like 
ZMySQLDA for MySQL databases (not a user folder).


In a fast search, I found ZopeLDAP, but it was last released in 2000. Is 
there someone working on ldap+zope "low level" stuff?



Thanks a lot,

Ricardo Alves
___
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] Javascript obfuscator and Zope

2005-12-29 Thread David H

Hi list,

I am wondering if anyone is obfuscating JavaScript  using a python 
script or product.  I did some googling but nothing cropped up.  Seems 
like a nice idea unless the  realities of javascript obfuscation make 
the exercise pointless.


Any thoughts?

David

___
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] Re: DateTime().Time() gets Insufficient Privileges error, why?

2005-12-29 Thread Jamie O'Keefe
Thanks Andreas and Jens for the helpful tip.

Jamie
___
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] Re: DateTime().Time() gets Insufficient Privileges error, why?

2005-12-29 Thread Jamie O'Keefe
Nevermind.  I later found that I could not call HTTPConnection from my
python script in Zope and ended up going straight to running it in
python 2.3.

Jamie

On 12/28/05, Jamie O'Keefe <[EMAIL PROTECTED]> wrote:
> I am trying to get the latest time in a Python Script.
>
> I declare:
>
>from DateTime.DateTime import DateTime
>
> But when I run:
>
>t = DateTime().latestTime()
>
> or
>
>t = DateTime().Time()
>
> I always get an Insufficient Privileges error.
>
> I have combed through the archives and the web and as far as I can
> tell this should work.  What am I doing wrong?
>
> Thanks!
>
> Jamie
___
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] What's limiting my file uploads?

2005-12-29 Thread Kirk Strauser
I have a very simple form on my site:

  
  
  Username
  Password
  File
  
  
  

It posts to a trivial Python script:

  request = container.REQUEST
  return request

For testing purposes, the contents of "username" and "password" are six
bytes long.  As long as the file specified in "contents" is short (7843
bytes or less), the "form section of the formatted request object looks
like:

  form
  username  'something'
  password  ''
  contents  

  cookies
  ...

As soon as the length of the submission crosses the 7843 byte barrier,
though, it becomes empty:

  form

  cookies
  ...

I can't figure out what's going on.  In zope.conf, "cgi-maxlen" is unset
(and therefore should default to zero).  "http-header-max-length" defaults
to 8192, which is pretty close to 7843 plus a little overhead, but the problem
remained even after I increased that value to 32768.

Any idea why Zope seems to be limiting my file upload size to this script to
just under 8KB?
-- 
Kirk Strauser
The Day Companies
___
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] Re: python build errors

2005-12-29 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Bear wrote:
> I installed python 2.3.5 in order to keep my zope happy. However, make test
> yeilded some unexpected errors:
> 
> 1 test failed:
> test_zipimport
> 35 tests skipped:
> test_aepack test_al test_audioop test_bsddb test_bsddb185
> test_bsddb3 test_cd test_cl test_crypt test_curses test_dbm
> test_dl test_email_codecs test_gdbm test_gl test_imageop
> test_imgfile test_linuxaudiodev test_macfs test_macostools
> test_mpz test_nis test_normalization test_ossaudiodev test_pep277
> test_plistlib test_rgbimg test_scriptpackages test_socket_ssl
> test_socketserver test_sunaudiodev test_timeout test_urllibnet
> test_winreg test_winsound
> 8 skips unexpected on linux2:
> test_dbm test_crypt test_gdbm test_rgbimg test_bsddb test_mpz
> test_audioop test_imageop
> make: *** [test] Error 1
> 
> 
> I don't know why these would have failed. Would these failures be a problem
> for zope?


At a guess, the skipped tests are due to a lack of libraries and headers
for the related functions.  I would install them (via the '-devel'
pacakges, if appropriate), and rebuild Zope.

The 'zipimport' failure may also be related to a missing library /
header;  without the traceback, we can't tell, however.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDtBOf+gerLs4ltQ4RAlp6AJ40yBJvj5dWcaTplcKxgUt38axqZgCcCI0J
96pkPRoUTuthiNZqlzHeav0=
=ggoD
-END PGP SIGNATURE-

___
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] Please help with DTML-in (newbie)

2005-12-29 Thread Alric Aneron
thanks you all!! This helped a lot!Tino Wildenhain <[EMAIL PROTECTED]> wrote: J Cameron Cooper schrieb:> Alric Aneron wrote:> >>  Hello, I am new to Zope and DTML.>> I am trying to use a python script to call a Z SQL method.  The python>> script also has a list that >> over. so my python script:>> -python script>> words = ['one', 'two']>> context.REQUEST.set('wordlist', wordlist)>> rs = context.myzsqlmethod()>> return rs[0,2]>> -z sql script:>> SELECT * FROM table>> WHERE>> >> column1 LIKE ('' OR>> column2 LIKE '') >> sequence-end> AND >> And dont use  in ZSQL Methods.In your example, use  instead.Even if you hardcode the wordlist, but even more if its comingfrom request somewhere.
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___
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] DateTime().Time() gets Insufficient Privileges error, why?

2005-12-29 Thread Andreas Jung



--On 29. Dezember 2005 11:57:08 +0100 Jens Vagelpohl <[EMAIL PROTECTED]> 
wrote:




On 29 Dec 2005, at 04:53, Jamie O'Keefe wrote:


I am trying to get the latest time in a Python Script.

I declare:

   from DateTime.DateTime import DateTime

But when I run:

   t = DateTime().latestTime()

or

   t = DateTime().Time()

I always get an Insufficient Privileges error.


Instead of trying to import DateTime just call ZopeTime on your  context,
which will give you back a DateTime object, like so:

t = context.ZopeTime().latestTime()



This also looks scary. Since you don't have to import DateTime you can use 
it really directly:


 t = DateTime().latestTime()

-aj



pgpZfemppssqb.pgp
Description: PGP signature
___
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] Change ZSQLMethod connection id

2005-12-29 Thread Tino Wildenhain
Fabio schrieb:
> Hi!
> I solved (partially) my problem: very thanks.
>
> I studied acquisition and then I understood your example.
>
> I've another problem (the last, I hope): I call some ZSQLMethod from
> Python scripts so I need to execute a command dynamically.
> example
>  I need to execute
> 'container.include.sql.%s.getX()' % container.REQUEST.SESSION['dbconn']
>
> but 'exec' is not allowed. Does exist another way or I have to write:
> if container.REQUEST.SESSION['dbconn'] == 'conn1':
> container.include.sql.conn1.getX()
> elif container.REQUEST.SESSION['dbconn'] == 'conn2':
> container.include.sql.conn2.getX()
> elif ...
>
> ?
>
> In ZPT pages I use python:path('python:container.%s.getX()' % var) without
> problem but I don't knoe how do the same thing in a script python.
>

Well, thats just python - I'd suggest skimming thru the python
tutorial at python.org at least.

You reach objects by getattr(parent,attributename)
And in Zope also via:

parent[attributename]

This should get you going I think.

Regards
Tino
___
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] DateTime().Time() gets Insufficient Privileges error, why?

2005-12-29 Thread Jens Vagelpohl


On 29 Dec 2005, at 04:53, Jamie O'Keefe wrote:


I am trying to get the latest time in a Python Script.

I declare:

   from DateTime.DateTime import DateTime

But when I run:

   t = DateTime().latestTime()

or

   t = DateTime().Time()

I always get an Insufficient Privileges error.


Instead of trying to import DateTime just call ZopeTime on your  
context, which will give you back a DateTime object, like so:


t = context.ZopeTime().latestTime()

jens

___
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] mxODBC config probs for MSSQL

2005-12-29 Thread Jens Vagelpohl


On 29 Dec 2005, at 01:20, Rob Jingle wrote:

Error message: ('IM003', 0, '[iODBC][Driver Manager]Specified driver
could not be loaded', 8222)


This does not look like a mxODBCZopeDA problem at all. You have  
problems in the layer underneath, the iODBC setup on that box.


I'm using the product with unixODBC and setting it up was easy using  
this howto:


http://www.unixodbc.org/doc/FreeTDS.html

After doing some research on which ODBC connection framework to use,  
iODBC or unixODBC, it became clear that unixODBC is better supported,  
and the unixODBC/FreeTDS packages that come with my distribution work  
without problems.


jens

___
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 )