Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
prevent XSS via admin-notifies system
The admin-notifies system takes user input from the X-Forwarded-For by header, and injects it into html rendered by the browser in the admin-notification system. This patch appropriately escapes all such content injected into the notification drawers. This patch should prevent XSS attacks designed to exploit user credentials or other access. Thanks to Deja Vu Security - Accenture, and Damien Sudol for reporting.
- Loading branch information
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,8 +121,9 @@ function boot (env, language) { | |
| if (env.settings.authDefaultRoles == 'readable') { | ||
| const message = { | ||
| title: "Nightscout readable by world" | ||
| ,message: "Your Nightscout installation is readable by anyone who knows the web page URL. Please consider closing access to the site by following the instructions in the <a href=\"http://nightscout.github.io/nightscout/security/#how-to-turn-off-unauthorized-access\" target=\"_new\">Nightscout documentation</a>." | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
sulkaharo
Member
|
||
| ,message: "Your Nightscout installation is readable by anyone who knows the web page URL." | ||
| ,persistent: true | ||
| ,seeAlso: 'disableWorldReadable' | ||
| }; | ||
| ctx.adminnotifies.addNotify(message); | ||
| } | ||
|
|
||
Why was this changed? We should point users to the docs to reduce support requests