WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 8 months ago

#17619 new enhancement

Soft 404 at /wp-content/plugins/

Reported by: miqrogroove Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch dev-feedback
Focuses: Cc:

Description

/wp-content/plugins/index.php would be better written with a proper 404.

<?php
header('HTTP/1.0 404 Not Found'); // Silence is golden.
?>

Attachments (3)

17619.diff (341 bytes) - added by BenChapman 4 years ago.
Adds a 404 error message
17619.patch (664 bytes) - added by jakub.tyrcha 4 years ago.
17619.2.patch (1005 bytes) - added by jakub.tyrcha 4 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 @johnbillion4 years ago

Shouldn't it technically be a 403?

comment:2 @miqrogroove4 years ago

Technically, there is nothing in the response entity, so either 403 or 404 is appropriate.

comment:3 @toscho4 years ago

  • Cc info@… added

Why not 410? Nobody should come back, no?

comment:4 @BenChapman4 years ago

As per RFC2616 if a reason is to be given for denying access then 403 should be used, otherwise 404 should be used. In this case I would say 403 would be the better response code with a reason included for forbidding access.

Last edited 4 years ago by BenChapman (previous) (diff)

@BenChapman4 years ago

Adds a 404 error message

comment:5 @BenChapman4 years ago

  • Cc admin@… added

comment:6 @solarissmoke4 years ago

If this is going to change, then it should change for all wp-content directories, i.e., /themes and /uploads also.

comment:7 @DH-Shredder4 years ago

  • Type changed from defect (bug) to enhancement

@jakub.tyrcha4 years ago

comment:8 @jakub.tyrcha4 years ago

Why should we include this in the uploads/ directory as well?

@jakub.tyrcha4 years ago

comment:9 @edwardw4 years ago

  • Keywords has-patch added
Version 0, edited 4 years ago by edwardw (next)

comment:10 @chriscct78 months ago

  • Keywords dev-feedback added
  • Severity changed from minor to normal

comment:11 @DrewAPicture8 months ago

@nacin: Possible to get a yea or nay here?

Note: See TracTickets for help on using tickets.