Redirector icon indicating copy to clipboard operation
Redirector copied to clipboard

[fr] Activate redirect for GET after a POST redirect

Open DamianFekete opened this issue 2 years ago • 1 comments

If you do a POST request that returns a 3xx redirect, the add-on thinks that the following GET is actually a POST request and ignores it.

function checkRedirects(details) {

	//We only allow GET request to be redirected, don't want to accidentally redirect
	//sensitive POST parameters
	if (details.method != 'GET') {
		return {};
	}
        ...

If this is the case, details.method is indeed POST, but details.originalUrl is not null anymore and the request to the Location: xxx header is done over a GET request. If this is 100% the case, the script should perform the redirect if originalUrl is set.

DamianFekete avatar Oct 17 '22 09:10 DamianFekete