mirror of
https://github.com/Universal-Omega/DynamicPageList3
synced 2024-11-27 17:40:13 +00:00
Only check for buffer overflow (#223)
The other regex validation seems unnecessary.
This commit is contained in:
parent
18b9da6402
commit
7cf983cb03
|
@ -810,4 +810,5 @@ Many thanks to GreenReaper on GitHub for reporting and finding issues with core
|
|||
|
||||
# Version 3.5.2
|
||||
* Added support for PHP 8.0 and PHP 8.1
|
||||
* Added additional ReDoS security validation for `dplreplace` and enabled the `SecurityCheck-ReDoS` phan check
|
||||
* Enabled the `SecurityCheck-ReDoS` phan check
|
||||
* Added buffer overflow check for `dplreplace`
|
||||
|
|
|
@ -376,8 +376,8 @@ class Hooks {
|
|||
$pat = '`' . str_replace( '`', '\`', $pat ) . '`';
|
||||
}
|
||||
|
||||
// check for dangerous patterns
|
||||
if ( preg_match( '/(\(\?[:\!R0])|(\\\d)|(\\{\\d+\\,\\d+\\})|(\\[.*\\])|(\\?=)|(\\?!)|(\\?<=)|(\\?<!)/', $pat ) ) {
|
||||
// Check for buffer overflow
|
||||
if ( strlen( $pat ) > 1000 ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue