Changeset 3362225
- Timestamp:
- 09/16/2025 06:12:21 AM (6 months ago)
- Location:
- bitfire/trunk
- Files:
-
- 2 edited
-
bitfire-plugin.php (modified) (2 diffs)
-
src/util.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bitfire/trunk/bitfire-plugin.php
r3362211 r3362225 253 253 254 254 255 // make sure important WordPress calls are legitimate 256 // TODO: improve this by integrating to the main inspection engine 257 if (function_exists('BitFirePRO\wp_requirement_check') && !wp_requirement_check()) { 258 $request = $ins->_request; 259 block_now(31001, "referer", $request->referer, "new-user.php", 0)->run(); 260 } 261 262 255 263 // TODO: move this to -admin 256 264 if (CFG::enabled("pro_mfa") && function_exists("\BitFirePRO\sms")) { … … 591 599 } 592 600 593 // make sure important WordPress calls are legitimate594 // TODO: improve this by integrating to the main inspection engine595 if (function_exists('BitFirePRO\wp_requirement_check') && !wp_requirement_check()) {596 $request = $ins->_request;597 598 block_now(31001, "referer", $request->referer, "new-user.php", 0)->run();599 }600 601 601 602 602 // keep the config file synced with the current WordPress install -
bitfire/trunk/src/util.php
r3362088 r3362225 438 438 return ($j == false) ? "" : $j; 439 439 } 440 function contains(?string $haystack, $needle) : bool { if (is_array($needle)) { foreach ($needle as $n) { if (!empty($n) && strpos($haystack, $n) !== false) { return true; } } return false; } else { return strpos($haystack, $needle) !== false; } }440 function contains(?string $haystack, $needle) : bool { if (empty($haystack) || empty($needle)) { return false; } if(is_array($needle)) { foreach ($needle as $n) { if (!empty($n) && strpos($haystack, $n) !== false) { return true; } } return false; } else { return strpos($haystack, $needle) !== false; } } 441 441 function icontains(?string $haystack, $needle) : bool { if(is_array($needle)) { foreach ($needle as $n) { if (!empty($n) && stripos($haystack, $n) !== false) { return true; } } return false; } else { return stripos($haystack, $needle) !== false; } } 442 442 // return the $index element of $input split by $separator or '' on any failure
Note: See TracChangeset
for help on using the changeset viewer.