Skip to content

Commit

Permalink
Update dates. Fix issue with require_https and debug logging in check…
Browse files Browse the repository at this point in the history
…_auth().
  • Loading branch information
jomann09 committed Jan 6, 2020
1 parent 8680940 commit cc8d007
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.0.3 - 01/06/2020
------------------
- Fixed issue with require_https exiting improperly when set to true -JO

2.0.2 - 07/18/2019
------------------
- Fixed issue with passive check timestamp not being applied properly -SW
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Download the latest tarball and extract to start the install:

```
cd /tmp
wget https://github.com/NagiosEnterprises/nrdp/archive/2.0.2.tar.gz
tar xvf 2.0.2.tar.gz
wget https://github.com/NagiosEnterprises/nrdp/archive/2.0.3.tar.gz
tar xvf 2.0.3.tar.gz
cd nrdp-*
```

Expand Down
2 changes: 1 addition & 1 deletion clients/send_nrdp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* send_nrdp.php - Send host/service checkresults to NRDP with XML
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
* Portions Copyright (c) others - see source code below
*
* License: GNU General Public License version 3
Expand Down
2 changes: 1 addition & 1 deletion clients/send_nrdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# send_nrdp.py - Send host/service checkresults to NRDP with XML
#
#
# Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
# Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
# Originally Authored: Scott Wilkerson ([email protected])
#
# License: GNU General Public License version 3
Expand Down
2 changes: 1 addition & 1 deletion clients/send_nrdp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# send_nrdp.sh - Send host/service checkresults to NRDP with XML
#
#
# Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
# Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
# Originally Authored: Scott Wilkerson ([email protected])
#
# License: GNU General Public License version 3
Expand Down
2 changes: 1 addition & 1 deletion package/fedora/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP Configuration file
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand Down
2 changes: 1 addition & 1 deletion server/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP Configuration file
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand Down
4 changes: 2 additions & 2 deletions server/includes/constants.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP Constants
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand All @@ -27,7 +27,7 @@

// PRODUCT INFO
define("PRODUCT_NAME", "nrdp");
define("PRODUCT_VERSION", "2.0.1");
define("PRODUCT_VERSION", "2.0.3");

// ERROR STRINGS
define("ERROR_CAPABILITY_NOT_ENABLED","NOT ENABLED");
Expand Down
15 changes: 7 additions & 8 deletions server/includes/utils.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP Common Utilities
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand Down Expand Up @@ -447,22 +447,21 @@ function check_auth()

$require_https = grab_cfg_var("require_https", false);

// Verify that we are using HTTPS if we are required
if ($require_https == true) {

_debug(" * require_https either not set or non-false (is required)");

if (!empty($_SERVER['HTTPS'])) {

_debug(" * no https usage, denying auth");
_debug(" * require_https is set to true, checking to make sure request was via HTTPS");
if (empty($_SERVER['HTTPS'])) {
_debug(" * not using https, denying auth");
handle_api_error(ERROR_HTTPS_REQUIRED);
}
}

$require_basic_auth = grab_cfg_var("require_basic_auth", false);

// Verify against basic auth if it is set
if ($require_basic_auth == true) {

_debug(" * require_basic_auth either not set or non-false (is required)");
_debug(" * require_basic_auth is set to true, checking against basic auth users");

$remote_user = grab_array_var($_SERVER, "REMOTE_USER");

Expand Down
2 changes: 1 addition & 1 deletion server/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP - Nagios Remote Data Processor
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand Down
2 changes: 1 addition & 1 deletion server/plugins/nagioscorecmd/nagioscorecmd.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP Nagios Core Command Plugin
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* NRDP Nagios Core Passive Check Plugin
*
*
* Copyright (c) 2008-2018 - Nagios Enterprises, LLC. All rights reserved.
* Copyright (c) 2008-2020 - Nagios Enterprises, LLC. All rights reserved.
*
* License: GNU General Public License version 3
*
Expand Down

0 comments on commit cc8d007

Please sign in to comment.