unsafe_images_rules plugin fix
"Eric Paynter" <[email protected]> Sat, 14 Jul 2018 11:44:00 -0700
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
I recently upgraded my php installation and found the unsafe_images_rules
was causing unsafe images to no longer works. Turns out it was using
eregi(), which is deprecated. Simply switched it for preg_match() and now
all seems to work. Here's my patch:
--- functions.php.orig 2018-07-14 11:36:07.648915558 -0700
+++ functions.php 2018-07-14 11:36:36.295868619 -0700
@@ -332,7 +332,7 @@
function unsafe_image_rules_link_string($str) {
global $unsafe_image_found_email, $Email_RegExp_Match;
- while (eregi('(' . $Email_RegExp_Match . ')', $str, $hits)) {
+ while (preg_match('(' . $Email_RegExp_Match . ')', $str, $hits)) {
$str = substr(strstr($str, $hits[0]), strlen($hits[0]));
if (! isset($unsafe_image_found_email[$hits[0]])) {
echo '?address=' .
-Eric
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel