Skip to content
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

t-online mails are all marked as spam #44

Closed
vielhuber opened this issue Sep 12, 2021 · 6 comments
Closed

t-online mails are all marked as spam #44

vielhuber opened this issue Sep 12, 2021 · 6 comments
Labels

Comments

@vielhuber
Copy link

vielhuber commented Sep 12, 2021

The email provider t-online.de is widespread e.g. in Germany.

All form requests (checked in this case with Contact Form 7 against https://raw.githubusercontent.com/splorp/wordpress-comment-blacklist/master/blacklist.txt) are marked as spam when the customer enters a valid email address ending with @t-online.de.

Example code:

<?php
$input = 'test@t-online.de';
$blacklist = trim( file_get_contents('https://raw.githubusercontent.com/splorp/wordpress-comment-blacklist/master/blacklist.txt') );
foreach(explode("\n", $blacklist) as $blacklist__value) {
    $blacklist__value = trim($blacklist__value);
    $pattern = sprintf('#%s#i', preg_quote($blacklist__value, '#'));
    if(preg_match($pattern, $input)) {
        var_dump($pattern, $blacklist__value, $input);
        die('spam');
    }
}
die('ok');

I urgently recommend removing the following 2 lines from blacklist.txt to eliminate these false positives:

online.com
online.de
@splorp
Copy link
Owner

splorp commented Sep 13, 2021

Hi, David.

Thanks for bringing this to my attention. I’ll remove these two domain-related terms (along with a few more obvious ones that I found) in the next update.

@splorp splorp added the bug label Sep 13, 2021
@splorp
Copy link
Owner

splorp commented Sep 13, 2021

This issues has been resolved per commit 22ded9e

@splorp splorp closed this as completed Sep 13, 2021
@vielhuber
Copy link
Author

Thanks in advance.

One suggestion: Did you consider adding a test suite for this project which tests on every new release for false positives?

@splorp
Copy link
Owner

splorp commented Sep 13, 2021

It has crossed my mind, but I’ve never set up a test suite … they’re a bit out of my wheelhouse.

I’d appreciate any pointers or information on setting something like that up for this project, if that’s something you’d be interested in helping with.

@vielhuber
Copy link
Author

vielhuber commented Sep 14, 2021

I’d appreciate any pointers or information on setting something like that up for this project, if that’s something you’d be interested in helping with.

Yes, I can contribute by adding a testsuite in one of the following environments

  • php (phpunit 8)
  • javascript (for example jest)
  • bash (shunit2)

Do you have any preference or suggestions on these environments?

Personally I would make the testsuite very simple: just parse two folders consisting of text files, the folders could be named something like:

  • "false_positive"
  • "false_negative"

The test is successful if any string in any text file of "false_positive" is not detected by the txt list and any string in any text file of "false_negative" is detected by the txt list.

Then run that testsuite on GitHub Actions (before every merge).

That would be cool, what do you think?

@splorp
Copy link
Owner

splorp commented Sep 15, 2021

I’m most comfortable with PHP, but bash would work in a pinch.

This sounds like a good plan.

I’ll open this as a new issue, so we can track progress outside of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants