koajs / koajs/session

CRC32 Hash Collision

Open
#131 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
908
Forks
115
PR merge metrics
No merged PRs in 30d

Description

There is a hash collision in `util.js` -> `hash` method,etc.
```
console.log(crc32(`{"cookie":{"path":"/","httpOnly":true,"maxAge":86400000,"overwrite":true,"signed":true},"userInfo":{"name":"htpqwklvynl","age":18}}`));
console.log(crc32(`{"cookie":{"path":"/","httpOnly":true,"maxAge":86400000,"overwrite":true,"signed":true},"userInfo":{"name":"pojqhnulnxu","age":18}}`));
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the two examples against the hash method in util.js and inspect how the session middleware uses its result. The issue does not specify the desired collision-handling behavior, so clarify the expected change and acceptance criteria before estimating or implementing a fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.