Giter Club home page Giter Club logo

registered-domain-libs's People

Contributors

aaronhurt avatar adamjacobmuller avatar djnym avatar jakubsuchy avatar ratelle avatar usrflo avatar zackw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

registered-domain-libs's Issues

Problem with amazonaws.com

Hi,
is that normal that none of amazonaws.com hosts are found ?
ex: kinesis.us-east-1.amazonaws.com
each time it gives NULL

bye Fred

Mislabeling of eTLD-`n`

As mentioned in publicsuffix/list#1872 (comment)

Multiple psl libraries share the same bug while handling wildcards.

I went over all the FOSS implementations in https://publicsuffix.org/learn/ , and I found 3 of them behave funny for wildcard domains. In particular:

Seems to all mislabel eTLD-n x [eTLD minus n] (with n from 0 to infinite), as an eTLD, if another eTLD y is defined as a subdomain of that x eTLD-n.

As an example publicsuffix2 behaviour with the following patch:

 // Linode : https://linode.com
 // Submitted by <[email protected]>
 members.linode.com
-nodebalancer.linode.com
+*.nodebalancer.linode.com
+*.linodeobjects.com
+ip.linodeusercontent.com

Example here:

291734330-d38c352b-b420-45fb-93dc-438ebbea2f02

Corrections erroru the document regDomain.inc.php

In PHP 5.4 gives errors in the document regDomain.inc.php, as line 42
$ signingDomainParts = split .....;
is obsolete.
I propose to change this string instrument regDomain.inc.php (PHP version) to:
The highlighted line in the picture-
edit
Line 42.

IDN Support suggestion

It seems any IDN can't get past the regexp in regDomain.class.php:

if (!preg_match("/^([a-z0-9])(([a-z0-9-])*([a-z0-9]))*$/", $domPart)) return FALSE;

If anybody's interested, the library could be augmented to support UTF8 letter characters by adding the \p{L} character set along with a-z0-9 and adding /u at the end:

if (!preg_match("/^([a-z0-9\p{L}])(([a-z0-9-\p{L}])*([a-z0-9\p{L}]))*$/u", $domPart)) return FALSE;

I tested it as such and it worked:

echo (new regDomain())->getRegisteredDomain("example.мон", false);

And it works for that IDN (.xn--l1acc):

example.мон

I could submit a pull request if nobody sees an issue

PHP version doesn't work, or am I missing anything?

require_once("registered-domain-libs/effectiveTLDs.inc.php");
require_once("registered-domain-libs/regDomain.inc.php");

getRegisteredDomain('subdomain.domain.co.uk');
// this print "co.uk"
getRegisteredDomain('subdomain.domain.co.uk', $tldTree);
// this print "co.uk"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.