I18N: Add hardening for invalid meta lines in MO files.
Props swissspidy, pander. Fixes #61794. Built from https://develop.svn.wordpress.org/trunk@58922 git-svn-id: http://core.svn.wordpress.org/trunk@58318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cddaa30f95
commit
2531f22a15
|
@ -154,7 +154,7 @@ class WP_Translation_File_MO extends WP_Translation_File {
|
|||
// Metadata about the MO file is stored in the first translation entry.
|
||||
if ( '' === $original ) {
|
||||
foreach ( explode( "\n", $translation ) as $meta_line ) {
|
||||
if ( '' === $meta_line ) {
|
||||
if ( '' === $meta_line || ! str_contains( $meta_line, ':' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58921';
|
||||
$wp_version = '6.7-alpha-58922';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue