Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClearanceHandler overwrite Cookies #30

Closed
highfredo opened this issue Mar 8, 2024 · 0 comments
Closed

ClearanceHandler overwrite Cookies #30

highfredo opened this issue Mar 8, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@highfredo
Copy link
Contributor

highfredo commented Mar 8, 2024

Hi!

Following the issue Jackett/Jackett#14511 I found that this function

private void InjectSetCookieHeader(HttpResponseMessage response, FlareSolverrResponse flareSolverrResponse)
is overwriting the all cookies obtained here
response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);

So when you get the response, it is no longer valid since it is for another different session.

For the specific case of Jackett, the following is happening:

  1. Make a request to http://wolfmax4k.com/, but cloudflare protection pop up
  2. Make a request to flaresolverr to solve the challenge
  3. Make another request to http://wolfmax4k.com/ but with only the cloudflare cookies, without the other cookies obtained in step 2
  4. Now, it injects the rest of the cookies in the step 2, but the result of step 3 is no longer valid, since the token obtained is for another session, not this one.

Possible solutions:

Edit:
More info about InjectCookies function,
I dont know what "cookieExcess" is for, but I find it strange the value -98... This causes perfectly valid cookies to expire.

Captura de pantalla 2024-03-08 140847

@ilike2burnthing ilike2burnthing added help wanted Extra attention is needed bug Something isn't working labels Mar 8, 2024
highfredo added a commit to highfredo/FlareSolverrSharp that referenced this issue Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants