History log of /web-php/include/email-validation.inc (Results 1 – 25 of 39)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 11081310 06-Dec-2023 Andreas Möller

Enhancement: Enable `unary_operator_spaces` fixer (#851)

* Enhancement: Enable unary_operator_spaces fixer

* Fix: Run 'make coding-standards'


# 57f505ed 22-Aug-2022 Andreas Möller

Enhancement: Enable and configure `concat_space` fixer

Closes GH-657.


# d9bcfed4 22-Aug-2022 Andreas Möller

Enhancement: Enable `array_syntax` fixer

Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-659.


# b575ebd4 15-Jul-2022 Andreas Möller

Enhancement: Include `*.inc` files (with exceptions)

Closes GH-662.


# 1b83fd7a 03-Jul-2022 Ayesh Karunaratne

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

* Replace `intval()` calls with `(int)` type cast

This is a micro-optimization because `intval()` is a function call, and the type cast is about 6 times fast.

* Replace `preg_replace` call that could be done with an `rtrim()` call

In `./error.php`, there is a `preg_replace('!/+$!', '', $URI);` call that essentially is equivalent to `rtrim()`, that both calls removing trailing slash characters in `$URI`.
The `rtim()` call is more legible and faster.

* Combine consecutive `str_replace` calls to a single `str_replace` call

* Use short ternary operator where possible

Improves code readability.

* Cascade various `else` statements where possible

Cleans up the code by removing unnecessary `else` blocks and moving the code to the parent context if the previous `if` block exits the function by either terminating the script, or with a `return` statement.

* Combine multiple `isset()` calls to a single `isset()`

`isset()` accepts multiple parameters and returns `true` only if all of the parameters are `isset`. It makes sense to combine multiple individual `isset` calls to a single call for better readability.

* Replace `for` loop with a `foreach` loop

* Remove unnecessary character escapes in regular expressions

Regular expression special characters are context-sensitive. For example, special characters such as `.` are not considered special within square braces (`[]`).
This removes several of such instances that certain characters are escaped, but it is not strictly necessary within the context. This improves the readability of the expression.

See more information at [PHP.Watch: Writing better Regular Expressions in PHP](https://php.watch/articles/php-regex-readability#reduce-escape)

* Remove unnecessary break statement

* Remove unnecessary PHP close tags

* Remove redundant JSON_ERROR_NONE check

Remove unnecessary `json_last_error() == JSON_ERROR_NONE` where the decoded object is inspected already.

Closes GH-603.

show more ...


# 0f95b8c7 30-Jun-2018 Peter Kokot

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
use

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.

show more ...


# 7be864b1 17-Aug-2017 Andreas Heigl

Adapts the validation to use filter_var

Everything else is then simply refinement


# c716ac3b 17-Aug-2017 Andreas Heigl

Alters email-verification

The current email-verification is completely based on regex that is not
up-to-date any more in regard to newer TLDs. For example the current
version checks

Alters email-verification

The current email-verification is completely based on regex that is not
up-to-date any more in regard to newer TLDs. For example the current
version checks whether the TLD is between 2 and 6 chars long which fails
for ".digital" and some other longer TLDs

I've altered it so that the host-check is done by actually checking for
an MX-record so host that currently validate against the regex will fail
in future when no MX is available.

The Address-Part is still matched against a Regex.

show more ...


# ed25fb4d 13-May-2016 danbrown

More mosquitoes to be swatted.


# 5cda0b89 13-May-2015 Christoph M. Becker

fix blacklisted() to treat $mosquitoes as literals (not regexps)


# d5032adb 23-Apr-2015 danbrown

Adding onto the spammer array....


# 52d14941 18-Dec-2014 danbrown

Wow. Lots of junk in the event submission trunk today.


# d3c80299 21-Aug-2014 danbrown

Another pesky mosquito....


# 815774f3 03-Jan-2014 danbrown

Bloody mosquitoes....


# 7771eba9 27-Aug-2013 danbrown

Still more of those darn BIT and ISIM mosquitoes.


# e2803570 04-Jun-2013 danbrown

Still more mosquitoes....


# 858e55d9 10-Apr-2013 Daniel P. Brown

Another mosquito. This one, Moroccan. A-Hassani, the Moroccan Mosquito. Sounds like a superhero.


# 2dca3094 01-Mar-2013 Daniel P. Brown

Another mosquito....


# c4cb7b90 18-Jan-2013 Daniel P. Brown

Yet another 'BIT' mosquito....


# 083185d3 08-Jan-2013 Daniel P. Brown

More mosquitoes....


# 112083a3 07-Nov-2012 Daniel P. Brown

Buzzzzz-bzz-bzzzzzzzzzzzzzzzzzzzz.... SWAT\!


# 5d58098d 03-Oct-2012 Daniel P. Brown

Ten more 'mosquitoes.' There were about 35 new SPAM events of 97 total entries this time. Neat.


# 847a948b 12-Sep-2012 Adam Harvey

Add cogzidel to the mosquito list (and fix the indentation on said list), per Daniel's request.


# 2678a6ff 15-Mar-2012 Daniel P. Brown

More lovely SPAM....


# a1ebb433 27-Feb-2012 Daniel P. Brown

Still more of these lovely SPAM-sending folks....


12