[wp-trac] [WordPress Trac] #48961: Site Health WP_DEBUG_LOG critical issue

WordPress Trac noreply at wordpress.org
Fri Dec 13 09:35:38 UTC 2019


#48961: Site Health WP_DEBUG_LOG critical issue
--------------------------+-----------------------------
 Reporter:  kubiq         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Site Health   |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 There is a notice in Site Health "Your site is set to log errors to a
 potentially public file.", but we should check it with CURL if that file
 is really public.

 In all my WP installations I have enabled WP_DEBUG_LOG and I placed there
 also .htaccess file with this content:

 {{{
 RemoveHandler .log
 RemoveType .log

 <Files *.log>
         order deny,allow
         deny from all
 </Files>
 }}}

 So debug.log is definitely not public, it can be accessed only by FTP, but
 there is still this "critical issue" and some clients are worried about
 it.

 Workaround should be like firstly write something to that log, so we make
 sure, file exists:
 {{{#!php
 <?php error_log('Testing debug.log'); ?>
 }}}
 Then just use one of PHP functions to return response headers, like
 file_get_contents or CURL or others... and check if the response code is
 200

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48961>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list