FILTER_SANITIZE_STRING deprecated
-
The plugin uses
FILTER_SANITIZE_STRINGwhich was deprecated in PHP 8.1 and removed in PHP 8.2+.File:
modules/deepl-translate-post.php
Line: 79Current code:
$nonce = filter_input( INPUT_GET, '_wpdeeplnonce', FILTER_SANITIZE_STRING );Suggested fix:
$nonce = filter_input( INPUT_GET, '_wpdeeplnonce', FILTER_SANITIZE_FULL_SPECIAL_CHARS );Or alternatively:
$nonce = isset( $_GET['_wpdeeplnonce'] ) ? htmlspecialchars( $_GET['_wpdeeplnonce'], ENT_QUOTES, 'UTF-8' ) : '';Impact: Sites running PHP 8.1+ will see deprecation warnings. Sites running PHP 8.2+ will experience errors.
Environment:
- WordPress: 6.9
- PHP: 8.3
- Plugin version: 2.5.2
Thank you!
Didier.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.