Changeset 14366
- Timestamp:
- 01/21/2025 05:33:09 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-request.php
r14344 r14366 330 330 } 331 331 332 // Validate the locale is in an expected supported format, for all endpoints. 333 if ( 334 ! is_string( $this->locale ) || 335 ! preg_match( '!^[a-z]{2,3}(_([A-Z]{2}))?(_([a-z0-9]+))?$!', $this->locale ) 336 ) { 332 /* 333 * Validate the locale is in an expected supported format, for all endpoints. 334 * 335 * Note: Do not validate the locale is valid, as this will cause the endpoints to not 336 * fail for WordPress sites with malformed WPLOCALE constants on their site. 337 * By only validating it's a string, we're ensuring that only non-WordPress clients 338 * should ever hit a block due to invalid passed data. 339 */ 340 if ( ! is_string( $this->locale ) ) { 337 341 return false; 338 342 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)