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

MAC is invalid in $session->setId($this->encrypter->decrypt($cookie)) #212

Open
DionisioFG opened this issue Aug 19, 2015 · 6 comments
Open

Comments

@DionisioFG
Copy link

Hi,

I searched for this issue but i did not find anything about it.

I am having an error in two applications in the same domain ( domain/a, domain/b):

SleepingOwl/Admin/Helpers/StartSession.php line 44
"MAC is invalid" in $session->setId($this->encrypter->decrypt($cookie))

To check this error:

  • I clear the browser cache.
  • I enter in domain/a without problems.
  • I enter in domain/b and give me this error
  • I clear the browser cache
  • I enter in domain/b without problems.
  • I enter in domain/a and give me this error.

It seems that it is problem of 2 or more applications in the same domain

@followtheart
Copy link

The MAC is invalid

I have this problem too.More seriously csrf-token and laravel_token seems to be constant!!!

@Squarius
Copy link

Same Problem here.

@followtheart
Copy link

I delete browser's cookies and sessions,and it works fine now.

@Squarius
Copy link

Thanks. That helped.

@denistorresan
Copy link

Hello to all,
I probably found the problem, and it's located into SleepingOwl/Admin/Helpers/StartSession.php line 44 as says @DionisioFG.

The same situation appear also when you try to navigate a site in HTTP, than navigate the same site in HTTPS.

My solution is to wrap the line 44, into try/catch:

try{
$session->setId($this->encrypter->decrypt($cookie));
}catch (\Exception $exc){}

this solves the problem.
I'll do a pull request about this soon.

@denistorresan
Copy link

Hello, I fixed the issues and created a pull request to the main repo:

#253

DasTippspiel added a commit to DasTippspiel/admin that referenced this issue Feb 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants