Commit Graph

20982 Commits

Author SHA1 Message Date
dasdromedar
8d2bf6ceb0 Format Oxidized update time (#16455)
* Format Oxidized update time 
Format Oxidized update time to local timezone (instead of UTC)

* extra space removal
* and one more
---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-29 16:00:08 +02:00
Tony Murray
d959bf1b36 Sanitize custom map SVGs (#16448)
https://github.com/librenms/librenms/security/advisories/GHSA-x8gm-j36p-fppf

Will only sanitize new SVGs. If you have existing backgrounds, they will not be sanitized.
XSS cannot be triggered within the LibreNMS UI, to trigger, you must directly visit the background image URL.
2024-09-29 14:17:21 +01:00
Tony Murray
36b38a50cc Fix device dependencies xss (#16447)
https://github.com/librenms/librenms/security/advisories/GHSA-rwwc-2v8q-gc9v

Create html programmatically to prevent printing user input out.
2024-09-29 14:06:52 +01:00
Tony Murray
f259edc19b Fix alert template creation xss (#16446)
https://github.com/librenms/librenms/security/advisories/GHSA-gcgp-q2jq-fw52
2024-09-29 14:02:25 +01:00
Tony Murray
6af12dbc45 Fix potential xss in edit alert transport (#16445)
Would need to be in php code, so not user editable
2024-09-29 14:00:36 +01:00
Tony Murray
ee1afba003 Fix Alert transport details xss (#16444)
* Fix stored XSS in alert transport details

https://github.com/librenms/librenms/security/advisories/GHSA-7f84-28qh-9486

* Fix password double encode
2024-09-29 13:45:16 +01:00
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
eskyuu
0643bb5574 Use 2 decimal places for bps numbers (#16451) 2024-09-29 14:41:38 +02:00
eskyuu
8d793fdda8 Fix default config for custom map height and width (#16449) 2024-09-29 09:44:44 +02:00
Tony Murray
d3b51560a8 Fix device group stored XSS (#16442)
https://github.com/librenms/librenms/security/advisories/GHSA-fc38-2254-48g7
2024-09-28 19:37:46 +01:00
PipoCanaja
ce89f5b410 APC - runtime discovery, apply divisor (#16441)
* fix for discovery

* snmpsim for sensors after #16435

* and tests

* fix RuntimeBattery
2024-09-28 11:05:44 -05:00
Neil Lathwood
43df7f3810 Updated APC sensors to include upsAdvTestDiagnosticsResults state (#16435) 2024-09-28 00:18:30 +02:00
Luis Wolfarth
a6c195ee90 LLDP Discovery - LldpRemPortId convert to string when in HEX (#16438)
* Update discovery-protocols.inc.php

When using the LLDP-V2-MIB, the device may reply with lldpV2RemPortId as hexadecimal. To convert it to a string, this update checks if the lldpV2RemPortIdSubtype is '5' = "interfaceName(5)"; if so, the code removes the character ":" from the value of lldpV2RemPortId and tests if it is hexadecimal. If the test is positive, it translates it into a string.

* Update discovery-protocols.inc.php
Added lines 342 to 345 to convert the lldpRemPortId when is hex and lldpRemPortIdSutype is 5.

* Update discovery-protocols.inc.php
Importing lib StringHelpers.

* tabs + tests PANOS

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-26 20:39:25 +02:00
Neil Lathwood
c4ca7acc4d Improve reset to default button on settings page (#16436) 2024-09-25 23:17:42 -05:00
Tony Murray
d2fb66d3d5 Added global VLAN ports page (#16415)
* Global VLAN ports page

* Show a list of devices too

* Fix a little theme color issues

* oops

* Just put css in the theme

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
Co-authored-by: Neil Lathwood <gh+n@laf.io>
2024-09-25 16:14:13 +01:00
zippanto
2ffe314dc7 Fix custom sensors logic not being loaded in some cases (#16433)
https://community.librenms.org/t/arista-eos-dbm-power-values-are-not-calculated/23848
2024-09-25 16:07:04 +01:00
O Palivan
df84362804 Fix AdvaOSA OS naming (#16425)
* fix OS naming, FSP150CM exists but is not at all the same

* fix tests

* fix os underscore
2024-09-25 14:53:22 +02:00
Neil Lathwood
b7bc6dec10 Stop showing bills that do not exist (#16423)
* Stop showing bills that do not exist

* Updated to a more efficient query

* Moved to use 404 page
2024-09-25 14:45:57 +02:00
Neil Lathwood
9cddd7fd21 Fixed the issues with JetStream lldp discovery (#16414)
* Fixed the issues with JetStream lldp discovery

* Added is_array() check
2024-09-25 14:43:24 +02:00
O Palivan
52c96a6e79 Adva 150CC - Exclude nemihubshelf (150CM) (#16426)
The SysObject ADVA list is messy. "nemihubshelf" device is a 150CM, and crashes when discovered and polled as a 150CC. This PR excludes them from being discovered wrongly.
2024-09-25 12:47:09 +02:00
Steve Calvário
d23ecf551d Fixed normal users UI widget AlertLog Stats (#16363)
* Fix normal users UI widget AlertLog Stats

* Add phpstan-ignore
2024-09-24 22:18:55 +01:00
Daniel Preussker
c250ffa8e9 Fix smokeping generator for TCP transport (#16421) 2024-09-24 08:12:23 +02:00
mcook55
db65bb818a Added support for Siteboss360 appliances (#16422) 2024-09-23 23:53:41 +02:00
Tony Murray
0a5c174f4f Fix test regressions introduced while tests were broken (#16399)
* AuthSSOTest: clear roles cache

* PollingJob: When a poller module doesn't exist, return null instead of false.  Skip all other checks and disable polling in that case.

* Sensors: Guess high and low limits separately as needed

* Sensors: drac test psu current data was wrong, referencing the snmprec, 8 / 10 and 0 / 10 should be the values
NOTE: drac is messed up and runs a billion snmp queriess for no reason

* please phpstan

* Sensors: limits reference old code
move to "creating"

* Fix gw-eydfa accidental assignment

* Fix ies5000 test data now that the bad state is removed

* Fix ies5000 test data part 2

* Move sensor discovery reset into discover_device()

* infinera remove duplicate sensor (also a lot of trailing whitespace apparently)

* Fix innovaphone bad yaml discovery

* module tests should be using null when test data doesn't exist, not an empty array

* When discovery or polling is not supported, dump null instead of an array.
Account for nulls in testing

* update ISE serial

* Janitza was seemingly wrong before

* Remove some private data

* bgp-peers requires ipv4-addresses and ipv6-addresses for bgpPeerIface

* fix polycomLens broken state sensor discovery

* Raritan pdu and pdu2 test data was combined in one test file, split it out

* scs-ks duplicate temperature sensor indexes

* sentry3 someone tried to avoid breaking stuff but just broke things more

* smartos-dcp-m fix incorrect numeric oids

* ssu2000 apparently test data was wrong, must have fixed a bug in the code.

* timos remove duplicate dbm sensor definitions

* bgpPeerIface is working in tests now

* Fix moxa-etherdevice when mibs are a bit different

* xw_to_dbm negative values should return null

* Update cisco test data due previous fixes/changes

* One more bgpPeerIface

* Add orderBy to ospf module db dumps

* Remove links test data for now

* Improve handling of bad data in ipv6-addresses module
2024-09-23 10:11:05 -05:00
mcook55
0e8c4c4947 Added support for Argus Rectifier appliances (#16418) 2024-09-23 12:02:01 +01:00
Tony Murray
37542e1a2d FS centec: disable bulk for vlans (#16417) 2024-09-20 20:13:58 -05:00
Neil Lathwood
146e7fc5ce Updated 'from' values for port graphs to be valid (#16416) 2024-09-20 23:54:19 +01:00
Jellyfrog
375903025d Bump minimum PHP version to 8.2 (#16413) 2024-09-20 02:22:24 +02:00
Neil Lathwood
e53cffbb56 Updated documentation navigation and options to tidy things up (#16409)
* Updated documentation navigation and options to tidy things up

* Small fix to indentation
2024-09-19 20:34:24 +02:00
dependabot[bot]
2fc59a4708 Bump serve-static and express (#16405)
Bumps [serve-static](https://github.com/expressjs/serve-static) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `serve-static` from 1.15.0 to 1.16.2
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.15.0...v1.16.2)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: serve-static
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 21:54:34 +02:00
dependabot[bot]
867c31e18f Bump send and express (#16406)
Bumps [send](https://github.com/pillarjs/send) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `send` from 0.18.0 to 0.19.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.18.0...0.19.0)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: send
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 21:54:16 +02:00
Dag Bakke
7034fd7a40 fix for wrong graph being referenced (#16400)
Co-authored-by: Dag B <Dag B>
2024-09-17 10:26:32 -05:00
Tony Murray
7d450345df Fix sensor state translations (#16393)
* Fix sensor state translations

* Fix up lint/style

* Set state_index_id

* Apply fixes from StyleCI

* Wrong call

* just use a loop

* Wrong id column

* Missing fillable

* Handle sensors missing state translations

* Before making a state index

* Can't map to a state index if it doesn't exist

* Apply fixes from StyleCI

* ies5000 overflowing tinyint

* Accept state translations directly add that in the translation

* handle duplicate state names, but with different case (skip no way to work there)

* Apply fixes from StyleCI

* Fix type stuffs

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-15 02:13:11 +02:00
Tony Murray
47cd0e75de Fix module tests (#16397) 2024-09-15 01:42:33 +02:00
Tony Murray
a6b69c9c4d Save guessed limits (#16396)
* Save guessed limits
Previous code was guessing, then not saving the guess

* Move to creating, which revealed that limits were swapped

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-13 17:50:37 -05:00
Tony Murray
a0587154c4 Sensors move can skip and output into singleton (#16392)
* Sensors move can skip and output into singleton

* style

* rrd_type

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-13 10:23:17 -05:00
Tony Murray
13da0aef4c Remove legacy db config (#16385)
* Remove legacy db config
Should be configured via the environment or .env.

* Lint fix

* Remove call to removed method
2024-09-13 16:25:23 +02:00
Tony Murray
2501b7a4db Remove internal usages of config_to_json.php (#16388)
* Remove internal usages of config_to_json.php

* Appease lint
2024-09-13 13:22:01 +02:00
Tony Murray
00d6fc64d6 Fix sensor discover when device_id is omitted (#16389) 2024-09-12 11:20:50 -05:00
jcamos
4c72856046 Matrix: critical alerts now notify (#16355)
* Update Matrix.php

Changing 'm.text' to 'm.notice' so that when an alert is issued, you get notified on your Matrix client.

The current 'm.text' parameter will silently send you the message, whereas 'm.notice' will send you a message with an alert.

* Enabling notifications on Matrix client

Changing 'm.text' to 'm.notice' (line 47) so that when an alert is issued, you get notified on your Matrix client.

The current 'm.text' parameter will silently send you a message, whereas 'm.notice' will send you a message with an alert.

* Update Matrix.php

* Update Matrix.php

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-12 10:13:21 -05:00
Tony Murray
f7142980d2 python3-command-runner is only available in Ubuntu 24.04 (#16390) 2024-09-11 15:12:11 -05:00
Shane Mc Cormack
5e9e1e9c95 Fix detecting stacks in unstacked switches. (#16384)
Fix #16374
2024-09-10 21:54:52 +02:00
Jellyfrog
77fa7573cf Revert "Convert Config to a singleton (#16349)" (#16382)
This reverts commit f1e7a218f0.
2024-09-10 09:59:20 +02:00
Tony Murray
f1e7a218f0 Convert Config to a singleton (#16349)
* Convert Config to a singleton
Continuation of #14364 by @Jellyfrog
This time, make the old class a shim for the facade.  Will update references in a separate PR.

* Remove logging config call

* Apply fixes from StyleCI

* Fix bad Git constructor call

* Fail on config table does not exist instead of throw exception

* Inline LibrenmsConfig::isRegistered()

* Debug call in case there are more issues,
remove before merge.

* Fix up config tests

* Allow config cache controlled by CONFIG_CACHE_TTL (disabled by default for now)

* Enable config cache for tests

* Remove debug statement and deprecation phpdoc

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-09 18:48:07 +02:00
Martin22
64241dbdf3 Extension of support for IMCO LS/PS backup power sources. (#16377)
* Modification of the MIB name and extension to support all LS and PS backup power sources, including the addition of hardware, firmware, and serial number.

* Fix os name
2024-09-09 13:12:42 +02:00
Tony Murray
071076149a Improved module controls (#16372)
* Improved module controls
Ability to clear device module overrides from webui
Ability to clear all database data for a module (helpful for module you have disabled that still have data)

Database reset only works for modern modules.

* Update functions.php
2024-09-09 09:09:19 +02:00
jayceeemperador
ebce44543c Add Support for Cisco ISE SNS-3595-K9 (#16376)
* Added snmprec file from ISE SNS-3595K9

For Cisco ISE SNS-3595K9 Support

* Create ise_3595.json

For support for Cisco ISE SNS 3595-K9

* ISE: added Support for SNS-3595-K9

Added sysObjectID from SNS-3595-K9
2024-09-09 09:08:49 +02:00
Justin Lentz
30b174508c Fix SmartOptics Skip Values (#16284)
* Update smartos-dcp-m.yaml

* Update smartos-dcp-m.yaml

* Update smartos-dcp-m.yaml

* derp

* Update test data

* Update smartos-dcp-m_dcp-m40-pam4-zr.json

* Update smartos-dcp-m_dcp-m40-pam4-zr.json
2024-09-09 00:00:42 +02:00
PipoCanaja
fc26490bc4 Fix not-nullable columns (#16373) 2024-09-07 16:59:23 -05:00
Tony Murray
3da691277a Sensor: Only post to eventlog when specific columns change (#16370) 2024-09-06 20:49:56 -05:00