Skip to content

fix: log in with the configured username - #15

Merged
boomzero merged 1 commit into
mainfrom
fix/use-configured-username
Oct 3, 2026
Merged

boomzero merged 1 commit into
mainfrom
fix/use-configured-username

Conversation

@boomzero

@boomzero boomzero commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • The login request in index.ts hard-coded user_id=zhuchenrui2 (since the initial commit, 2fdb606), ignoring username from quicksubmit.json. For any other user, XMOJ returned "UserName or Password Wrong!" while the CLI still printed Logged in as <configured username>.
  • Now sends encodeURIComponent(config.username).
  • Aligns the version at 1.5.4 across .version() in the CLI, package.json and deno.json (they were v1.5.1 / 1.5.1 / 1.5.3).

Validation

  • deno lint index.ts passes.
  • deno install && deno compile -A index.ts succeeds; the binary reports v1.5.4.
  • Not tested against XMOJ with a second account. Worth a quick login with a non-zhuchenrui2 account before publishing.
  • deno fmt --check already fails on main for unrelated lines, so the file was not reformatted. Only the changed line was wrapped to Deno style.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JhQLfJB3LWW4vkNXK85xL1

The login request hard-coded user_id=zhuchenrui2 since the initial
commit, so anyone else's credentials were rejected while the CLI
still printed "Logged in as <their username>". Send config.username
(URL-encoded) instead.

Also align the version across the CLI, package.json and deno.json
(previously v1.5.1 / 1.5.1 / 1.5.3) at 1.5.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JhQLfJB3LWW4vkNXK85xL1
@boomzero
boomzero merged commit 0394490 into main Oct 3, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e71bf182ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
"jsdom": "^23.0.1"
},
"version": "1.5.1",
"version": "1.5.4",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Regenerate package-lock for the 1.5.4 bump

The tracked package-lock.json still declares the root package as version 1.5.1 in both of its root metadata fields. With this package.json bump, running npm install immediately rewrites those fields to 1.5.4, leaving contributors with a dirty worktree and tools that inspect the lockfile reporting stale release metadata; update the lockfile as part of this version change.

Useful? React with 👍 / 👎.

@boomzero
boomzero deleted the fix/use-configured-username branch October 3, 2026 02:14
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