Skip to content

Keep the token out of stack traces and debug output - #35

Merged
valzargaming merged 1 commit into
masterfrom
claude/project-thread-u0ndwp
Nov 8, 2026
Merged

valzargaming merged 1 commit into
masterfrom
claude/project-thread-u0ndwp

Conversation

@valzargaming

Copy link
Copy Markdown
Member

Requested by Val · project thread

  • Marks the Http constructor's $token as #[\SensitiveParameter]. The attribute sits on its own line, so PHP 7.4 still reads it as a comment.
  • Adds Http::__debugInfo(), which masks the token in var_dump(), print_r() and Xdebug object dumps.
  • Adds two tests in HttpTest. The Discord suite passes locally (33 tests).

A DiscordPHP crash had printed the bot token in an Xdebug call stack. The main fix is in discord-php/DiscordPHP on the same branch.


Generated by Claude Code

Mark the Http constructor's token #[\SensitiveParameter] (on its own
line so PHP 7.4 still parses it as a comment) and mask it in a new
__debugInfo(), which var_dump() and Xdebug use for object dumps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WTP2SZobw97KdXvRTs54z
Copilot AI balanced review requested due to automatic review settings November 8, 2026 22:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@valzargaming valzargaming self-assigned this Nov 8, 2026
@valzargaming
valzargaming merged commit 9420483 into master Nov 8, 2026
2 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.

3 participants