Re: [Zope] Re: Handling login failures

2006-01-13 Thread David Hassalevris

Håkan Johansson wrote:



On Jan 13, 2006, at 00:32, Dennis Allison wrote:





A more usual solution to this issue is to insert a delay after the third
and subsequent failures.  You, of course, need a policy for removing the
delay (successful login or N minutes following the last attempt).




Yes, I have been thinking the same thing. It would be much less work 
for the admin of the system.

Thanks for the tip though :)

_


Of course if you enforced longer passwords you can  achieve a similar 
result.  You dont slow time down between authentication events (like 
Dennis suggests) but you add the amount of time needed to guess a 
password.  So (slow Auth reponsies + tries) can approximate (fast Auth 
responses + alot more tries)



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] css not working in rewrite

2006-01-13 Thread Tino Wildenhain
Kedar Dash schrieb:
> Dear Tino,
> 
>  
> 
> Thank you very much for your response. The site screen shot is given
> below. Even if I specify the server name the result is the same.
> 
>  
> 
> If I assess the site with it ip address http://:/  name> it works fine.

*yuck* I'm not speaking about screenshots! I want you to look into
the HTML _source_ in your browser :-) See where the stylesheet link
is and where it points to.

What is /instance? You did not specify /instance in your screenshot
nor in the rewrite rule.

And btw. be very carefull when browsing around with InternetExplorer.
(Even better dont use it)

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] wrong directoy in Control_Panel.Products.XXXX.home

2006-01-13 Thread Luca Olivetti

En/na Martijn Pieters ha escrit:

On 1/12/06, Luca Olivetti <[EMAIL PROTECTED]> wrote:

Everything has been working fine (apart for the breakage of
CMFQuickInstaller) but I wonder if this is the intended behavior and if
there is better way to update the information in Control_Panel (touching
__init__.py in the offending products and restarting zope didn't help, I
had to remove the products from the Control_Panel and restart zope).


I suspect that the .pyc files may still hold the old paths; remove the
.pyc files and restart to have them recreated, or used the Python
standard library script compileall.py to recreate these files.


I grepped the pyc files for the old path and I could not find it 
anywhere, so the path must be stored exclusively in the zodb.
Besides, this wouldn't explain the wrong path for the products included 
with zope.


Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
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] import error

2006-01-13 Thread Paul Winkler
On Wed, Jan 11, 2006 at 03:00:43PM -0700, David Bear wrote:
> thanks for the info. I went and actually read the help text on the
> import/export screen where it states:
> 
> ==
> 
> You may import Zope objects which have been previously exported to a file,
> by placing the file in the "import" directory of your Zope installation on
> the server. You should create the "import" directory in the root of your
> Zope installation if it does not yet exist.
> 
> Note that by default, you will become the owner of the objects that you are
> importing. If you wish the imported objects to retain their existing
> ownership information, select "retain existing ownership information".
> ===
> 
> does this mean I create a directory named 'import' at the instance home?

It should be there already, it's created by mkzopeinstance.py.

-- 

Paul Winkler
http://www.slinkp.com
___
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] request.set('AUTHENTICATED_USER',...

2006-01-13 Thread Brian Brinegar
We are running Zope 2.6.x and I noticed yesterday that I could do the
following:

  acl_users = container.acl_users
  user = acl_users.getUser('test_user')
  request.set('AUTHENTICATED_USER',user)
  print request.AUTHENTICATED_USER.getUserName()

This isn't a huge deal since it doesn't seem to change the permissions
available to the user. But many of our scripts rely on
AUTHENTICATED_USER.getUserName() to return the actual logged in user. Is
this addressed in later versions of Zope? Is there a better way to get
the current user's user name?

We allow untrusted developers on our Zope server and this may allow them
to exploit certain systems.

-Brian
___
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] Precondition on images saved in a localfs folder

2006-01-13 Thread Dieter Maurer
Bruno Grampa wrote at 2006-1-10 23:42 +0100:
>if i upload an image in the ZOBD as a file i have the precondition if i 
>do the same in the localfs folder no. Do you know why?

The files in an "localfs" folder are only temporarily wrapped
as Zope objects. The wrapper is destroyed at the request end.
You cannot store persistent data on them (e.g. a precondition).

-- 
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] No more CR/LF support in PythonScripts with Zope 2.9.0

2006-01-13 Thread Dieter Maurer
Patrick DECAT wrote at 2006-1-10 15:41 +0100:
>I just upgraded my application from Zope 2.8.5 to Zope 2.9.0 and
>noticed that PythonScript doesn't support CR/LF line endings anymore
>(a la Windows).
>Converting my scripts to the Unix format fixes the problem.
>
>Is this new behaviour intented ?

I know that this behaviour occurs when you use Python 2.4.x.

Did you switch the Python version as well?


-- 
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] Help me!

2006-01-13 Thread Dieter Maurer
Bruno Grampa wrote at 2006-1-9 23:39 +0100:
>i'm building a site to sell images (this is the concept, the reality is
>different...).
>All the images are in a directory mapped through LocalFS product.
>For every image i have a record in a SQL table with all the basic
>informations: author, name of the file, cost.
>
>What i haven't understood is how to block users from getting images if
>they have not enough credit to buy them.

You drastically restrict access to the "LocalFS" content (e.g. by
granting the "Access contents information" and "View" permissions
only for "Manager") and provide access to it via a Python Script
with proxy role "Manager".
This script can check any conditions you would like to be fulfilled
before it grants access.


-- 
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] wrong directoy in Control_Panel.Products.XXXX.home

2006-01-13 Thread Dieter Maurer
Luca Olivetti wrote at 2006-1-12 14:55 +0100:
>A while ago I changed the directory of my zope instance. I also changed 
>the zope directory (started with zope 2.8.1, now running 2.8.4). Today I 
>noticed that the CMFQuickInstaller failed to get the version and the 
>readme of various products.
>It happens that CMFQuickInstaller uses 
>Control_Panel.Products.getObj(id).home to determine the product's 
>directory and then reads the version.txt file from there.
>However many products had the old directory name stored in home (like 
>/usr/local/zope-2.8.1-final instead of /usr/local/zope-2.8.4-final, or 
>the directory I used before changing the name).

Zope's behaviour in handling product updates below "Control_Panel.Products"
is very difficult to understand.

Almost surely, it will help when you delete all "closed" products
there and then restart Zope. The restart will recreate the product objects
for installed products -- hopefully with the correct "home" attribute.


-- 
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] CPU architecture and Zope

2006-01-13 Thread Dieter Maurer
Andreas Jung wrote at 2006-1-10 06:59 +0100:
> ...
>A single Python process also a multi-threaded Python application can never 
>run on multiple CPUs.

This means as long as it continues executing Python code.
However, Python often calls non Python code (e.g. "C" or "C++" implemented
extensions) and it may release the "GIL" (Global Interpreter Lock)
to allow multiple CPUs to be exploited.

It happens not to frequently that such C extensions are CPU bound.

Nevertheless, a dual core CPU might be an advantage, if your Zope
needs additional services such as Apache, Squid or (especially) databases.
The second CPU can then be used to run these services while Zope occupies
a single one.

And, as other already suggested, you can have 2 Zopes and a ZEO on
your dual core host.

-- 
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] No more CR/LF support in PythonScripts with Zope 2.9.0

2006-01-13 Thread Patrick Decat
On 1/13/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
> Patrick DECAT wrote at 2006-1-10 15:41 +0100:
> >I just upgraded my application from Zope 2.8.5 to Zope 2.9.0 and
> >noticed that PythonScript doesn't support CR/LF line endings anymore
> >(a la Windows).
> >Converting my scripts to the Unix format fixes the problem.
> >
> >Is this new behaviour intented ?
>
> I know that this behaviour occurs when you use Python 2.4.x.
>
> Did you switch the Python version as well?

Yes, I did.

Thanks for the information.

Best regards,
Patrick.
___
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] Retrieve zope.conf path

2006-01-13 Thread Gabriel Genellina

Hello

How could I retrieve the path to the config file used to start a running 
instance?
I want to put other config stuff in the same directory, and I would like a 
safe way to obtain such directory.
I could use INSTANCE_HOME/etc but since the config file name can be 
specified in the command line, it might not be there.



Gabriel Genellina
Softlab SRL 


___
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] ANN: ZSyncer 0.7.1-beta1 released

2006-01-13 Thread Carlos de la Guardia
Hi,

we just installed Zsyncer 0.7.1-beta1 on a couple of our servers and
have run into some problems with page template synchronization. Some
items that have different time stamps on the server and on the
development machines show on th sync screen as synchronized even when
they are different. Then if we do a 'get' from the client, it fetches
the file but the objects now appear as unsynchronized! We are using
Zope 2.8.0 on the clients (Windows) and Zope 2.8.4 on the server
(Linux), could this be the problem?

Thanks a lot.

Carlos de la GuardiaOn 12/22/05, Paul Winkler <[EMAIL PROTECTED]> wrote:
ZSyncer 0.7.1-beta1 ReleasedZSyncer is a Zope 2 product that allows you to synchronize and compareobjects from one zope (source) to another (destination). It is a lotmore convenient than the old manual export / transfer / import
procedure.Version 0.7.1-beta1 (2005/12/22) is available for download fromsourceforge:http://sourceforge.net/project/showfiles.php?group_id=28073
This is a beta of a minor bugfix release. The fixes are all UI-related,and thus 0.7.1 should interoperate well with 0.7.0.I encourage everybody using (or thinking of using) 0.7.0 to upgrade to
0.7.1 so we can get some feedback and get another stable release outsoon.Thanks!--Paul Winklerhttp://www.slinkp.com___
Zope maillist  -  Zope@zope.orghttp://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 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] Retrieve zope.conf path

2006-01-13 Thread Fred Drake
On 1/13/06, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> How could I retrieve the path to the config file used to start a running
> instance?
> I want to put other config stuff in the same directory, and I would like a
> safe way to obtain such directory.
> I could use INSTANCE_HOME/etc but since the config file name can be
> specified in the command line, it might not be there.

If you're using Zope 2.9, the configuration schema allows adding
additional sections.  Documentation still needs to be written (unless
someone snuck it in while I wasn't looking), but information can be
found in the main configuration schema in
lib/python/Zope2/Startup/zopeschema.xml.

That would get around the location issue, and let you add
configuration settings so you can refer to additional data files as
well, if any are needed.  Explicit references beat implicit sniffing
of location!


  -Fred

--
Fred L. Drake, Jr.
"There is no wealth but life." --John Ruskin
___
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 )