[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Need Help IMPORTANT KCookieJar PATCH [partial corection]
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2000-08-30 9:13:16
[Download RAW message or body]
On Wed, 30 Aug 2000, Dawit Alemayehu wrote:
> The other thing is the specific TLD check you have here is IMHO incorrect
> as there are loopholes I can easily find in it. For example, it would fail
> if my site name is "www.me.net". I know this might seem ridicilous, but it is
> possible. Instead, I think you should simply look at the length of the last
> part (partList[1]) and if it's length is two assume the remaining stuff is a
> TLD. Since all the two-dot based TLD's I know of end in only two characters
> at their top-most level, this should be okay unless of course someone can
> think of a way to make this fail. So IMO replacing
>
> if ((partList[1] != "com") && (partList[0].length() + partList[1].length()) < 6)
>
> with
>
> if( partList[1].length() == 2 )
Correction!! Should have been
if ( partList[0].length() + partList[1].length() < 5 )
so that the check would not fail on domains like the "www.msnbc.de" site
metioned in the old code would.
Regards,
Dawit A.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic