Re: [Zope-dev] OFS.objectManager checking object Ids
In article [EMAIL PROTECTED], Jim Fulton [EMAIL PROTECTED] wrote: bad_id=ts_regex.compile('[^a-zA-Z0-9-_~\,\. ]').search #TS I think that it's a bad idea to allow '?'s in ids and am sorry if it was allowed. In general, I don't like to see characters in ids that need to be quoted. I'm not happy that ' ' was added, although I understand why. Could '=' be added to the allowed characters, please? It works fine that way, AFAICT, and it's handy if you want to reflect LDAP-like namespaces in a Zope application. And ZLDAPConnection support '=' in path components, so it seems kind of silly for Zope itself not to. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] OFS.objectManager checking object Ids
"Jay, Dylan" wrote: As I said, when the url is quoted there is no problem. http://azonia.auslabs.lucent.com/Auslabs/AuslabsFAQ/Where%20is%20X%3f causes no problems. The above object is sitting happily inside Zope with a question mark at the end. I had to let the bad_id check let it pass but is there any reason why it shouldn't? bad_id=ts_regex.compile('[^a-zA-Z0-9-_~\,\. ]').search #TS The .search was .match Changing it back restores the behavior, who changed it and why is the question? I can't find any reason why, atleast not right now. Maybe I need more sleep :), didn't remember the URL quoting stuff... David ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] OFS.objectManager checking object Ids
-Original Message- From: Jim Fulton [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 10, 2000 9:51 PM To: David C. Kankiewicz Cc: Jay, Dylan; '[EMAIL PROTECTED]' Subject: Re: [Zope-dev] OFS.objectManager checking object Ids "David C. Kankiewicz" wrote: "Jay, Dylan" wrote: As I said, when the url is quoted there is no problem. http://azonia.auslabs.lucent.com/Auslabs/AuslabsFAQ/Where%20is%20X%3f causes no problems. The above object is sitting happily inside Zope with a question mark at the end. I had to let the bad_id check let it pass but is there any reason why it shouldn't? bad_id=ts_regex.compile('[^a-zA-Z0-9-_~\,\. ]').search #TS The .search was .match Changing it back restores the behavior, who changed it and why is the question? I don't know who changed it, but the why is obvious. 'match' was clearly a bug, since it only found an invalid character if it was at the beginning of an id. I think that it's a bad idea to allow '?'s in ids and am sorry if it was allowed. In general, I don't like to see characters in ids that need to be quoted. I'm not happy that ' ' was added, although I understand why. It may seem like a wise idea not to allow such chars into an id but I'd to explore this issue a little more as I think it is not quite as trivial as it sounds. The proposition I'm putting forward is that, if Zope copes with it why not let it. In dtml your already have to quote things like sequence-item becuase its not valid python but people cope with that. What we are talking about is have a sensible match between what an item is and what its called. I know that that is what the title property is for however look at the example that lead me to this problem in the first place. I want an FAQ that people in my department can all add too. None of the existing FAQ's are good enough. They arn't flexible or customizable enough. So I decided to use ZWiki which is flexible and customizable. But ZWiki needs WikiNames which become the object ids. A FAQ contains questions. Questions don't make good wiki names but structured text lets me make anything into a WikiName eg [How do I turn a ZWiki into a collaborative FAQ?] So I create a dtml method that appends this text to the end of a wiki page and create the resulting question page (with the question mark in the id). This makes it a reasonably usable FAQ system with all the benifits of a ZWiki. People can move questions around my cutting and pasting. I can let people see who is editing what with a little bit of coding here and there. So without the question directly in the id I'm left with the "how to create a unique id" and then I have reference it within pages using the title anyway becuase I don't want people seeing the random ID. Why should I have to go to so much trouble when I can just call the object by the title anyway and Zope has no problem with it. It makes it easier for me and I'm sure it will make it easier for other uses to. Resorting to random names in urls is ugly and unneccerily complicated. If Zope fundumentally can't cope with strange ids then say so but I've seen no evidence of this. Anyway, thats my 2c worth. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] OFS.objectManager checking object Ids
This seems to be a new thing in Zope 2.2, however it is breaking functionality that I had before. I was able to add objects with ids that had a "?" in them. This gets quoted in links and seems to be handled fine by zope (both 2.2 and older versions). Why can't I have question marks in my objects then? Should I submit the inclusion of a the "?" as a valid char in and id as a bug? Dylan Jay Tel: +61 2 9886-8961 Avaya Communication FAX: +61 2 9352 9224 Level 5, 15 Talavera Road Mobile:+61 409 606 171 Nth Ryde, NSW, 2113 ICQ: 520341 AUSTRALIA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] OFS.objectManager checking object Ids
As I said, when the url is quoted there is no problem. http://azonia.auslabs.lucent.com/Auslabs/AuslabsFAQ/Where%20is%20X%3f causes no problems. The above object is sitting happily inside Zope with a question mark at the end. I had to let the bad_id check let it pass but is there any reason why it shouldn't? -Original Message- From: David C. Kankiewicz [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 10, 2000 3:52 PM To: Jay, Dylan Subject: Re: [Zope-dev] OFS.objectManager checking object Ids "Jay, Dylan" wrote: This seems to be a new thing in Zope 2.2, however it is breaking functionality that I had before. I was able to add objects with ids that had a "?" in them. This gets quoted in links and seems to be handled fine by zope (both 2.2 and older versions). Why can't I have question marks in my objects then? Should I submit the inclusion of a the "?" as a valid char in and id as a bug? The reason is related to the URL to your object could be misinterpreted as a 'get' method... Server/path_to_object/object?name=foo The '?' means place the names:values in REQUEST, if the object has a '?' in its id anything after it would be interpreted has such and zope would try to publish a object with the id minus the '?' and anything after it (which probably doesn't exist...). Did you ever run into the above problem with the id 'names?'? No pun intended ;). I curious, maybe you were using for just this reason? David Dylan Jay Tel: +61 2 9886-8961 Avaya Communication FAX: +61 2 9352 9224 Level 5, 15 Talavera Road Mobile:+61 409 606 171 Nth Ryde, NSW, 2113 ICQ: 520341 AUSTRALIA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )