|
From: Jonathan S. <jn...@ge...> - 2006-04-12 09:21:39
|
On Tue, 2006-04-11 at 17:21, SourceForge.net wrote: > Bugs item #1468670, was opened at 2006-04-11 16:21 > The SetCookieDomain routine contains the following list > of acceptable domain extensions: >=20 > .com|.edu|.net|.org|.gov|.mil|.int >=20 > However, here is a list of currently approved extensions: >=20 > http://www.norid.no/domenenavnbaser/domreg.html >=20 > I understand that the original MSA cookielib library, > upon which this one is based, was written back when > there were only a handful of approved extensions. It > nevertheless poses a current problem.=20 >=20 > This limitation is not mentioned in the README. If it > were, I would have placed this in Feature Requests.=20 >=20 Actually the problem isn't so much with the list of top level domains in the first regular expression (although this is obviously totally obsolete itself as there are now more gTLDS and not all of them are three characters - such as .info and .name) but with the na=C3=AFve assumption in the second clause that the country specific domains are all subdivided in a similar manner as the .uk domain (e.g. .co.uk, .ac.uk and so forth) so the regular expression requires something of the form of .foo.co.uk with three dots in it, this is far from being a universal convention among country registries as you have noted with the .tv domain (but just from ones I have seen today also .eu, .ch and so forth). To be honest I'm inclined to make the test for a valid domain far less specific and test for a dot followed by at least two alphanumerics, dash or dot a dot and then at least two alphabetic characters, something like: /\.[\w\.-]{2,}\.[a-z]{2,}$/i though I'm sure someone could come up with something better. /J\ --=20 This e-mail is sponsored by http://www.integration-house.com/ |