Skip to content

Commit

Permalink
Merge pull request from GHSA-v86x-5fm3-5p7j
Browse files Browse the repository at this point in the history
Check the validity of the generatorURL field
  • Loading branch information
simonpasquier authored Aug 23, 2023
2 parents 258fab7 + 48314e3 commit 8b9f2fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.25.1 / 2023-08-23

* [BUGFIX] Fix stored XSS via the /api/v1/alerts endpoint in the Alertmanager UI.

## 0.25.0 / 2022-12-22

* [CHANGE] Change the default `parse_mode` value from `MarkdownV2` to `HTML` for Telegram. #2981
Expand Down
4 changes: 2 additions & 2 deletions asset/assets_vfsdata.go

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions ui/app/src/Views/Shared/Alert.elm
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ titleView alert =

generatorUrlButton : String -> Html msg
generatorUrlButton url =
a
[ class "btn btn-outline-info border-0", href url ]
[ i [ class "fa fa-line-chart mr-2" ] []
, text "Source"
]
if String.startsWith "http://" url || String.startsWith "https://" url then
a
[ class "btn btn-outline-info border-0", href url ]
[ i [ class "fa fa-line-chart mr-2" ] []
, text "Source"
]

else
text ""

0 comments on commit 8b9f2fd

Please sign in to comment.