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