Changeset 51626 for trunk/src/wp-admin/includes/file.php
- Timestamp:
- 08/17/2021 12:14:20 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r51300 r51626 1127 1127 } 1128 1128 1129 $url_filename = basename( parse_url( $url, PHP_URL_PATH ) ); 1129 $url_path = parse_url( $url, PHP_URL_PATH ); 1130 $url_filename = ''; 1131 if ( is_string( $url_path ) && '' !== $url_path ) { 1132 $url_filename = basename( $url_path ); 1133 } 1130 1134 1131 1135 $tmpfname = wp_tempnam( $url_filename ); … … 1213 1217 1214 1218 $signature_url = false; 1215 $url_path = parse_url( $url, PHP_URL_PATH ); 1216 1217 if ( '.zip' === substr( $url_path, -4 ) || '.tar.gz' === substr( $url_path, -7 ) ) { 1219 1220 if ( is_string( $url_path ) && ( '.zip' === substr( $url_path, -4 ) || '.tar.gz' === substr( $url_path, -7 ) ) ) { 1218 1221 $signature_url = str_replace( $url_path, $url_path . '.sig', $url ); 1219 1222 } … … 1244 1247 1245 1248 // Perform the checks. 1246 $signature_verification = verify_file_signature( $tmpfname, $signature, basename( parse_url( $url, PHP_URL_PATH ) ));1249 $signature_verification = verify_file_signature( $tmpfname, $signature, $url_filename ); 1247 1250 } 1248 1251
Note: See TracChangeset
for help on using the changeset viewer.