Make WordPress Core

#58496 closed defect (bug) (duplicate)

Prevent Error when bot's arbitrarily scan WordPress files

Reported by: haykuro's profile haykuro Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

We've been noticing a large # of requests going directly to /wp-content/wp-includes/blocks/index.php with a user-agent containing "python".

The error being thrown is:

Uncaught exception 'Error' with message 'Undefined constant "ABSPATH"' in /var/www/wp-includes/blocks/index.php:8

This PR should prevent this.

Change History (2)

This ticket was mentioned in PR #4585 on WordPress/wordpress-develop by nbcsteveb.


16 months ago
#1

  • Keywords has-patch added

We've been noticing a large # of requests going directly to /wp-content/wp-includes/blocks/index.php with a user-agent containing "python".

The error being thrown is:

Uncaught exception 'Error' with message 'Undefined constant "ABSPATH"' in /var/www/wp-includes/blocks/index.php:8

This PR should prevent this.

Trac ticket: https://core.trac.wordpress.org/ticket/58496

#2 @dd32
16 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @haykuro,

A similar issue is being tracked through #55067

Note: See TracTickets for help on using tickets.