Make WordPress Core

Opened 3 years ago

Closed 15 months ago

#53989 closed feature request (wontfix)

Needs a filter to disable loopback request in plugin and theme file editor

Reported by: ooqwqoo's profile ooqwqoo Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8
Component: Filesystem API Keywords:
Focuses: Cc:


Loopback request slow down the file editing in some websites, so we should need a filter to disable it.

Change History (3)

#1 @costdev
15 months ago

  • Keywords close added

Hi @ooqwqoo, welcome to Trac and thanks for opening this ticket!

While a filter would be quite straightforward to add, it's a safety measure against mistakes that could cause a fatal error on a website.

If someone is editing a theme or plugin file using the editor, this suggests that they don't have any other means of accessing the file, such as FTP, SSH or a webhost's file manager.

Should a fatal error occur, this would leave the user stuck for how to proceed, and potentially incurring costs to pay a developer to resolve the issue, or losing revenue if they run an eCommerce website.

For that reason, I don't think we should add such a filter to WordPress to make this scenario easier to achieve, and think we should close this ticket as wontfix.

It is possible to use the pre_http_request filter to detect a scrape, return an appropriate value to fake the result, and avoid making the loopback's http request. Should someone wish to prevent loopbacks, they could write the code to do this for their site(s).

For now, I'll add close to indicate current feedback on the idea of introducing such a filter so that other contributors can offer their thoughts.

#2 @pbiron
15 months ago

I tend to agree with @costdev. You can achieve what you're asking for with filter(s) that already exist. While those existing filters might seem "less direct", it doesn't seem like adding a new filter is worth the maintenance burden (especially for something that would disable other useful features in core).

#3 @costdev
15 months ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for your input @pbiron! I'll close this ticket as wontfix.

Note: See TracTickets for help on using tickets.