mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 06:03:38 +09:00
Refine regex patterns to improve injection protection.
Simplified the regex patterns for detecting and preventing `sleep` and `benchmark` injections. This improves the accuracy and maintainability of the security checks in the member directory code.
This commit is contained in:
@@ -1710,8 +1710,8 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
$regexp_map = array(
|
||||
'/select(.*?)from/im',
|
||||
'/select(.*?)sleep/im',
|
||||
"/sleep\(\s*[\"'`]?\s*\d+\s*[\"'`]?\s*\)/im", // avoid any sleep injections
|
||||
"/benchmark\(\s*[\"'`]?\s*\d+\s*[\"'`]?\s*,.*\)/im", // avoid any benchmark injections
|
||||
"/sleep\([^)]+\)/im", // avoid any sleep injections
|
||||
"/benchmark\([^)]+\)/im", // avoid any benchmark injections
|
||||
'/select(.*?)database/im',
|
||||
'/select(.*?)where/im',
|
||||
'/update(.*?)set/im',
|
||||
|
||||
Reference in New Issue
Block a user