Comments (12)
same issue (s3.amazonaws.com) :(
- Deprecated: strlen(): Passing null to parameter nb 1 ($string) of type string is deprecated in <...>/registered-domain-libs/regDomain.class.php on lineย 69
- I have to strtolower the domain before ... is it expected ?(try on Rfitvintage.com)
(on php 8.1)
from registered-domain-libs.
@UnveilTech : I tried all 3 implementations with kinesis.us-east-1.amazonaws.com
and the results look good to me:
registered-domain-libs/PHP $ php test-regDomain.php kinesis.us-east-1.amazonaws.com
kinesis.us-east-1.amazonaws.com
registered-domain-libs/PHP $ php test-regDomain.php test.kinesis.us-east-1.amazonaws.com
kinesis.us-east-1.amazonaws.com
registered-domain-libs/Perl $ perl -I. test-regDomain.pl kinesis.us-east-1.amazonaws.com
kinesis.us-east-1.amazonaws.com
registered-domain-libs/Perl $ perl -I. test-regDomain.pl test.kinesis.us-east-1.amazonaws.com
kinesis.us-east-1.amazonaws.com
registered-domain-libs/C $ ./test-regdom kinesis.us-east-1.amazonaws.com
kinesis.us-east-1.amazonaws.com: kinesis.us-east-1.amazonaws.com
registered-domain-libs/C $ ./test-regdom test.kinesis.us-east-1.amazonaws.com
test.kinesis.us-east-1.amazonaws.com: kinesis.us-east-1.amazonaws.com
What exactly fails with NULL?
(on PHP 8.1.2 and perl 5, version 34)
from registered-domain-libs.
same issue (s3.amazonaws.com) :(
@Pascal76: as s3.amazonaws.com
is listed in https://publicsuffix.org/list/public_suffix_list.dat and is considered to be a public suffix according to the definition at https://publicsuffix.org/ : 'A "public suffix" is one under which Internet users can (or historically could) directly register names'.
This regdom-lib allows to detect registered domain names equal to the subdomain below a public suffix.
Because of the list record s3.amazonaws.com
you get as a result:
- s3.amazonaws.com is no registered domain
- sub.s3.amazonaws.com could be a registered domain
Looking at the request of an Amazon employee in publicsuffix/list#105 to add s3.amazonaws.com
to the public suffix list I think Amazon may have had a different requirement: as you can see at https://publicsuffix.org/learn/ in section "Uses" browsers e.g. restrict cookie settings with these public suffixes. It may be Amazon tried to force some restrictions with their detailed list of suffixes. And this may break the detection of the registered domain that in my view should be amazonaws.com
in case of s3.amazonaws.com
.
@lawells: you were the one that requested publicsuffix/list#105 back in 2016. Could you please clarify why Amazon had the need to have these detailed *.amazonaws.com public suffixes published?
from registered-domain-libs.
public function validDomainPart($domPart) {
// see http://www.register.com/domain-extension-rules.rcmx
$len = strlen($domPart);
There should be a check to avoid NULL for $domPart
from registered-domain-libs.
There should be a check to avoid NULL for $domPart
I just added it in ee64e44
from registered-domain-libs.
Hi,
$szDom is NULL, it should be "amazonaws.com"
bye Fred
from registered-domain-libs.
$szHost = "kinesis.us-east-1.amazonaws.com";
$szDom = getRegisteredDomain($szHost);
from registered-domain-libs.
$szDom is NULL, it should be "amazonaws.com"
$szDom is "kinesis.us-east-1.amazonaws.com" according to the explanation in #16 (comment).
Maybe it would be more precise to differ between
a) registered domain like amazonaws.com or dyndns.org
b) domain that can be used to restrict cookie settings for. Otherwise sites at *.amazonaws.com or *.dyndns.org could all collide/access cookies at amazonaws.com/dyndns.org
What's your use-case for getRegisteredDomain(...) ?
from registered-domain-libs.
What's your use-case for getRegisteredDomain(...) ?
$szDom = getRegisteredDomain("kinesis.us-east-1.amazonaws.com");
result is NULL for $szDom
from registered-domain-libs.
Are you sure you're using the latest implementation?
$registeredDomain = getRegisteredDomain("kinesis.us-east-1.amazonaws.com", $tldTree);
--> the result in $registeredDomain is "kinesis.us-east-1.amazonaws.com"
from registered-domain-libs.
Hi,
latest implementation does not return NULL anymore, that's good.
but it should return the master domain "amazonaws.com" instead of "kinesis.us-east-1.amazonaws.com", no ?
bye Fred
from registered-domain-libs.
but it should return the master domain "amazonaws.com" instead of "kinesis.us-east-1.amazonaws.com", no ?
@UnveilTech : yes, sure. Can you confirm that my explanation for this issue in #16 (comment) makes the problem clear?
from registered-domain-libs.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from registered-domain-libs.