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:kankie@thegrid.net] 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
"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
"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. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
In article <3992973D.EFD73924@digicool.com>, Jim Fulton <jim@digicool.com> 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.
participants (4)
-
David C. Kankiewicz -
Jay, Dylan -
Jim Fulton -
tsarnaļ¼ endicor.com