diff -r 48c4eec2b7e6 -r 8c2e4d02f4ef wp/wp-trackback.php --- 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'; }