Skip to content

GO-53: Stop DT Home launcher logging magic-link URLs to the error log - #2943

Merged
corsacca merged 1 commit into
developfrom
fix/launcher-error-log-go53
Oct 23, 2026
Merged

corsacca merged 1 commit into
developfrom
fix/launcher-error-log-go53

Conversation

@corsacca

Copy link
Copy Markdown
Member

Summary

The DT Home launcher called error_log() on every ?launcher=1 page load, with no WP_DEBUG check. Those calls wrote the target app URL to the PHP error log, and that URL contains the magic-link key. Anyone who can read the log (hosting support, log shipping or monitoring, other tenants on shared hosting) could reuse those links to act as the user or contact the link was issued to.

This PR removes the debug error_log calls from:

  • dt-apps/dt-home/magic-link-home-app.php: the app_url parameter URL, the "launcher=1 detected" line, and the launcher wrapper target URL
  • dt-apps/dt-home/frontend/partials/launcher-bottom-nav.php: the app count lines
  • dt-apps/dt-home/admin/home-admin.php: the app color update line, which was marked "remove in production"

The "launcher wrapper template not found" error log stays. It only logs a theme file path and fires only when the template file is missing.

Verification

  • php -l passes on all changed files.
  • vendor/bin/phpcs (theme phpcs.xml) passes on all changed files.
  • Live check on a local multisite (WP_DEBUG_LOG on): I loaded a real launcher magic link with ?launcher=1, once plain and once with app_url.
    • Before: 5 DT Home log lines, 3 of which contained the magic key.
    • After: 0 DT Home log lines and 0 lines containing the key.

Separate issue (not fixed here)

On subdirectory multisite installs (e.g. /corsac/apps/launcher/<key>?launcher=1), show_launcher_wrapper() builds DT_Magic_URL from $url_parts[1]. That segment is the site path, not the magic-link root, so parse_url_parts() returns false and DT_Magic_URL::get_current_user_id() throws a TypeError, giving a 500. This happens with or without this PR.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

Review

High: none.

Medium: none.

The PR only removes debug error_log() calls. That includes one that logged the user-supplied app_url parameter. No logic changes, and the variables that were referenced in the removed lines are still used by the surrounding code.

Looks ready to merge.

@corsacca
corsacca merged commit cb9166f into develop Oct 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant