Page 1 of 1

[Nagios-devel] Fixes for url_encode()

Posted: Sat Oct 23, 2004 2:21 am
by Guest
This is a multi-part message in MIME format.
--------------020809080005010203070202
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

In the original CVS version of url_encode() only alphanumerical
characters were left unencoded. This is in violation of RFC1866, which
also excludes dots from url encoding schemes.

Standards compliant browsers (such as Mozilla Firefox) may experience
problems with url encoded dots.

This patch includes dots ('.') in the characters not being url encoded
and thus fixes the problem.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer

--------------020809080005010203070202
Content-Type: text/plain;
name="nagios-cgi-url_encode.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios-cgi-url_encode.diff"

diff -urN ../Nagios/cgi/cgiutils.c ./cgi/cgiutils.c
--- ../Nagios/cgi/cgiutils.c Fri Oct 22 18:51:31 2004
+++ ./cgi/cgiutils.c Sat Oct 23 12:17:54 2004
@@ -1291,8 +1291,8 @@
break;
}

- /* alpha-numeric characters don't get encoded */
- else if(((char)input[x]>='0' && (char)input[x]='A' && (char)input[x]=(char)'a' && (char)input[x]='0' && (char)input[x]='A' && (char)input[x]=(char)'a' && (char)input[x]<=(char)'z') || (char)input[x]==(char)'.'){
encoded_url_string[y]=input[x];
y++;
}

--------------020809080005010203070202--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]