Changeset 40198
- Timestamp:
- 03/06/2017 01:58:45 PM (8 years ago)
- Location:
- branches/4.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.5
-
branches/4.5/src/wp-admin/includes/class-wp-press-this.php
r39972 r40198 721 721 */ 722 722 if ( empty( $_POST ) && ! empty( $data['u'] ) ) { 723 $data = $this->source_data_fetch_fallback( $data['u'], $data ); 723 if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) { 724 $data = $this->source_data_fetch_fallback( $data['u'], $data ); 725 } else { 726 $data['errors'] = 'missing nonce'; 727 } 724 728 } else { 725 729 foreach ( array( '_images', '_embeds' ) as $type ) { … … 1266 1270 'v' => ! empty( $data['v'] ) ? $data['v'] : '', 1267 1271 'u' => ! empty( $data['u'] ) ? $data['u'] : '', 1268 'hasData' => ! empty( $data ) ,1272 'hasData' => ! empty( $data ) && ! isset( $data['errors'] ), 1269 1273 ); 1270 1274 … … 1398 1402 <form method="GET"> 1399 1403 <label for="url-scan" class="screen-reader-text"><?php _e( 'Scan site for content' ); ?></label> 1400 <input type="url" name="u" id="url-scan" class="scan-url" value=" " placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />1404 <input type="url" name="u" id="url-scan" class="scan-url" value="<?php echo esc_attr( $site_data['u'] ) ?>" placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" /> 1401 1405 <input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="<?php esc_attr_e( 'Scan' ) ?>" /> 1406 <?php wp_nonce_field( 'scan-site' ); ?> 1402 1407 </form> 1403 1408 </div>
Note: See TracChangeset
for help on using the changeset viewer.