You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the form arguments with method arg(value), which contain i.e. space, I can read the space as +. I think, that the method in case of GET doesn't decode the URL encoded special characters.
The text was updated successfully, but these errors were encountered:
I use this function in my webserver to decode - I found it using google - I forget where
//URI Decoding function
//no check if dst buffer is big enough to receive string so
//use same size as src is a recommendation
void WEBINTERFACE_CLASS::urldecode(char *dst, const char *src)
{
char a, b,c;
if (dst==NULL) return;
while (*src) {
if ((*src == '%') &&
((a = src[1]) && (b = src[2])) &&
(isxdigit(a) && isxdigit(b))) {
if (a >= 'a')
a -= 'a'-'A';
if (a >= 'A')
a -= ('A' - 10);
else
a -= '0';
if (b >= 'a')
b -= 'a'-'A';
if (b >= 'A')
b -= ('A' - 10);
else
b -= '0';
*dst++ = 16*a+b;
src+=3;
}
else {
c = *src++;
if(c=='+')c=' ';
*dst++ = c;
}
}
*dst++ = '\0';
}
Hello, I have a following html form:
When reading the form arguments with method arg(value), which contain i.e. space, I can read the space as +. I think, that the method in case of GET doesn't decode the URL encoded special characters.
The text was updated successfully, but these errors were encountered: