Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

+ in url /zope object name

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


briansullivan at gmail

Apr 4, 2006, 9:04 AM

Post #1 of 10 (2393 views)
Permalink
+ in url /zope object name

I am running into the problem mentioned in:

http://mail.zope.org/pipermail/zope/2003-October/141868.html

I have "+" used in a directory name of some content generated outside
zope that I want to upload. Preserving the directory name is necessary
for the integrity of the data.

Why is "+" a prohibited name for a zope object? As a solution Andy
Mackay suggests modifying zope to allow "+" in a zope object name. Is
there a downside to this?
_______________________________________________
Zope maillist - Zope [at] zope
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 )


regebro at gmail

Apr 4, 2006, 9:28 AM

Post #2 of 10 (2261 views)
Permalink
Re: + in url /zope object name [In reply to]

On 4/4/06, Brian Sullivan <briansullivan [at] gmail> wrote:
> Why is "+" a prohibited name for a zope object? As a solution Andy
> Mackay suggests modifying zope to allow "+" in a zope object name. Is
> there a downside to this?

I think it is a reserved name in Zope3. + are there used for the views
that help create new objects. That could be a downside.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
_______________________________________________
Zope maillist - Zope [at] zope
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 )


briansullivan at gmail

Apr 4, 2006, 9:38 AM

Post #3 of 10 (2268 views)
Permalink
Re: + in url /zope object name [In reply to]

On 4/4/06, Lennart Regebro <regebro [at] gmail> wrote:
> On 4/4/06, Brian Sullivan <briansullivan [at] gmail> wrote:
> > Why is "+" a prohibited name for a zope object? As a solution Andy
> > Mackay suggests modifying zope to allow "+" in a zope object name. Is
> > there a downside to this?
>
> I think it is a reserved name in Zope3. + are there used for the views
> that help create new objects.


Seems like a strategic design mistake though doesn't it?
_______________________________________________
Zope maillist - Zope [at] zope
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 )


regebro at gmail

Apr 4, 2006, 3:08 PM

Post #4 of 10 (2274 views)
Permalink
Re: + in url /zope object name [In reply to]

On 4/4/06, Brian Sullivan <briansullivan [at] gmail> wrote:
> Seems like a strategic design mistake though doesn't it?

Which one? Calling adders "+" or creating objects called "+"? ;-)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
_______________________________________________
Zope maillist - Zope [at] zope
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 )


dieter at handshake

Apr 5, 2006, 10:35 AM

Post #5 of 10 (2271 views)
Permalink
Re: + in url /zope object name [In reply to]

Brian Sullivan wrote at 2006-4-4 12:04 -0400:
> ...
>Why is "+" a prohibited name for a zope object?

Almost surely, due to a stupidity:

Why would you want to use anything beside letters, numbers,
and characters from "-_~,.$()# " in ids?

You probably see a reason (as I do) but the Zope authors did not...


--
Dieter
_______________________________________________
Zope maillist - Zope [at] zope
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 )


dieter at handshake

Apr 5, 2006, 10:36 AM

Post #6 of 10 (2269 views)
Permalink
Re: + in url /zope object name [In reply to]

Brian Sullivan wrote at 2006-4-4 12:38 -0400:
>On 4/4/06, Lennart Regebro <regebro [at] gmail> wrote:
>> I think it is a reserved name in Zope3. + are there used for the views
>> that help create new objects.
>
>
>Seems like a strategic design mistake though doesn't it?

I agree with you...

However, Zope3 allows you to configure the rules.
Thus, you can allow names starting with '+'.


--
Dieter
_______________________________________________
Zope maillist - Zope [at] zope
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 )


briansullivan at gmail

Apr 5, 2006, 11:12 AM

Post #7 of 10 (2279 views)
Permalink
Re: + in url /zope object name [In reply to]

On 4/5/06, Dieter Maurer <dieter [at] handshake> wrote:
> Brian Sullivan wrote at 2006-4-4 12:38 -0400:
> >On 4/4/06, Lennart Regebro <regebro [at] gmail> wrote:
> >> I think it is a reserved name in Zope3. + are there used for the views
> >> that help create new objects.
> >
> >
> >Seems like a strategic design mistake though doesn't it?
>
> I agree with you...
>
> However, Zope3 allows you to configure the rules.
> Thus, you can allow names starting with '+'.
>

Starting with a "+"? What about containing a "+"?

What about Zope 2?

The reason this is an issue for me is that I have a whole bunch of
content that has directories using "+" in the name that I would like
to upload.
_______________________________________________
Zope maillist - Zope [at] zope
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 )


lists at zopyx

Apr 5, 2006, 11:23 AM

Post #8 of 10 (2271 views)
Permalink
Re: + in url /zope object name [In reply to]

--On 5. April 2006 14:12:15 -0400 Brian Sullivan <briansullivan [at] gmail>
wrote:

>>>
>
> Starting with a "+"? What about containing a "+"?
>
> What about Zope 2?
>
> The reason this is an issue for me is that I have a whole bunch of
> content that has directories using "+" in the name that I would like
> to upload.

Basically: things are as they are. If you want something different try to
patch the code as you mentioned in your first mail...patch it and try it
out.

-aj


-----------------------------------------------------------------------
- Andreas Jung ZOPYX Ltd. & Co KG -
- E-mail: info [at] zopyx Web: www.zopyx.com, www.zopyx.de -
-----------------------------------------------------------------------


tseaver at palladion

Apr 5, 2006, 4:20 PM

Post #9 of 10 (2266 views)
Permalink
Re: + in url /zope object name [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Jung wrote:
>
>
> --On 5. April 2006 14:12:15 -0400 Brian Sullivan
> <briansullivan [at] gmail> wrote:
>
>>>>
>>
>> Starting with a "+"? What about containing a "+"?
>>
>> What about Zope 2?
>>
>> The reason this is an issue for me is that I have a whole bunch of
>> content that has directories using "+" in the name that I would like
>> to upload.
>
>
> Basically: things are as they are. If you want something different try
> to patch the code as you mentioned in your first mail...patch it and try
> it out.

Zope maps URL traversal onto at least three separate kinds of things:

- object attributes

- container items

- software lookup (typically views)

On the filesystem, you only have to deal with *one* of these, which is
why there are no (or fewer) restrictions.

For non-containers, the clash between attribute and software lookup is
usually resolvable in an unambiguous way. However, for containers whos
items can be named arbitrarily by the users (your case), there is no
clear way to resolve whether a particular path element should refer to
an item or a view. Reserving some portion of the namespace for view /
software lookup (leading '@@' for views, leading '++<namespacename>++'
for other fancy traversal) is a compromise for coping with the problem.

Zope2 *doesn't* cope well with it, which led to *lots* of grief: the
classic example is that you add an object named 'target' and suddenly
your ZMI tabs all break. Zope2 applications have therefore often
imposed harsher restrictions on naming container items, trying to reduce
such conflicts.

Zope2 also had a policy (going back to Bobo) that "private" methods
(whose names traditionally start with '_' in Python) would not be
publishable, which is the origin of the restriction on leading underscores.

The case the OP referred to *is* pluggable in Zope3: the "adding" name
doesn't have to be '+', and you can register a different name-checker
component for your containers than the default one.


Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver [at] palladion
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

iD8DBQFENFDO+gerLs4ltQ4RApIkAJ4kuldPkavrLolxdoVxbQfm0ue9sQCfW7s3
LnwicjBdOUFQyYXEctVhsas=
=re4Q
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist - Zope [at] zope
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 )


dieter at handshake

Apr 6, 2006, 10:58 AM

Post #10 of 10 (2285 views)
Permalink
Re: + in url /zope object name [In reply to]

Brian Sullivan wrote at 2006-4-5 14:12 -0400:
> ...
>> However, Zope3 allows you to configure the rules.
>> Thus, you can allow names starting with '+'.
>>
>
>Starting with a "+"? What about containing a "+"?

In Zope3, you decide about the naming rules.

>What about Zope 2?

In Zope2, only a few special characters are allowed.

>The reason this is an issue for me is that I have a whole bunch of
>content that has directories using "+" in the name that I would like
>to upload.

You can easily extend the regular expression checking for bad ids.


I even removed almost all restrictions in our local Zope version
(only "/" and ";" is still forbidden). That was a bit more work,
as proper escaping is necessary.

--
Dieter
_______________________________________________
Zope maillist - Zope [at] zope
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 users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.