Changeset 40199
- Timestamp:
- 03/06/2017 02:01:39 PM (8 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/src/wp-admin/includes/class-wp-press-this.php
r39973 r40199 711 711 */ 712 712 if ( empty( $_POST ) && ! empty( $data['u'] ) ) { 713 $data = $this->source_data_fetch_fallback( $data['u'], $data ); 713 if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) { 714 $data = $this->source_data_fetch_fallback( $data['u'], $data ); 715 } else { 716 $data['errors'] = 'missing nonce'; 717 } 714 718 } else { 715 719 foreach ( array( '_images', '_embeds' ) as $type ) { … … 1251 1255 'v' => ! empty( $data['v'] ) ? $data['v'] : '', 1252 1256 'u' => ! empty( $data['u'] ) ? $data['u'] : '', 1253 'hasData' => ! empty( $data ) ,1257 'hasData' => ! empty( $data ) && ! isset( $data['errors'] ), 1254 1258 ); 1255 1259 … … 1383 1387 <form method="GET"> 1384 1388 <label for="url-scan" class="screen-reader-text"><?php _e( 'Scan site for content' ); ?></label> 1385 <input type="url" name="u" id="url-scan" class="scan-url" value=" " placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />1389 <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' ) ?>" /> 1386 1390 <input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="<?php esc_attr_e( 'Scan' ) ?>" /> 1391 <?php wp_nonce_field( 'scan-site' ); ?> 1387 1392 </form> 1388 1393 </div>
Note: See TracChangeset
for help on using the changeset viewer.