--- a/wp/wp-trackback.php Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-trackback.php Fri Sep 05 18:52:52 2025 +0200
@@ -60,7 +60,14 @@
if ( $charset ) {
$charset = str_replace( array( ',', ' ' ), '', strtoupper( trim( $charset ) ) );
-} else {
+
+ // Validate the specified "sender" charset is available on the receiving site.
+ if ( function_exists( 'mb_list_encodings' ) && ! in_array( $charset, mb_list_encodings(), true ) ) {
+ $charset = '';
+ }
+}
+
+if ( ! $charset ) {
$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
}