CustomAlerts.getAlert discloses alert existence to any authenticated user, including accounts with no site access

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 plugins/CustomAlerts/API.php 中的 getAlert() 开始,将其所有权检查与 getAlerts() 和 getTriggeredAlerts() 进行比较;issue 指出后两者会在 SQL 中限定结果。确保非所有者收到的响应与警报不存在时收到的响应无法区分,然后验证这两种情况都返回相同的未找到错误。

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

描述

Reported to the Matomo HackerOne program (report #4220417) and closed as Informative — the program confirmed the code reading, ruled it a hardening gap rather than a bounty-eligible vulnerability, and suggested filing here; the fix shape below is the one the program itself proposed.

Behavior (CustomAlerts 5.3.3, plugins/CustomAlerts/API.php)
getAlert() throws CustomAlerts_AlertDoesNotExist (line 73) before Validator::checkUserHasPermissionForAlert is called (line 77). Any authenticated caller — including an account with no site access at all — can distinguish a nonexistent alert ID from a foreign-owned one purely from the error message. No alert definition, name, recipients, or history is exposed.

Suggested fix
Merge the existence and ownership responses into a single not-found error for any non-owner, the same way getAlerts / getTriggeredAlerts already scope their results in SQL.

Happy to provide the controlled-fixture reproduction details from the original report if useful.

主要语言
PHP
星标
17
派生
24
平均合并
20 小时 38 分钟
30 天内合并 PR
11

环境准备

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

从这里开始

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

matomo-org/plugin-CustomAlerts 的其他 Issue

查看 matomo-org/plugin-CustomAlerts 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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