[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Overly permissive hostname matching

From: Tim Ruehsen
Subject: Re: [Bug-wget] Overly permissive hostname matching
Date: Fri, 21 Mar 2014 10:03:19 +0100
User-agent: KMail/4.11.5 (Linux/3.13-1-amd64; KDE/4.11.5; x86_64; ; )

On Thursday 20 March 2014 23:43:08 Ángel González wrote:
> On 20/03/14 22:52, Tim Rühsen wrote:
> > I broke out the public suffix code together and created a first go (really
> > very quick, distcheck fails - couldn't figure out this evening).
> > 
> > https://github.com/rockdaboot/libpsl
> > 
> > The first step was a psl_is_tld() function.
> > There is a test case for some major things (wildcards, exceptions).
> So, your public api seems to be this:
> psl_ctx_t *psl_load_file(const char *fname);
> void psl_free(psl_ctx_t **psl)
> int psl_is_tld(const psl_ctx_t *psl, const char *domain)
> Fisrt, I wouldn't call the function is_tld(), not just because tlds
> simply won't have any dot inside, (just extract the last label in a DNS
> name)* since there are more ambiguous cases. I would name it
> is_public(), defining it as “one domain under which anyone* can register
> a subdomain”. Additionally, I think there should be a function to
> extract the public suffix from a given domain. Both functions should
> take a flags argument. The immediate use I foresee is to choose whether
> private registries should be taken into account or not. (a private
> registry is a domain used for the public but not owned by a registry,
> dyndns.org and blogspot.com are examples of that) * "anyone" understood
> as a random person unaffiliated with the owner of the parent domain,
> notwithstanding any condition that such "anyone" is required to fulfill
> in order to register it (such as residing in a given region or having
> payed certain fees). PS: It's funny to see 1994 rfc1591 talking about
> TLDs and saying «It is extremely unlikely that any other TLDs will be
> created.»

Thanks for your feedback.

Maybe you could just open issues (or even better, fork the repo, make your 
changes and create pull requests). That is much easier to maintain because it 
wastes time if I have to keep in mind the contents of the discussion here 
and/or to look it all up again when I find time for coding.

I agree with changing the function name and I agree that a function to extract 
the public suffix from a given domain is useful.

Is there anybody with time to brush up the autoconf stuff (just go through it, 
fix the warnings with ./autogen.sh, fix 'make distcheck'). ?

What about API docs - would Doxygen be oversized ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]