Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add rate limiting to auth, public share pages and metadata fetching

未关闭
#48 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
html

调研方向

从 LearnStack/Components/Pages/SharedView.razor:4 和 LearnStack.Core/Extensions/ServiceCollectionExtensions.cs:29-34 开始,然后追踪 /Account/*、/shared/{token}、/friends/accept/{token} 以及 OpenGraph fetch 的入口点。完成的标准是:重复的登录尝试返回 429,share-token 枚举受到限流,并且单个用户无法使出站 HTTP 请求饱和。

由索引模型根据 Issue 内容生成。

描述

enhancement

Tier 2 — security

Problem

Nothing in the app is throttled. In particular:

  • Login and registration accept unlimited attempts (Identity lockout helps, but only per-account).
  • /shared/{token} is anonymous and unthrottled, so share tokens can be brute-forced and the page is a free amplification target (it loads full resource rows including thumbnails).
  • The metadata fetcher lets any authenticated user make the server issue arbitrary outbound HTTP requests on demand, with no per-user budget.
Evidence
  • No AddRateLimiter anywhere in the repository
  • LearnStack/Components/Pages/SharedView.razor:4 — [AllowAnonymous]
  • LearnStack.Core/Extensions/ServiceCollectionExtensions.cs:29-34 — unthrottled HttpClient
Proposed fix
  1. builder.Services.AddRateLimiter(...) with a fixed window on /Account/*.
  2. A per-IP window on /shared/{token} and /friends/accept/{token}.
  3. A per-user concurrency limiter around OpenGraph fetches.
Acceptance criteria
  • Repeated login attempts from one IP are throttled with 429
  • Share-token enumeration is rate-limited
  • One user cannot saturate the outbound HTTP client
主要语言
HTML
星标
10
派生
0
平均合并
2 小时 35 分钟
30 天内合并 PR
21

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

kasuken/LearnStack 的其他 Issue

查看 kasuken/LearnStack 的全部 Issue

相似的 Issue

更多 Security Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。