Commit Graph

24 Commits

Author SHA1 Message Date
Tony Murray
7620d220e4 Fix alert rule name stored XSS (#16443)
https://github.com/librenms/librenms/security/advisories/GHSA-7f84-28qh-9486
2024-09-29 13:42:21 +01:00
Justin Lentz
cdc360dcdb Use Device Displayname for AlertRules (#16322)
* Use Displayname for AlertRules

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-08-28 21:35:20 +02:00
Jeff Engleman
8866ab3119 Add link on alert-rules page to display active alerts for rule (#16232)
* Add link on alert-rules page to display active alerts for rule

* replace ? with / per convention

* make the alert icon clickable too

* Lower the brightness of the warning rows
2024-07-25 21:43:44 -05:00
Garcia MICHEL
d8eec57690 Fix pagination in alert rules page (#15659) 2023-12-19 10:37:10 -06:00
Justin Lentz
8c96a391c9 Clarify Alert Notify Settings (#14974)
* Update print-alert-rules.php

* Update print-alert-rules.php

Was hoping to avoid word wrap with notify, but can't be avoided, so changing to notification
2023-04-24 18:57:13 -05:00
Tony Murray
d86cbcd96d Fix alert rules XSS (#14471)
Fixes html injection for map items
2022-10-17 12:32:58 -05:00
Feras Al-Kassar
35a6905092 Fix security vuls (#13554)
* Fix XSS vulnerabilities

* fix XSS vulnerabilities in alerts.inc.php

* fix XSS vulnerability in poller-groups.inc.php

* small fix for the integration

* another fix for the inegration

* another fix for the inegration

* change the sanitizer at sources instead of json_encode sinks

* another change sanitizer at sources instead of json_encode sinks

* another change sanitizer at sources instead of common_output and current_config sinks

* fix path manipulation vulnerability
2021-11-24 10:00:25 -06:00
Tony Murray
0b8b97bb68 Push Notifications (Mobile and PC) (#13277)
* Update manifest and add service worker
cleanup icons a bit

* Push notifications WIP

* navigate working

* cleanup

* acknowledge wired up

* Set VAPID keys on composer install

* Component to control notification permissions.

* Allow all user option to validate

* Enable on browser load if transport exists.

* Check for transport before showing user permissions
translations

* Documentation

* style fixes

* access via the attribute model

* fix alerting test

* update schema

* cleanup subscription on disable

* non-configurable db and table for webpush subscriptions (respect system connection)

* revert AlertTransport change
hopefully phpstan can figure it out

* phpstan fixes

* Support custom details display

* Match transport names to brand's preferred display

* less duplicate id errors

* Tests are done in Laravel code now so
remove legacy function usage... could be better, but ok

* Style fixes

* Style fixes 2

* Fix alert test

* Doc updates requires HTTPS and GMP

* unregister subscription when permission is set to denied

* cleanup after user deletion

* delete the right thing

* fix whitespace

* update install docs to include php-gmp

* suggest ext-gmp

* update javascript

* Update functions.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-10-06 07:29:47 -05:00
Jellyfrog
258505ed44 Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Kevin Zink
21a5f756f4 Fix "Sub-directory Support" in small steps (#12905)
* Fix "Sub-directory Support" in small steps

This fixes small parts from #12205 part 2

* Update print-alert-rules.php

fix stryle

* Update print-alert-rules.php

Fix typo
2021-05-22 15:38:53 +02:00
Tony Murray
3d62be5003 Jquery upgrade (#12802)
* WIP js upgrades

* trying 3.0

* Event handler changes

* fix alert rule collection loading

* blur fix

* jQuery 3.5
homescreen no warnings

* actually 3.6 include js

* Update bootstrap to 3.4.1

* missed file

* Update and test install process

* cleanup

* attempt to version js files that were updated.
2021-05-11 08:08:06 -05:00
Jellyfrog
20b4215204 Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01:00
SourceDoctor
deae23cca7 Mark acknowledged Alerts in Alert Rule List (#12320)
* Mark acknowledged Alerts in Alert Rule List

* style fix
2020-11-17 22:28:57 -06:00
Jellyfrog
29f45ca352 Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
Jellyfrog
0d56bbd946 Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
Jellyfrog
82f43cb98d Apply fixes from StyleCI (#12120) 2020-09-21 15:40:17 +02:00
SourceDoctor
d2247ebda3 Running Alerts colorized depending on to their severity (#11210)
* Running Alerts colorized depending on to their severity

* extra alert styling to generic function

* .

* link from table alerts to alert_layout function

* info icon for information alert severity
2020-03-01 15:50:45 +01:00
SourceDoctor
e7f587e9f0 Copy existing Alert Rule (#11195) 2020-02-26 15:07:48 +01:00
SourceDoctor
5bfc44f812 Location based Alert Rule (#11128)
* Location base Alert Rule

* travis fix
2020-02-12 12:53:26 -06:00
Joseph Tingiris
c2dfe7b21c Renovated Alert Rules (#11115)
* Change select order from id to name

* added example icmp/snmp down rules given by @kkrumm1

* Renovated Alert Rules

* Defaulted sort by name
* Moved top buttons and results selector outside of table and aligned them with pull-left and pull-right
* Collapsed '#' (ID) into 'Type' and added titles for the icons
* Added Devices and Transports columns for each rule
* Moved Extra column next to transports
* Added icons for Enabled when a user does not have global admin
* Changed row_# variable to rule_id_#
* Some 'else' cleanup
* Added various title tags for more information when hovering
* Moved pagination outside of table and align it with pull-left and added a bootgrid style summary pulled-right
* Added table & th tags for bootgrid (but didn't turn it on)

* code climate, round 1

* code climate, round 2

* add hrefs for device & device group edit

* added trailing slash for device-groups/../edit/

* prevent #name conflict with transport modal

* add hrefs for transport & transport group edit

* use popover consistently

* code climate, round 3

* removed unused variables

* code climate, round 4

* popover variables

* reload after successful delete

* more informative feedback

* use toastr, not #message, & don't reload

* added license header & fail faster if not admin

* use (more informative) ajax error message

* delete confirmation with alert name in the modal

* print each device per line

* add href for all devices

* refresh status & enabled data-content when/if a rule is turned on/off

* use DRY style per @SourceDoctor (& my) preference); codeclimate meh

* point devices popover to the right
2020-02-10 02:06:12 +01:00
SourceDoctor
823d93efda On editing device, only show assigned alert rules (#10787)
* only show alert rules assigned to device
* simplyfing sql query
* changed query to uppercase
* redesign alert rule filter
2019-11-27 11:32:09 +01:00
Tony Murray
e99f421511 Remove legacy auth usage of $_SESSION (#10491)
* Remove auth use of $_SESSION

Will break plugins that depend on $_SESSION, Weathermap was already fixed.
Port them to use Auth::check()/Auth::user()/Auth:id()

* revert accidental replacement
2019-08-05 14:16:05 -05:00
Tony Murray
3ead462549 Enable CSRF protection (#10447)
* Enable CSRF protection

* fix style issues
2019-07-17 07:20:26 -05:00
Tony Murray
36431dd296 Security fix: unauthorized access (#10091)
* Security fix: unauthorized access
Affects nginx users:
Moved php files outside of public html directory (Apache was protected by .htaccess)

Affects all users:
Some files did not check for authentication and could disclose some info.
Better checks before including files from user input

* git mv html/includes/ includes/html
git mv html/pages/ includes/html/
2019-04-11 23:26:42 -05:00