Author:   Lars Michelsen <[email protected]>
Date:     Tue Apr 30 16:10:53 2013 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Tue Apr 30 16:10:53 2013 +0200

FIX: Not providing auth credentials in http requests to proxy when none set

---

 ChangeLog                            |    3 +++
 etc/nagvis.ini.php-sample            |    5 +++--
 share/server/core/sources/geomap.php |    4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4d931d8..e5e60e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 Automap:
   * FIX: Added missing program restarted check to invalidate chaches
 
+Geomap:
+  * FIX: Not providing auth credentials in http requests to proxy when none set
+
 Frontend:
   * FIX: Fixed "Undefined index" error when changing backend_id of maps
   * Reverted change from 1.7.5 (Weathermap lines with byte/bit values in 
diff --git a/etc/nagvis.ini.php-sample b/etc/nagvis.ini.php-sample
index 63ad970..3ed5817 100644
--- a/etc/nagvis.ini.php-sample
+++ b/etc/nagvis.ini.php-sample
@@ -64,8 +64,9 @@
 ; The proxy url to be used in NagVis can be configured here. One possible value
 ; is "tcp://127.0.0.1:8080".
 ;http_proxy=""
-; Most proxies require authentication to access the internet.
-;http_proxy_auth="user:password"
+; Most proxies require authentication to access the internet. Use the format
+; "<username>:<password>" to provide auth credentials
+;http_proxy_auth=""
 ; Set the timeout (in seconds) for outbound HTTP requests (for example geomap 
requests)
 ;http_timeout=10
 ;
diff --git a/share/server/core/sources/geomap.php 
b/share/server/core/sources/geomap.php
index 0ad0fe2..0874f67 100644
--- a/share/server/core/sources/geomap.php
+++ b/share/server/core/sources/geomap.php
@@ -105,11 +105,11 @@ function geomap_get_contents($url) {
         );
 
         $proxy = cfg('global', 'http_proxy');
-        if($proxy !== null) {
+        if($proxy != null) {
             $opts['http']['proxy'] = $proxy;
             $opts['http']['request_fulluri'] = true;
             $proxy_auth = cfg('global', 'http_proxy_auth');
-            if($proxy_auth !== null) {
+            if($proxy_auth != null) {
                 $opts['http']['header'] = 'Proxy-Authorization: Basic ' . 
base64_encode("$proxy_auth");
             }
         }


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to