Closed bobbingwide closed 4 years ago
The daily trace summary report should only be accessible by authorised users of the output. It's currently written to a file in ABSPATH. It needs to be written to a protected directory.
The option field summary_file
will be used to store the prefix of the daily trace summary file, which should include the path. E.g. logs/bwtrace.vt
. The date and blog_id ( for Multisite) are appended to create the full file name. E.g. logs/bwtrace.vt.20180516.2
The .htaccess file in the logs folder will protect unauthorised users from accessing the files from the browser.
See #71 for further details / clarification of the requirements and proposed solution.
The meta box the for daily trace summary options looks like this.
This box is displayed on both oik trace options and oik action options admin pages. There are PHPUnit tests for the dialog display.
The option field summary_file will be used to store the prefix of the daily trace summary file, which should include the path. E.g. logs/bwtrace.vt.
This has been superceded by the solution in #71 The new solution doesn't support subdirectories.
The .htaccess file in the logs folder will protect unauthorised users from accessing the files from the browser.
I didn't implement any logic to automatically create an .htacess file
This issue can now be closed.
See also #53 - we’ll add another column to the trace section.
.
The Daily Trace Summary report is currently enabled by selecting the
Trace 'shutdown' status report and log in summary file
checkbox on the Settings > oik action options admin page.Creation of the Summary Report is independent of the tracing activity. See https://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/free-oik-plugins/oik-trace-plugin/settings-oik-action-options/trace-shutdown-status-report-and-log-in-summary-file/
It would be nice to extract/copy this
trace_status_report
checkbox from thebw_action_options
settings group and create a separate admin section for it. This could be a meta box on both the oik trace options and oik action options page so that the user could enable/disable the daily trace summary report from either admin page.Currently there are three capabilities bundled into one.
Requirements
bw_trace_summary
Proposed solution
trace_status_report
OIK_trace_summary