mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #64459
[Bug 1953541] Re: Behat: example.org is unreliable for anti-spam
Do we need to have the spam settings set for this test? Both example.org
and example.com are domains that can be used for illustrative purposes.
** Changed in: mahara
Status: New => Incomplete
--
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:
Incomplete
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