mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #65315
[Bug 1953541] Re: Behat: example.org is unreliable for anti-spam
The failings here only occur when there is DNS issues at example.org /
example.com
And looking at the answer section from dig:
dig example.org
;; ANSWER SECTION:
example.org. 33350 IN A 93.184.216.34
dig example.com
;; ANSWER SECTION:
example.com. 86400 IN A 93.184.216.34
They resolve to the same place so using one of the other may not give us
peace of mind - we just have to cope with their DNS being down / broken
once in a while.
The official documentation at https://www.iana.org/domains/reserved
mentions that these are the proper domains to use for this purpose, it
says:
IANA-managed Reserved Domains
Certain domains are set aside, and nominally registered to “IANA”, for
specific policy or technical purposes.
Example domains
As described in RFC 2606 and RFC 6761, a number of domains such as
example.com and example.org are maintained for documentation purposes.
These domains may be used as illustrative examples in documents without
prior coordination with us.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1953541
Title:
Behat: example.org is unreliable for anti-spam
Status in Mahara:
Expired
Bug description:
This feature is failing on the main branch.
./mahara_behat.sh rundebug settings/register_configuration.feature
And I press "Register"
And I should be on "/register.php"
And I should see "You have successfully [...snip...] processed."
The text "You have successfully [...snip...] processed." was not found anywhere in the text of the current page.
I added a breakpoint and took a look at the page. The form does
report the attached error, and the content of the form looks okay. The
error doesn't indicate which field is the issue either.
I tried adding a second institution and selecting that just in case.
It didn't change the outcome.
Further investigation has tracked this to the anti-spam we use. Turns
out the domain 'example.org' may not be the best to test against.
On htdocs/lib/antispam/AdvancedSpamTrap.php line 35 we check the
validity of the domain name by checking for MX, A, and AAAA records.
This was my local results:
gold@shipnet:~/Mahara/codereview/test/behat ((baa775acad...)) $ php -a
Interactive mode enabled
php > $domain = 'example.org';
php > echo (checkdnsrr($domain, 'MX'))?'Y':'N';
N
php > echo (checkdnsrr($domain, 'A'))?'Y':'N';
N
php > echo (checkdnsrr($domain, 'AAAA'))?'Y':'N';
N
php > $domain = 'example.com';
php > echo (checkdnsrr($domain, 'MX'))?'Y':'N';
N
php > echo (checkdnsrr($domain, 'A'))?'Y':'N';
Y
php > echo (checkdnsrr($domain, 'AAAA'))?'Y':'N';
N
php >
At this point I would be inclined to be swapping out instances of
`example.org` for `example.com` (or at least another domain we can
rely on) in the behat tests.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1953541/+subscriptions
References