Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

[PATCH] Fix infinite rediect loop
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: [PATCH] Fix infinite rediect loop

[PATCH] Fix infinite rediect loop 14 years, 6 months ago #12476

Hi,

I'm attaching a (almost certainly incorrect) patch to fix an issue I've come across when dealing with a component that accepts arguments with urlencoded characters in the (e.g. : or ~ etc.).

The problem is that when JoomSEF tries to work out if it needs to redirect, it compares the old URL to the new one. The old URL is not urlencoded, but the new one is and thus the URLs are considered different and a redirect is performed.

My hacky work around is to simply urldecode the new URL before comparing it. It works for me but I can imagine several places where this approach would fail.

I'm attaching my patch to show where the problem is and how to fix it.

The type of URL that would be effected is:

www.example.com/components/foo/?bar=something:else

As you can see, the URL represents a trivial "foo" component that accepts a bar argument. The argument has a : in it. This is URL encoded to %3A and thus the comparison breaks.

Thanks

Col

Edit; OK, I officially suck: I cannot work out how to attach something :s Here is a pastebin link instead: pastebin.com/Kw2kx23A


(PS: I not sure of the correct way to report bugs. I appreciate the separation of paid vs. free support and how this model works for the vast majority of your customers/users, but as an active participant in multiple FOSS projects, I'm more akin to reporting bugs via bug trackers and attaching test cases and patches. If I've missed where the bugtracker is and am posting in completely the wrong place, please let me know :))
Last Edit: 14 years, 6 months ago by coling.
  • Page:
  • 1
Přihlášení uživatele Prázdný