Commit Graph

33 Commits

Author SHA1 Message Date
Tony Murray 61c89794e4 Remove debug globals (#12811)
* Remove $debug global
and $vdebug global
makes these variables more accessible and protects from collisions.

* the on boot set sends application as the first parameter, just handle that

* Relocate other debug related functions

* Log debug to stdout

* Wrong output

* remove stupid constants

* Fix lint and style issues
2021-04-29 22:42:18 -05:00
Jellyfrog 0d56bbd946 Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
Jellyfrog 77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02: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 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
Tony Murray 32a7c50189 Use Laravel authentication (#8702)
* Use Laravel for authentication
Support legacy auth methods
Always create DB entry for users (segregate by auth method)

Port api auth to Laravel

restrict poller errors to devices the user has access to

Run checks on every page load.  But set a 5 minute (configurable) timer.
Only run some checks if the user is an admin

Move toastr down a few pixels so it isn't as annoying.

Fix menu not loaded on laravel pages when twofactor is enabled for the system, but disabled for the user.
Add two missing menu entries in the laravel menu

Rewrite 2FA code
Simplify some and verify code before applying

Get http-auth working
Handle legacy $_SESSION differently.  Allows Auth::once(), etc to work.

* Fix tests and mysqli extension check

* remove duplicate Toastr messages

* Fix new items

* Rename 266.sql to 267.sql
2018-09-11 07:51:35 -05:00
Tony Murray 7250376104 refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth

* fix style

* add property annotations
2018-04-07 21:55:28 +01:00
Neil Lathwood 1bbbaff58b refactor: Moved ifLabel -> cleanPort and updated the usage (#6288)
* refactor: Moved ifLabel -> cleanPort and updated the usage

* added list of tags allowed

* few updates as per comments from @murrant

* Added simple unit tests

* double display for javascript popover

* Remove ifNameDescr() function
Fix realtime port page

* remove accidental temp code

* Remove double display calls in ajax tables
2017-04-04 08:08:23 +01:00
Neil Lathwood f2130e2e38 fix: Fixes ajax_listports.php when displaying non standard chars #5526 (#5620) 2017-01-26 22:18:09 +00:00
Neil Lathwood 9b9c10e204 fix: Cleanup printing ifAlias (#4874) 2016-12-12 14:25:48 +00:00
Tony Murray 9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Neil Lathwood 9aaea7e64e fix: Missing include file for ajax_listports.php causing 500 (#4407) 2016-09-12 08:33:31 +01:00
Neil Lathwood 7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05:00
David Bell f00c383d60 fix: Stop irc bot crashing on .reload #4353
* Removed duplicate include

* Move set_debug into functions.php, and restore the (re)loading of includes/defaults

* Move debug call until after function has been included
2016-09-07 18:42:49 +01:00
laf 5f8705bd37 Changed package names 2016-08-20 12:21:13 +01:00
laf 1cbd142ad7 Fixed some scrut issues 2015-07-23 17:48:22 +01:00
Job Snijders d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
Alexander Sosna 5a7988e2e4 chmod 0644 to php files not directly executed 2015-04-28 22:58:03 +02:00
laf 9abf31878c Updated port list to use ifNameDescr 2014-03-02 15:44:04 +00:00
laf c32a1973d1 Update ajax_listports.php
Now checks if _GET['debug'] isset to avoid php warnings in logs
2013-12-08 10:52:18 +00:00
Paul Gear 3184a35268 Revert boilerplate changes 2013-10-29 05:38:12 +10:00
Brad Peczka 985330f638 Updated copyright and package notices. 2013-10-28 21:39:08 +08:00
Adam Amstrong 4db1454e92 move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.
git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-16 13:25:50 +00:00
Adam Amstrong dbf212f652 phpDocumentator headers. retire static-config. IF YOU ARE READING THIS, REMOVE IT FROM THE BOTTOM YOUR CONFIG.PHP. YES. YOU.
git-svn-id: http://www.observium.org/svn/observer/trunk@3150 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 10:01:42 +00:00
Adam Amstrong 1ad4217f53 fix ajax listports?
git-svn-id: http://www.observium.org/svn/observer/trunk@2393 61d68cd4-352d-0410-923a-c4978735b2b8
2011-07-15 11:01:13 +00:00
Adam Amstrong 6bcc4f4e48 fix some stuff, break some stuff (ports disaply is missing some stuff atm)
git-svn-id: http://www.observium.org/svn/observer/trunk@2290 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-12 22:14:56 +00:00
Tom Laermans f55a30f744 some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice
git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-06 13:54:50 +00:00
Tom Laermans de7ff537cc revert r1957 patch
git-svn-id: http://www.observium.org/svn/observer/trunk@1960 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-23 09:54:56 +00:00
Geert Hauwaerts 6501cd29b5 - Code cleanup by Bastian Widmer.
git-svn-id: http://www.observium.org/svn/observer/trunk@1957 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-22 20:27:39 +00:00
Tom Laermans a32bff3c81 html pages cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@1902 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-17 11:48:03 +00:00
Tom Laermans 30bdd952ee Minor fixes, some cleanups, and standardising on echo("x") instead of echo "x"
git-svn-id: http://www.observium.org/svn/observer/trunk@1728 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-20 14:04:07 +00:00
Adam Amstrong 1c7b486e7c fixes to billing
git-svn-id: http://www.observium.org/svn/observer/trunk@1605 61d68cd4-352d-0410-923a-c4978735b2b8
2010-08-01 17:09:13 +00:00
Adam Amstrong 019e3c347a make billing usable (shonky interface it now has!)
git-svn-id: http://www.observium.org/svn/observer/trunk@1227 61d68cd4-352d-0410-923a-c4978735b2b8
2010-06-21 04:18:06 +00:00