PluginProbe
The WP Remote WordPress Plugin / 4.79
The WP Remote WordPress Plugin v4.79
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | protect/base.php +5 -9 5.094.79 View file →
@@ -16,11 +16,11 @@
16 16 $ip = $_SERVER['REMOTE_ADDR'];
17 17 }
18 18
19 19 $ip = trim($ip);
20 - if (WPRHelper::safePregMatch('/^\[([0-9a-fA-F:]+)\](:[0-9]+)$/', $ip, $matches)) {
20 + if (preg_match('/^\[([0-9a-fA-F:]+)\](:[0-9]+)$/', $ip, $matches)) {
21 21 $ip = $matches[1];
22 - } elseif (WPRHelper::safePregMatch('/^([0-9.]+)(:[0-9]+)$/', $ip, $matches)) {
22 + } elseif (preg_match('/^([0-9.]+)(:[0-9]+)$/', $ip, $matches)) {
23 23 $ip = $matches[1];
24 24 }
25 25
26 26 return $ip;
@@ -25,12 +25,8 @@
25 25
26 26 return $ip;
27 27 }
28 28
29 - public static function isIPv6($ip) {
30 - return (false === filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) ? false : true;
31 - }
32 -
33 29 public static function hasIPv6Support() {
34 30 return defined('AF_INET6');
35 31 }
36 32
@@ -43,15 +39,15 @@
43 39 return $pton;
44 40 }
45 41
46 42 public static function _bvInetPton($ip) {
47 - if (WPRHelper::safePregMatch('/^(?:\d{1,3}(?:\.|$)){4}/', $ip)) {
43 + if (preg_match('/^(?:\d{1,3}(?:\.|$)){4}/', $ip)) {
48 44 $octets = explode('.', $ip);
49 45 $bin = chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]);
50 46 return $bin;
51 47 }
52 48
53 - if (WPRHelper::safePregMatch('/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/i', $ip)) {
49 + if (preg_match('/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/i', $ip)) {
54 50 if ($ip === '::') {
55 51 return "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
56 52 }
57 53 $colon_count = substr_count($ip, ':');
@@ -70,9 +66,9 @@
70 66
71 67 return strlen($ipv6_bin) === 16 ? $ipv6_bin : false;
72 68 }
73 69
74 - if (WPRHelper::safePregMatch('/^(?:\:(?:\:0{1,4}){0,4}\:|(?:0{1,4}\:){5})ffff\:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/i', $ip, $matches)) {
70 + if (preg_match('/^(?:\:(?:\:0{1,4}){0,4}\:|(?:0{1,4}\:){5})ffff\:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/i', $ip, $matches)) {
75 71 $octets = explode('.', $matches[1]);
76 72 return chr($octets[0]) . chr($octets[1]) . chr($octets[2]) . chr($octets[3]);
77 73 }
78 74