Hi, Mathieu Gagné wrote:
A bugfix has been applied in Nagios 3.0.2. In fact, the behavior in Nagios 3.0.1 was the wrong one I guess.
This bugfix was introduced here: http://thread.gmane.org/gmane.network.nagios.devel/5219/focus=5225Some characters don't get encoded and the list is defined in ./common/macros.c on lin 2486
Those characters should not get encoded too: ":", "/", "?", "=" and "&". Attached is a patch that fixes this urlencode issue. -- Mathieu
--- nagios-3.0.2-original/common/macros.c 2008-05-19 14:01:58.000000000 -0400 +++ nagios-3.0.2/common/macros.c 2008-06-19 15:41:56.000000000 -0400 @@ -2484,7 +2484,7 @@ for(x=0,y=0;input[x]!=(char)'\x0';x++){ /* alpha-numeric characters and a few other characters don't get encoded */ - if(((char)input[x]>='0' && (char)input[x]<='9') || ((char)input[x]>='A' && (char)input[x]<='Z') || ((char)input[x]>=(char)'a' && (char)input[x]<=(char)'z') || (char)input[x]==(char)'.' || (char)input[x]==(char)'-' || (char)input[x]==(char)'_'){ + if(((char)input[x]>='0' && (char)input[x]<='9') || ((char)input[x]>='A' && (char)input[x]<='Z') || ((char)input[x]>=(char)'a' && (char)input[x]<=(char)'z') || (char)input[x]==(char)'.' || (char)input[x]==(char)'-' || (char)input[x]==(char)'_' || (char)input[x]==(char)':' || (char)input[x]==(char)'/' || (char)input[x]==(char)'?' || (char)input[x]==(char)'=' || (char)input[x]==(char)'&'){ encoded_url_string[y]=input[x]; y++; }
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null