Some services such as EZproxy provide links have urls that provide another url as a query string parameter, for example:
http://ezproxy.domain.com/login?url=http://another.domain.com
It looks as if the URL validation is not properly formatting these links. The link turns into the following:
http://ezproxy.domain.com/login?url=http%3A//another.domain.com
It gets worse when the url passed as the query string has query strings in them, for example
http://ezproxy.domain.com/login?url=http://another.domain.com/some/file?...
turns into:
http://ezproxy.domain.com/login?url=http%3A//another.domain.com/some/fil...
Comment | File | Size | Author |
---|---|---|---|
#10 | _link_parse_str_keyvalue_fix-2036645-10.patch | 457 bytes | lex0r |
Comments
Comment #1
ubun2Junky CreditAttribution: ubun2Junky commentedpshafer;
I'm also having the exact same issue. I'm using ezProxy and I'm getting the exact same results. Seems like the query string is getting web encoded. Did you find a solution or a workaround?
Comment #2
pshafer CreditAttribution: pshafer commentedI actually hacked the link module, however we are also using proxy by host so were are slowly moving to changing the urls from:
http://ezproxy.host.edu/login?url=http://somehost.com/some/path
to
http://somehost.com.ezproxy.host.edu/some/path
Let me know if you want to see the changes I made to the link field module.
Comment #3
duckydan CreditAttribution: duckydan commentedI would like to see that please. Also using EZproxy and having major problems.
Comment #4
alevtina CreditAttribution: alevtina commentedI, too, am interested in seeing your changes. Please share!
Comment #5
modulo CreditAttribution: modulo commentedI am having the same issue here. I would be interested in seeing your changes as well.
Comment #6
jcfiala CreditAttribution: jcfiala commentedSo, as far as I can see from looking at http://en.wikipedia.org/wiki/Query_string#URL_encoding, encoding the : in the querystring is what's supposed to happen.
Comment #7
adamzimmermann CreditAttribution: adamzimmermann commentedI'm not super familiar with url encoding and my issue may not be the same as this one, but it seems related. If it is different, and not a works as designed issue let me know and I will file a new issue.
The first link is the link as entered, the second link is how it is being formatted when it is displayed on the page.
The second link returns a 404, which is obviously a problem. I fixed the issue in the interim by intercepting the link and calling urldecode() on it.
Let me know if this is something that is expected, related to this issue, and/or if I could help solve this by digging into the code if we determine this is an issue.
Thanks,
Adam.
Comment #8
Stac3y CreditAttribution: Stac3y commentedI'm having the same problem. I'd like to see your changes too.
Comment #9
lex0r CreditAttribution: lex0r commentedThe issue seems to be of major importance. I also stumbled upon it when working with some tracking URLs. Here is an example:
Original URL:
http://ad.zanox.com/ppc/?19542219C370930768&ULP=[[ASOS/ASOS-Spring-Break...
URL that is then rendered and available in entity field under "url" key:
http://ad.zanox.com/ppc/?19542219C370930768&ULP=%5B%5BASOS/ASOS-Spring-B...
As you may see, iid argument now doesn't have a value it should have (3413976). This is definitely a major bug, although it is mitigated by a bit specific conditions.
As a workaround, I will probably apply a patch from this issue https://drupal.org/node/1814444
Comment #10
lex0r CreditAttribution: lex0r commentedI found the reason, and the patch is really awesome :)
Incoming URL wasn't supposed to have second unescaped "=" inside "key=value" pair of the URL's query part. Now it only gets first two items of explode()'s result.
Comment #11
jcfiala CreditAttribution: jcfiala commentedAh, I see... that's interesting.
I don't see any problem with that patch, myself - anyone else want to give it a try, they can, but it looks simple enough for me to boost it up to RTBC.
Comment #13
jcfiala CreditAttribution: jcfiala commentedOkay, this is merged into code, and should show up in 7.x-1.x-dev tomorrow sometime.
Thanks, lex0r, you should get credit for the commit.