Skip to content

Commit 8b9f2fd

Browse files
Merge pull request from GHSA-v86x-5fm3-5p7j
Check the validity of the generatorURL field
2 parents 258fab7 + 48314e3 commit 8b9f2fd

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.25.1 / 2023-08-23
2+
3+
* [BUGFIX] Fix stored XSS via the /api/v1/alerts endpoint in the Alertmanager UI.
4+
15
## 0.25.0 / 2022-12-22
26

37
* [CHANGE] Change the default `parse_mode` value from `MarkdownV2` to `HTML` for Telegram. #2981

asset/assets_vfsdata.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/app/src/Views/Shared/Alert.elm

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ titleView alert =
4545

4646
generatorUrlButton : String -> Html msg
4747
generatorUrlButton url =
48-
a
49-
[ class "btn btn-outline-info border-0", href url ]
50-
[ i [ class "fa fa-line-chart mr-2" ] []
51-
, text "Source"
52-
]
48+
if String.startsWith "http://" url || String.startsWith "https://" url then
49+
a
50+
[ class "btn btn-outline-info border-0", href url ]
51+
[ i [ class "fa fa-line-chart mr-2" ] []
52+
, text "Source"
53+
]
54+
55+
else
56+
text ""

0 commit comments

Comments
 (0)