[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Bug in processing url query arguments that have '/'
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] Bug in processing url query arguments that have '/' |
Date: |
Sun, 07 Aug 2011 13:14:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hello Peng,
AFAICS, `s' is a path, so '/' in the query string is escaped and
`acceptable' doesn't see it.
As for your example:
http://xxx.org/somescript?arg1=/xxy
`s' in this case will be something like:
xxx.org/somescript?arg1=%2Fxxy
Do you have any example where it doesn't work?
Cheers,
Giuseppe
Peng Yu <address@hidden> writes:
> Hi,
>
> The following line is in utils.c.
>
> # in acceptable (const char *s)
>
> while (l && s[l] != '/')
> --l;
> if (s[l] == '/')
> s += (l + 1);
>
> It essentially gets a substring after the last '/'. However, when a
> query has '/', this is problematic. For example, the above code snip
> will extract '/xxy' instead of 'somescript?arg1=/xxy'. I think that
> the above code should add the test of the position of '?'. If there is
> a '?', it should look for the last '/' before '?'. Is it the case?
>
> http://xxx.org/somescript?arg1=/xxy