Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 13 years ago

#10367 closed defect (bug) (wontfix)

Assert the existence of ABSPATH in wp-settings.php

Reported by: wet Owned by: ryan
Priority: normal Milestone:
Component: Security Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

wp-settings.php is publicly visible from an URL like http://example.com/wp-settings.php and discloses web server internals like the absolute file system path through PHP notices, as ABSPATH is not defined under such circumstances:

Warning: require(ABSPATHwp-includes/compat.php) [function.require]: failed to open stream: No such file or directory in /[...]/wp-settings.php on line 246

Attached patch fixes this behaviour.

Attachments (1)

wp-settings-11669.patch (325 bytes ) - added by wet 17 years ago.

Download all attachments as: .zip

Change History (7)

#1 @wet
17 years ago

  • Keywords has-patch added

#2 @g30rg3x
17 years ago

From Ticket #1038
Quoting Viper007Bond:

IMO, if you're that worried about paths, then you should have error reporting off.And the path is only a "problem" if you're on a shared server with poor security.

Recommend "wontfix".

#3 @Denis-de-Bernardy
17 years ago

  • Milestone Unassigned
  • Resolutionwontfix
  • Status newclosed

#4 follow-up: @wet
17 years ago

  • Cc r.wetzlmayr@… added
  • Resolution wontfix
  • Status closedreopened

In the light of the current CYA swoop, would this patch be eventually reconsidered for commit?

#5 in reply to: ↑ 4 @westi
17 years ago

  • Resolutionwontfix
  • Status reopenedclosed

Replying to wet:

In the light of the current CYA swoop, would this patch be eventually reconsidered for commit?

Those changes were about checking capabilities and stopping the direct load of admin files which shouldn't be called directly.

Adding these checks at the top of every file does not improve security and as was said above you should not have error_reporting outputting to the end-user on a live site.

#6 @ocean90
13 years ago

#24561 was marked as a duplicate.

Note: See TracTickets for help on using tickets.