mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-10 15:44:29 +00:00
Customize: Add wp_is_uuid() validation function with optional second $version=4 parameter to enforce v4 random UUIDs.
Props jonathanbardo. Fixes #39778. git-svn-id: https://develop.svn.wordpress.org/trunk@41388 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -488,7 +488,7 @@ final class WP_Customize_Manager {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! preg_match( '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $this->_changeset_uuid ) ) {
|
||||
if ( ! wp_is_uuid( $this->_changeset_uuid ) ) {
|
||||
$this->wp_die( -1, __( 'Invalid changeset UUID' ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user