WP Manifestindependent plugin directory
manifest / developer / debug-quick-look

Debug Quick Look WP Registry grade B. Medium-severity findings · 1 findingWP RegistryMedium-severity findings · 1 findingOpen the reportB

Adds a link to view or purge the debug.log file in WordPress

★ 32stars
0.0.3latest · 9 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/norcross/debug-quick-look/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Contributors

About

Allows users with admin access to view and purge the debug.log file kept inside the wp_content folder. The WP_DEBUG_LOG constant must be set to true.

Current Actions

  • allows for loading the debug file in a new browser window
  • allows for purging the debug file

Roadmap

  • fancier formatting for log file
  • collapse / expand stack traces

Pull requests are very much welcome and encouraged.

Changelog

Version 0.0.3 - 2017/07/27

Version 0.0.2 - 2017/07/12

  • Changed method for pulling and display log file to check for memory overload. Props @rarst

Version 0.0.1 - 2017/07/12

  • Initial release!

Releases

3 releases.

Tag
Published
0.0.3 latest
Jul 27, 2017 9 years ago
Jul 12, 2017 9 years ago
Jul 12, 2017 9 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

B grade

Security

Debug Quick Look 0.0.3 · audited by WP Registry

Medium-severity findings.

1 medium
Audited release
0.0.3
Findings
1
Worst severity
medium
Content hash
5af18203938e0c0b14124a09…

Findings

  • medium CSRF via GET quickaction=purge wipes debug.log (capability checked, nonce absent)

    csrf

    process_debug_type is hooked to admin_init and, after current_user_can('manage_options') and is_admin(), treats $_GET['quicklook'] plus $_GET['quickaction'] in {view,purge} as the entire authorization story. There is no wp_verify_nonce, check_admin_referer, or check_ajax_referer anywhere in the plugin. admin_bar_links builds predictable URLs with add_query_arg(array('quicklook'=>1,'quickaction'=>'purge'), admin_url('/')) and no nonce query arg. Because the action is a GET, a cross-site top-level navigation (anchor, redirect) sends SameSite=Lax wordpress_* cookies and truncates WP_CONTENT_DIR.'/debug.log' via file_put_contents($file, ''). Subscriber and other non-admin roles cannot invoke this themselves; an unauthenticated attacker needs a logged-in administrator to follow the link. Blast radius is the debug log only (evidence/secret wipe, not RCE or settings). The later WP Debugging vendor fork of this code added wp_verify_nonce($_GET['nonce'], 'debug_quicklook_{action}_action') on the same admin_init path; tag 0.0.3 never received that check.

    debug-quick-look.php:126-235

    Recommendation

    Require a nonce on both view and purge. Generate it in admin_bar_links (wp_create_nonce('debug_quicklook_' . $action . '_action')), append it to the admin_url query args, and call wp_verify_nonce on process_debug_type before touching the file. Prefer POST (or admin-post.php) for purge so SameSite=Lax blocks cookie-sending CSRF. Keep the manage_options gate. Escape log bytes with esc_html() rather than wp_kses_post when rendering view.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.