Stunts Forum

ZakStunts - the Competition => General Chat - ZSC => Topic started by: Cas on March 20, 2022, 06:59:42 PM

Title: Error 403 when uploading replays
Post by: Cas on March 20, 2022, 06:59:42 PM
I've been getting this error 403 whenever I want to upload a replay and it's been happening since maybe five months or so. It seems I can easily just ignore the error, as I can post and my lap appears on the scoreboard normally, but I wonder if there's anything that can be done about it or an explanation and if anybody else is getting it. I've mentioned it a couple of times in the Shoutbox, but nobody seems to notice, so I reckon you guys don't know what I'm talking about. You probably don't see it. So I took a picture of it, ha, ha.

The error appears after I browse and pick a replay. It happens every time, no matter how long or short the replay, what car I use, anything.
Title: Re: Error 403 when uploading replays
Post by: dreadnaut on March 20, 2022, 07:36:33 PM
Ah, thank you for opening this thread. You have mentioned it before, and I keep forgetting to reply. Sorry!

What is happening is that when someone selects a replay, the page tries to render an in-place preview: all good, already uploaded, looks truncated, etc.. But it seems that the server does not recognise you as logged in, and it responds with that 403 Unauthorized.

I suspect it has something to do with your cookie settings, but I can't reproduce it. Maybe your browser's network inspector could shed some light on the mystery?

Otherwise, I could mute the error. After all, it's an extra feature and if it doesn't work, the upload is not affected.
Title: Re: Error 403 when uploading replays
Post by: Cas on March 20, 2022, 10:34:25 PM
Could be. I took a look with the inspector (F12). I'm using GNU IceCat, which is basically Firefox with a couple of touches. The way it comes by default is very restrictive, but I lift most of the configurations, so it's pretty much a lighter Firefox. One thing I do leave as it is is 3rd-party cookies disabled, but I'm using uMatrix and I can see that zak.stunts.hu does not use 3rd-party cookies; only its own. So it should be OK, I guess.

I took a picture with the inspector, but I think you mean that look more into the code because what I'm getting is just the output. I'll show you.

I've really no problem with the error message, but I kind of think that maybe I can help fixing something. Also, if it normally displays a preview, it'd be nice to be able to see it.

I also use, as I said, uMatrix, as well as uBlock Origin, but when I disable both and reload and go back to uploading a replay, it still displays the message.
Title: Re: Error 403 when uploading replays
Post by: dreadnaut on March 20, 2022, 10:42:29 PM
Can you check the "Network" tab? It's in the top right corner of your screenshot.

Open the tab, refresh the page, select a replay. There should be a new network request for the preview at that point. If you click on it, you'll see its "Request Headers", which should include ZakStunts' cookie.
Title: Re: Error 403 when uploading replays
Post by: Cas on March 21, 2022, 06:52:25 AM
Uhm.... I first went there and then opened the debugger and went to the tab and I got one thing. Then I did it the other way and I got a different thing. Here are the screenshots....

I think the first one doesn't see the POST because it had already occurred so that's why it gives the GET information, so surely the second one is the one to take into account. It's almost 3:00am here. If it were earlier, I'd probably understand it better, ha, ha.
Title: Re: Error 403 when uploading replays
Post by: dreadnaut on March 21, 2022, 08:39:29 PM
That's the right place!

In the column that appears on the right, there are different sections. At the bottom you should have "Request Headers". Check if you have a value for the Cookie header.

If it's missing, there some issue with your browser. If it's there, I'll have to debug this on the server.
Title: Re: Error 403 when uploading replays
Post by: Cas on March 23, 2022, 12:46:14 AM
Is it here?  Uhm... if it is, then no, it's not there. I really don't know why, since I'm not blocking 1st-party cookies. Anyway. Browsers are extremely complex. So many things can go wrong!
Title: Re: Error 403 when uploading replays
Post by: dreadnaut on March 23, 2022, 03:09:11 PM
Quote from: Cas on March 23, 2022, 12:46:14 AM
Is it here?  Uhm... if it is, then no, it's not there.

Yeah, it's missing :( — There is a new release of IceCat in development, which would bring the corresponding Firefox version up to 91. That might help... or not. Otherwise you could try with LibreWolf (https://librewolf.net/), another privacy-first fork of Firefox, which tracks current releases.
Title: Re: Error 403 when uploading replays
Post by: Cas on March 24, 2022, 12:01:56 AM
Oh, I didn't know about LibreWolf!  I'll take a look!

Yes, you know I'm mostly interested in the privacy aspect, but I think that GNU IceCat is actually more concerned about software being free than about privacy. So I don't use it for what it really is made for. Maybe LibreWolf will be more suitable for me :)