diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 1b2d29dc3b..d6645c6e0f 100644
|
|
|
final class WP_Customize_Manager { |
| 480 | 480 | return; |
| 481 | 481 | } |
| 482 | 482 | |
| 483 | | 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 ) ) { |
| | 483 | if ( ! wp_is_valid_uuid4( $this->_changeset_uuid ) ) { |
| 484 | 484 | $this->wp_die( -1, __( 'Invalid changeset UUID' ) ); |
| 485 | 485 | } |
| 486 | 486 | |
diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index 3923ca92ec..1762689c3c 100644
|
|
|
function wp_generate_uuid4() { |
| 5610 | 5610 | } |
| 5611 | 5611 | |
| 5612 | 5612 | /** |
| | 5613 | * Generate a random UUID (version 4). |
| | 5614 | * |
| | 5615 | * @param string $uuid |
| | 5616 | * |
| | 5617 | * @return bool The string is a valid UUID V4 or false on failure. |
| | 5618 | */ |
| | 5619 | function wp_is_valid_uuid4( $uuid ) { |
| | 5620 | return preg_match( '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $uuid ); |
| | 5621 | } |
| | 5622 | |
| | 5623 | /** |
| 5613 | 5624 | * Get last changed date for the specified cache group. |
| 5614 | 5625 | * |
| 5615 | 5626 | * @since 4.7.0 |