claude-code-hub icon indicating copy to clipboard operation
claude-code-hub copied to clipboard

版本更新问题

Open teeryxie opened this issue 8 months ago • 6 comments

有人给codex改成了9.9.9版本,然后其他人瞬间用不了了,而且没法重置,那又想开这个版本提醒

Image

teeryxie avatar Mar 21 '26 16:03 teeryxie

Thank you for reporting this issue. I understand the problem - someone has spoofed their Codex client version to 9.9.9, which became the GA (Generally Available) version, and now other users with legitimate versions are being blocked.

Analysis

Root Cause:

The version checking system in Claude Code Hub determines the "GA version" based on the highest version number used by a threshold number of users (default: 2 users, configurable via CLIENT_VERSION_GA_THRESHOLD environment variable). When someone spoofs a version like 9.9.9, it becomes the GA version because:

  1. Version comparison in src/lib/version.ts uses semantic versioning comparison
  2. 9.9.9 > any legitimate Codex version (likely 0.x or 1.x)
  3. Once enough users use this spoofed version, it becomes the GA version
  4. All users with versions < 9.9.9 are then blocked

Affected Code:

  • src/lib/client-version-checker.ts (lines 111-138) - GA version calculation logic
  • src/app/v1/_lib/proxy/version-guard.ts (lines 72-83) - Version enforcement

Current Limitations:

The system currently has no built-in way to:

  • Reset/clear the GA version cache
  • Block obviously fake versions
  • Manually set a maximum allowed version

Immediate Workarounds

Option 1: Disable Version Checking (Recommended temporarily)

  1. Go to Settings > Client Versions in the admin dashboard
  2. Toggle off "Enable Client Version Check"

Option 2: Clear Redis Cache (Requires Redis access)

# Clear all GA version caches (5-min TTL, will regenerate)
redis-cli DEL $(redis-cli KEYS "ga_version:*")

# Optionally clear user version tracking (7-day TTL)
redis-cli DEL $(redis-cli KEYS "client_version:*")

After clearing, the GA version will be recalculated from remaining active users.

Option 3: Increase GA Threshold

Set environment variable CLIENT_VERSION_GA_THRESHOLD to a higher value (e.g., 5 or 10) so a single spoofer cannot easily influence the GA version. This requires app restart.

Suggested Improvements

This issue highlights the need for:

  1. A "Reset Version Cache" button in the admin UI
  2. Maximum version validation to detect obviously fake versions
  3. Ability to manually pin/override the GA version for specific client types

Would you like to see any of these improvements implemented?


Automated response from Claude AI

github-actions[bot] avatar Mar 21 '26 16:03 github-actions[bot]

hi,版本检测阈值默认是两个用户更新后才会视为最新版本。 您可以参考机器人的回复增加这个阈值。

ding113 avatar Mar 22 '26 05:03 ding113

This issue has been automatically marked as stale because it has not had any activity in the last 30 days.

If this issue is still relevant:

  • Please comment to keep it open
  • Add any new information that might help resolve it

This issue will be automatically closed in 14 days if there is no further activity.

github-actions[bot] avatar Apr 21 '26 01:04 github-actions[bot]

This issue has been automatically marked as stale because it has not had any activity in the last 30 days.

If this issue is still relevant:

  • Please comment to keep it open
  • Add any new information that might help resolve it

This issue will be automatically closed in 14 days if there is no further activity.

github-actions[bot] avatar May 01 '26 01:05 github-actions[bot]

This issue has been automatically marked as stale because it has not had any activity in the last 30 days.

If this issue is still relevant:

  • Please comment to keep it open
  • Add any new information that might help resolve it

This issue will be automatically closed in 14 days if there is no further activity.

github-actions[bot] avatar Jun 03 '26 02:06 github-actions[bot]

This issue has been automatically closed due to inactivity.

If you believe this issue is still relevant, please feel free to reopen it with additional information.

github-actions[bot] avatar Jun 17 '26 02:06 github-actions[bot]