Compare login credentials in constant time
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 73/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- authentication, backend, security
Research direction
Start with src/resolvers/tokens.js and inspect the createToken mutation’s credential checks; check how this project imports Node.js crypto and runs its tests. Confirm both credential comparisons use constant-time digest comparison before branching, then run the relevant tests and verify valid and invalid logins still behave as expected.
Written by the indexing model from the issue text.
Description
The createToken (login) mutation in src/resolvers/tokens.js checks the submitted username and password against ACKEE_USERNAME / ACKEE_PASSWORD with !==, which returns as soon as the strings differ, and checks the username before the password.
Over a network this timing difference is very hard to measure, so this is hardening rather than an exploitable issue. A small fix is to hash both sides with SHA-256 and compare the digests with crypto.timingSafeEqual, evaluating username and password before branching. Happy to open a PR against develop if that sounds good.
AI disclosure: drafted with AI assistance (Claude); I reviewed the change.
- Dominant language
- JavaScript
- Stars
- 4.7k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from electerious/Ackee
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
electerious/Ackee#381 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
electerious/Ackee#368 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
electerious/Ackee#365 · 3 comments · 3 reactions ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
electerious/Ackee#346 · 6 comments · 3 reactions ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
electerious/Ackee#343 · 11 comments · 1 reaction ·
All issues in electerious/Ackee
Similar issues
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ManageIQ/manageiq-ui-service#2259 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
babalae/bettergi-scripts-list#3905 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Open
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
dedicatedcode/reitti#1445 ·
Maintainers usually reply within 1 day
-
26.04 bug unconfirmed
Difficulty 1/5 1-3 hours Newbie friendliness 74/100
CollaboraOnline/online#16459 ·