1 Star 0 Fork 18

李恬/grafana

forked from src-openEuler/grafana 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2024-8118.patch 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
wk333 提交于 2024-09-29 11:19 +08:00 . Fix CVE-2024-8118
From 7bf99231de44c53c54bb158256562dd204f49b80 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Thu, 5 Sep 2024 22:23:55 +0000
Subject: [PATCH] apply security patch:
v10.3.x/0001-Alerting-Fix-permission-on-external-rule-write-endpo.patch
Origin: https://github.com/grafana/grafana/commit/7bf99231de44c53c54bb158256562dd204f49b80
commit 132e31627eb888b8b423a583e8bfdeb5dcfda976
Author: Alex Weaver <weaver.alex.d@gmail.com>
Date: Thu Aug 22 12:15:32 2024 -0500
Alerting: Fix permission on external rule write endpoint
---
pkg/services/ngalert/api/authorization.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/services/ngalert/api/authorization.go b/pkg/services/ngalert/api/authorization.go
index a3d073b62361..661034fc1c62 100644
--- a/pkg/services/ngalert/api/authorization.go
+++ b/pkg/services/ngalert/api/authorization.go
@@ -93,7 +93,7 @@ func (api *API) authorize(method, path string) web.Handler {
case http.MethodGet + "/api/ruler/{DatasourceUID}/api/v1/rules":
eval = ac.EvalPermission(ac.ActionAlertingRuleExternalRead, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
case http.MethodPost + "/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}":
- eval = ac.EvalPermission(ac.ActionAlertingInstancesExternalWrite, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
+ eval = ac.EvalPermission(ac.ActionAlertingRuleExternalWrite, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
// Lotex Prometheus-compatible Paths
case http.MethodGet + "/api/prometheus/{DatasourceUID}/api/v1/rules":
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/litian_code/grafana.git
git@gitee.com:litian_code/grafana.git
litian_code
grafana
grafana
master

搜索帮助