Changeset 55990 for trunk/src/wp-includes/class-wp-http-cookie.php
- Timestamp:
- 06/22/2023 02:55:47 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-cookie.php
r55827 r55990 116 116 } 117 117 $this->path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '/'; 118 if ( '/' !== substr( $this->path, -1) ) {118 if ( ! str_ends_with( $this->path, '/' ) ) { 119 119 $this->path = dirname( $this->path ) . '/'; 120 120 } … … 203 203 204 204 // Host - very basic check that the request URL ends with the domain restriction (minus leading dot). 205 $domain = ( '.' === substr( $domain, 0, 1) ) ? substr( $domain, 1 ) : $domain;205 $domain = ( str_starts_with( $domain, '.' ) ) ? substr( $domain, 1 ) : $domain; 206 206 if ( substr( $url['host'], -strlen( $domain ) ) !== $domain ) { 207 207 return false;
Note: See TracChangeset
for help on using the changeset viewer.