Changeset 40197
- Timestamp:
- 03/06/2017 01:57:21 PM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-admin/includes/class-wp-press-this.php
r39971 r40197 722 722 */ 723 723 if ( empty( $_POST ) && ! empty( $data['u'] ) ) { 724 $data = $this->source_data_fetch_fallback( $data['u'], $data ); 724 if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) { 725 $data = $this->source_data_fetch_fallback( $data['u'], $data ); 726 } else { 727 $data['errors'] = 'missing nonce'; 728 } 725 729 } else { 726 730 foreach ( array( '_images', '_embeds' ) as $type ) { … … 1238 1242 'v' => ! empty( $data['v'] ) ? $data['v'] : '', 1239 1243 'u' => ! empty( $data['u'] ) ? $data['u'] : '', 1240 'hasData' => ! empty( $data ) ,1244 'hasData' => ! empty( $data ) && ! isset( $data['errors'] ), 1241 1245 ); 1242 1246 … … 1370 1374 <form method="GET"> 1371 1375 <label for="url-scan" class="screen-reader-text"><?php _e( 'Scan site for content' ); ?></label> 1372 <input type="url" name="u" id="url-scan" class="scan-url" value=" " placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />1376 <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' ) ?>" /> 1373 1377 <input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="<?php esc_attr_e( 'Scan' ) ?>" /> 1378 <?php wp_nonce_field( 'scan-site' ); ?> 1374 1379 </form> 1375 1380 </div>
Note: See TracChangeset
for help on using the changeset viewer.