-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot get info for sa.gov.au #313
Comments
@gsouf it seems that you are using the v5 version which is EOL. As far as I am concerned you should use v6 for which you would get a clearer understanding of the expected behaviour. In v6 the following code throws an exception: <?php
use Pdp\Rules;
$rules = Rules::fromPath('path-to-your-local-copy-of-public-suffix-list.txt');
$rules->getICANNDomain('sa.gov.au');
//throw Pdp\UnableToResolveDomain: The public suffix and the domain name are is identical `sa.gov.au`. Like explained in #251
Hope this clarify your issue. PS: in the current state a way to resolve this is to either have |
@nyamsprod Thanks for the clear explanations and for the version notice. For the moment we bypass pdp for I understand that However, my knowledge is certainly limited on this topic but, it seems that there is an inconsistency in this list because it mixes things that you cannot browse and are purely reserved for registering a FQDN. Like obviously a tld Do you know if there is a way to distinct them somehow? What are you thinking for the method |
Again if you upgrade to v6 you will hopefully get your answer as it exposes more strict methods:
check https://github.com/jeremykendall/php-domain-parser#resolving-domains for more informations. the |
@gsouf Are you able to download www.sa.gov.au instead of sa.gov.au? |
@SaschaMai that would definitely work but that's not the desired behavior, because the issue is not limited to this domain, but to any domain in the psl. If I added a www in front of each domain then things like I'll first upgrade to v6, probably next week and leave a feedback here on how I solved the problem as soon as I have got it working |
@gsouf what is the problem of having In other words, you can never registered Reason why I said that the issue, if issue there is must be taken to the PSL repo and not to the current package 😉 |
@nyamsprod because the proposition was to add "www" in front of the string to validate. That means that if I'm trying to validate the string "com" I'd validate "www.com" that is valid, but does not make "com" alone valid. as for sa.gov.au it is an actual website and people have email addresses with sa.gov.au ([email protected]), so even if it's not registrable it's still used and it is a valid domain name. I'll try to add open a ticket in PSL repo but I'm not sure it's going anywhere |
@gsouf seems your issue has a relevant yet complicate issue already opened on the PSL repo see TL;DR: definitely an issue on the upstream public suffix list and not one this package can fix/resolve. |
Issue summary
We use pdp to determine whether a given url uses a valid domain name.
As per issue #251 the library does not allow to determine whether or not
sa.gov.au
is a valid hostname, when it is actually. Please visit it at https://sa.gov.au/Standalone code, or other way to reproduce the problem
Expected result
anything that helps to tell that
sa.gov.au
is a valid hostnameActual result
Happy to give contributions if required.
Thanks
The text was updated successfully, but these errors were encountered: