Query API accepts malformed timeperiod ranges

未关闭 适合新手
#237 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 5 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
69/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
api

调研方向

从 aw_server/api.py 开始,ServerAPI.query2 在此处理以斜杠分隔的时间段。检查它如何解析包含额外段的范围和端点顺序颠倒的范围,然后查看附近的查询 API 测试或运行这些测试,以了解当前行为。完成标准是两种格式错误的范围都被拒绝,而不是对常量查询返回 HTTP 200。

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

描述

bug nice-to-have

ServerAPI.query2 silently discards a third slash-separated timeperiod segment and evaluates reversed ranges, returning HTTP 200 for a constant query instead of rejecting the range.

No user report. Converted from ActivityWatch/aw-server#206 because the review SHA is not the current head (clean-and-small does not apply).

fingerprint: aw_server/api.py — reversed or extra-segment timeperiods return 200

主要语言
Python
星标
129
派生
105
平均合并
5 天 4 小时
30 天内合并 PR
17

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

ActivityWatch/aw-server 的其他 Issue

查看 ActivityWatch/aw-server 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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