Repository navigation
GO-53: Stop DT Home launcher logging magic-link URLs to the error log - #2943
Merged
Merged
Conversation
…he error log (GO-53)
ReviewHigh: none. Medium: none. The PR only removes debug Looks ready to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The DT Home launcher called
error_log()on every?launcher=1page load, with noWP_DEBUGcheck. 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_logcalls from:dt-apps/dt-home/magic-link-home-app.php: theapp_urlparameter URL, the "launcher=1 detected" line, and the launcher wrapper target URLdt-apps/dt-home/frontend/partials/launcher-bottom-nav.php: the app count linesdt-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 -lpasses on all changed files.vendor/bin/phpcs(themephpcs.xml) passes on all changed files.WP_DEBUG_LOGon): I loaded a real launcher magic link with?launcher=1, once plain and once withapp_url.DT Homelog lines, 3 of which contained the magic key.DT Homelog 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()buildsDT_Magic_URLfrom$url_parts[1]. That segment is the site path, not the magic-link root, soparse_url_parts()returnsfalseandDT_Magic_URL::get_current_user_id()throws aTypeError, giving a 500. This happens with or without this PR.🤖 Generated with Claude Code