[Zope-dev] Re: characters allowed in object IDs
Dieter Maurer wrote: yuppie wrote at 2006-3-10 20:20 +0100: ... To support WebDAV as widely as possible, I would prefer to get rid of all id restrictions. I do not like to see new restrictions emerging... You just don't like it or do you know a better alternative? We need a way to make sure that object IDs can't mask browser views and resources. The current solution in Zope 3 is to reserve names starting with '+' and '@' for resources and views. _ is already disallowed at the beginning of an id. Could you use it to mark views/ressources? It's more easy to customize that stuff in Zope 3 than in Zope 2, but I doubt the default names used in Zope 3 will be changed. And I don't think it would be a good idea to introduce different naming conventions in Zope 2. Compared to Zope 2.8.1 and earlier this is no new restriction. In order to support WebDAV as widely as possible, I have removed almost all id restrictions quite some time ago. I hope that this will happen in the official Zope as well. The current state of affairs is not really justified. To reach that goal more fundamental changes are necessary. While the subject of this thread is more general, I just want to fix a bug. And I doubt the fix I proposed will make the WebDAV support much worse. Cheers, Yuppie ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: characters allowed in object IDs
yuppie wrote at 2006-3-13 10:07 +0100: ... In order to support WebDAV as widely as possible, I have removed almost all id restrictions quite some time ago. I hope that this will happen in the official Zope as well. The current state of affairs is not really justified. To reach that goal more fundamental changes are necessary. While the subject of this thread is more general, I just want to fix a bug. And I doubt the fix I proposed will make the WebDAV support much worse. It only is the wrong direction... It is a big deal to exchange local content with a CMS in a way as transparent as possible. WebDAV is the standard for this kind of integration. Many different tools may access the CMS via WebDAV and they have different ways to mark their temporary copies -- usually with some prefix or suffix. I do not know whether there are tools that use @ or + as prefix. However, I know that many different special characters are used for such purposes (., _, #, ...). Zope should have this way of integration (WebDAV) in mind and work towards its easy realization and not introduce things that are likely to make it more difficult (such as forbidding characters at the start of id). -- Dieter ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: characters allowed in object IDs
yuppie wrote at 2006-3-10 20:20 +0100: ... To support WebDAV as widely as possible, I would prefer to get rid of all id restrictions. I do not like to see new restrictions emerging... You just don't like it or do you know a better alternative? We need a way to make sure that object IDs can't mask browser views and resources. The current solution in Zope 3 is to reserve names starting with '+' and '@' for resources and views. _ is already disallowed at the beginning of an id. Could you use it to mark views/ressources? Compared to Zope 2.8.1 and earlier this is no new restriction. In order to support WebDAV as widely as possible, I have removed almost all id restrictions quite some time ago. I hope that this will happen in the official Zope as well. The current state of affairs is not really justified. -- Dieter ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: characters allowed in object IDs
yuppie wrote: Hi! As of Zope 2.8.2 (http://svn.zope.org/?rev=38738view=rev) the '@' character is allowed in object IDs. Zope 3 does not allow object IDs starting with '@' because those names are reserved for views. Five makes Zope 3 style views available in Zope 2, so IDs starting with '@' should be disallowed in Zope 2 as well. If there are no objections I'll fix that in Zope 2.8, 2.9 and trunk. There are several use cases for using an email as the user id. Especially when integrating to legacy systems. So http://localhost/plone/Members/[EMAIL PROTECTED] should be legal. Otherwise it is a pita. (Until it gets ok to it in Plone I have a monkeypatch for Plone that allows this, and it's pretty simple.) If you just want to prohibit id.startswith('@') it is fine by me. But prohibiting id.find('@') != -1 would suck. I cannot at the top of my head think of a case where @name is used... But if anyone else knows about it. Please speak up. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 42 96 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: characters allowed in object IDs
Max M wrote: yuppie wrote: As of Zope 2.8.2 (http://svn.zope.org/?rev=38738view=rev) the '@' character is allowed in object IDs. Zope 3 does not allow object IDs starting with '@' because those names are reserved for views. Five makes Zope 3 style views available in Zope 2, so IDs starting with '@' should be disallowed in Zope 2 as well. If there are no objections I'll fix that in Zope 2.8, 2.9 and trunk. [...] If you just want to prohibit id.startswith('@') it is fine by me. I didn't propose to revert revision 38738, just want to fix it by adding if id[:1] == '@': raise BadRequest('The id %s is invalid because it begins ' 'with @.' % id) So I count your reply as a +1. Cheers, Yuppie ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: characters allowed in object IDs
Dieter Maurer wrote: yuppie wrote at 2006-3-10 12:14 +0100: As of Zope 2.8.2 (http://svn.zope.org/?rev=38738view=rev) the '@' character is allowed in object IDs. Zope 3 does not allow object IDs starting with '@' because those names are reserved for views. Five makes Zope 3 style views available in Zope 2, so IDs starting with '@' should be disallowed in Zope 2 as well. If there are no objections I'll fix that in Zope 2.8, 2.9 and trunk. To support WebDAV as widely as possible, I would prefer to get rid of all id restrictions. I do not like to see new restrictions emerging... You just don't like it or do you know a better alternative? We need a way to make sure that object IDs can't mask browser views and resources. The current solution in Zope 3 is to reserve names starting with '+' and '@' for resources and views. Compared to Zope 2.8.1 and earlier this is no new restriction. Cheers, Yuppie ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: characters allowed in object IDs
yuppie wrote: Dieter Maurer wrote: To support WebDAV as widely as possible, I would prefer to get rid of all id restrictions. I do not like to see new restrictions emerging... You just don't like it or do you know a better alternative? We need a way to make sure that object IDs can't mask browser views and resources. The current solution in Zope 3 is to reserve names starting with '+' and '@' for resources and views. Compared to Zope 2.8.1 and earlier this is no new restriction. But that doesn't mean that the restriction was good in the first place. Naturally there will be some insane developers out there doing webdav, with @ having a special meaning, that will bite us in the ... future. Leading '_' gave problems. '@' in ids has caused problems. So there is no reason to expect that a leading '@' won't at some time. Only trouble is that it will be a problem in Zope 3 too. Now that Twisted is put in front of Plone, we can also expect it to be a problem when Zope is used as a server for other services. Eg. mirroring an imap folder structure from exchange. Which I am allready having some fun with in mxmImapClient. :-s -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 42 96 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )