Skip to content

fix(1point3acres): resolve identity on the redesigned UI - #2529

Open
Benjamin-eecs wants to merge 1 commit into
jackwener:mainfrom
Benjamin-eecs:fix/1p3a-identity-probe-new-ui
Open

Benjamin-eecs wants to merge 1 commit into
jackwener:mainfrom
Benjamin-eecs:fix/1p3a-identity-probe-new-ui

Conversation

@Benjamin-eecs

@Benjamin-eecs Benjamin-eecs commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Description

1point3acres whoami failed with AUTH_REQUIRED on valid sessions. Bare /bbs/ redirects logged-in users to the redesigned /home SPA, which carries none of the Discuz identity markup the probe expects, so the probe fell through to its anonymous branch.

The probe now reads /bbs/home.php?mod=space, a Discuz-native page that still serves the user panel. ?forum_ui=classic also works but writes the reader's saved UI preference, so it is deliberately not used. If a run still lands on a signed-in surface without that panel, the uid is decoded from the Discuz avatar path, accepted only when the image is served from avatar.1p3a.com and every avatar on the page decodes to the same uid, so neither a foreign host nor a feed of other members can be reported as the viewer. That fallback sits below the anonymity check, so a page with no signed-in surface stays auth. An identity the probe cannot resolve is a shape failure rather than auth, since it runs only after the *_auth cookie check passes.

Related issue: Closes #2528

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Screenshots / Output

Before, on a session whose auth status reports logged_in: true:

$ opencli 1point3acres whoami
ok: false
error:
  code: AUTH_REQUIRED
  message: 1point3acres bbs rendered but no logged-in identity
  help: Please open Chrome or Chromium and log in to https://1point3acres.com
  exitCode: 77

After, same session:

$ opencli 1point3acres whoami
logged_in: true
site: 1point3acres
user_id: '299938'
username: <handle>

The avatar fallback was checked separately against the live /home SPA, which renders two avatars both decoding to the viewer's uid; it yields the uid with an empty username, since that UI shows no name. clis/1point3acres suite 13 / 13, eight added here. Every behaviour is mutation-checked: switching the navigation back to ?forum_ui=classic, relaxing the avatar host check to a substring match, taking the first avatar instead of requiring agreement, moving the fallback above the anonymity check, keeping the placeholder uid, or mapping a shape result back to AuthRequiredError each fails a test. Typecheck, both lint gates and doc coverage pass.

Copilot AI lite review requested due to automatic review settings September 20, 2026 06:21

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 reached their quota limit.

@Benjamin-eecs
Benjamin-eecs force-pushed the fix/1p3a-identity-probe-new-ui branch 2 times, most recently from 42d9cbb to 606fe7f Compare September 20, 2026 06:46
Bare /bbs/ now redirects logged-in users to the /home SPA, which carries no Discuz identity markup (jackwener#2528).
@Benjamin-eecs
Benjamin-eecs force-pushed the fix/1p3a-identity-probe-new-ui branch from 606fe7f to bd21433 Compare September 20, 2026 06:52
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.

[Bug]: 1point3acres whoami fails with AUTH_REQUIRED while the session is valid

2 participants