Changeset 14489
- Timestamp:
- 07/24/2025 01:38:04 AM (10 months ago)
- Location:
- sites/trunk/api.wordpress.org/public_html/dotorg/trac
- Files:
-
- 2 edited
-
oembed/index.php (modified) (2 diffs)
-
pr/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/oembed/index.php
r11614 r14489 25 25 header( 'X-WP-Embed: true' ); 26 26 27 $url = wp_unslash( $_REQUEST['url'] ?? '' ); 27 $url = $_REQUEST['url'] ?? ''; 28 $url = is_string( $url ) ? wp_unslash( $url ) : ''; 28 29 29 30 header( 'Allow: GET' ); … … 31 32 32 33 if ( 34 ! $url || 35 'GET' !== $_SERVER['REQUEST_METHOD'] || 33 36 // meta|core are the only tracs embedable. 34 37 // milestone|ticketgraph|ticket|changeset are the only endpoints allowable. 35 ! preg_match( '!^(?P<baseurl>https://(?P<trac>meta|core).trac.wordpress.org/)(?P<type>milestone|ticketgraph|ticket|changeset|query)([/?]|$)!i', $url, $m ) || 36 'GET' !== $_SERVER['REQUEST_METHOD'] 38 ! preg_match( '!^(?P<baseurl>https://(?P<trac>meta|core).trac.wordpress.org/)(?P<type>milestone|ticketgraph|ticket|changeset|query)([/?]|$)!i', $url, $m ) 37 39 ) { 38 40 header( 'HTTP/1.1 404 Not Found', true, 404 ); -
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/index.php
r11544 r14489 5 5 require __DIR__ . '/functions.php'; 6 6 7 $trac = preg_replace( '![^a-z]!', '', $_GET['trac'] ?? '' ); 7 $trac = $_GET['trac'] ?? ''; 8 $trac = is_string( $trac ) ? $trac : ''; 9 $trac = preg_replace( '![^a-z]!', '', $trac ); 8 10 $ticket = intval( $_GET['ticket'] ?? 0 ); 9 11 $author = wp_unslash( $_GET['author'] ?? '' ); 12 $author = is_string( $author ) ? $author : ''; 10 13 $authenticated = ! empty( $_GET['authenticated'] ); // Longer caches for logged out requests. 11 14
Note: See TracChangeset
for help on using the changeset viewer.