NoRedirect messing up web pages??

General discussion about web technology.
Post Reply
barbaz
Senior Member
Posts: 10938
Joined: Sat Aug 03, 2013 5:45 pm

NoRedirect messing up web pages??

Post by barbaz »

Apparently, if NoRedirect is set to block redirects to mediafire.com, and you go to a page that redirects to a mediafire file download page, you end up with an endless loop of redirects to the same URL. If redirects to mediafire are allowed however this behavior does not occur. Any ideas what's going on here and how (if?) I might be able to modify the extension so that doesn't happen?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:30.0) Gecko/20100101 Firefox/30.0 SeaMonkey/2.27a1
Hecuba's daughter
Senior Member
Posts: 93
Joined: Mon Oct 01, 2012 6:34 am

Re: NoRedirect messing up web pages??

Post by Hecuba's daughter »

nvm
Last edited by Hecuba's daughter on Sun Jun 22, 2014 8:12 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
barbaz
Senior Member
Posts: 10938
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoRedirect messing up web pages??

Post by barbaz »

Hecuba's daughter wrote:No response from the dev?
I doubt I'd get anywhere contacting the dev - that extension (and also much of the website, it seems) hasn't been updated since early 2011, development is almost certainly dead. It's on me to fix any bugs I find. :|
And I did read the code before posting this, and while I saw a couple of bad practices, I didn't catch anything that would screw around with the server response in that way...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:30.0) Gecko/20100101 Firefox/30.0 SeaMonkey/2.27a1
barbaz
Senior Member
Posts: 10938
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoRedirect messing up web pages??

Post by barbaz »

So I checked if NoRedirect is actually causing this problem by sniffing the traffic with Wireshark, and it looks like there's something really weird on mediafire's end...
With NoRedirect blocking the redirect originating from mediafire.com/?(what ever), the next URL will just 301 to itself.
Without NoRedirect, or with an exception, that URL responds 200 OK.
???
Any workaround other than allowing all redirects to mediafire?

(In case anyone else wants to see this, the URL acting weird is http://tiny.cc/2bsrpw)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
User avatar
therube
Ambassador
Posts: 7956
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: NoRedirect messing up web pages??

Post by therube »

If I add 'www.mediafire.com' to the NoRedirect list, clicking the tinyurl link causes the redirect to "stop".

Either "Address Not Found" or "HTTP/301" depending on the DNS option setting.

IOW, I'm not getting any looping.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 SeaMonkey/2.24
barbaz
Senior Member
Posts: 10938
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoRedirect messing up web pages??

Post by barbaz »

Oh sorry, I should have said that I use it with the rule

Code: Select all

.*
with only the "Source" box checked.
The looping occurs on the redirection you get *after* "expanding" the tiny URL, just keep clicking through redirects until you get an actual page or the same URL over and over.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
Hecuba's daughter
Senior Member
Posts: 93
Joined: Mon Oct 01, 2012 6:34 am

Re: NoRedirect messing up web pages??

Post by Hecuba's daughter »

nvm
Last edited by Hecuba's daughter on Sun Jun 22, 2014 8:12 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
barbaz
Senior Member
Posts: 10938
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoRedirect messing up web pages??

Post by barbaz »

Hecuba's daughter wrote:Perhaps that's how mediafire keeps track of how its service is used, redirecting depending on if a request for a download comes from outside or inside its own site?
Maybe that's what they want to do and their work experience programmer has done a clunky realisation.
The final (or endlessly looping) redirect is initiated by their site in both cases so that's surely not it.
Hecuba's daughter wrote:Ruled out referrer interdicts? I block referrers everywhere and that sometimes breaks stuff.
I don't mess with referer headers, but good thought - looked back at the saved logs from Wireshark again, and it did *not* seem to detect any referer headers in the capture without NoRedirect...

I also tested it with my own Gecko addon which basically logs all http-on-modify-request events by referer, method, and destination, and it seems that with NoRedirect, *two* requests are being issued by the browser for both the tiny URL and the mediafire/? URL, but only one per "loop" of the last redirect; whereas each redirect is only requested *once* without NoRedirect...
EDIT (Although Wireshark didn't detect different numbers of the same HTTP request/redirect in each case.)
Also revealed by my addon is that without NoRedirect, the referer remains constant through redirection chains, but with NoRedirect, each redirection landing page becomes the next referer.

This is getting stranger and stranger...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:30.0) Gecko/20100101 Firefox/30.0 SeaMonkey/2.27a1
Post Reply