[wp-trac] [WordPress Trac] #62105: scraping error text while in normal operation
WordPress Trac
noreply at wordpress.org
Tue Sep 24 16:29:25 UTC 2024
#62105: scraping error text while in normal operation
----------------------------+---------------------
Reporter: georgwordpress | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Bootstrap/Load | Version: 5.5
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+---------------------
Comment (by georgwordpress):
Yes - the non existing transient in function
wp_start_scraping_edited_file_errors() is the problem:
[https://github.com/WordPress/WordPress/blob/6.6-branch/wp-
includes/load.php]
{{{
/**
* Starts scraping edited file errors.
*
* @since 4.9.0
*/
function wp_start_scraping_edited_file_errors() {
...
$key = substr( sanitize_key( wp_unslash(
$_REQUEST['wp_scrape_key'] ) ), 0, 32 );
$nonce = wp_unslash( $_REQUEST['wp_scrape_nonce'] );
if ( get_transient( 'scrape_key_' . $key ) !== $nonce ) {
echo "###### wp_scraping_result_start:$key ######";
...
}}}
Last minutes I tested this change:
{{{
$nonce = wp_unslash( $_REQUEST['wp_scrape_nonce'] );
# new check:
if ( get_transient( 'scrape_key_' . $key ) === false ) return;
if ( get_transient( 'scrape_key_' . $key ) !== $nonce ) {
echo "###### wp_scraping_result_start:$key ######";
}}}
Buggy edited files and also a buggy plugin update was still detected and
rollback was done.
And the problem was solved.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62105#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list