安全跟进:Bearer Token 比较改为常数时间

Open Beginner friendly
#18 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Read internal/server/middleware.go and the open-pdf withAuth implementation referenced in the issue. Check how the middleware compares Bearer tokens and how the reference handles comparison. Update the comparison to use crypto/subtle.ConstantTimeCompare, then confirm the middleware still accepts matching tokens and rejects mismatches.

Written by the indexing model from the issue text.

Description

PR #12 review 记录:internal/server/middleware.go 的 withAuth 使用字符串直接比较 token,存在时序侧信道理论风险。改为 crypto/subtle.ConstantTimeCompare(参照 open-pdf withAuth 实现)。来源:PR #12 review 🟡 项。

Dominant language
Go
Stars
2
Forks
1
Avg merge
1h 37m
Merged PRs (30d)
6

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LinuxSuRen/open-img-sync

All issues in LinuxSuRen/open-img-sync

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.