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

Login causing global logins #4

Open
kentr opened this issue Jan 26, 2016 · 7 comments
Open

Login causing global logins #4

kentr opened this issue Jan 26, 2016 · 7 comments

Comments

@kentr
Copy link
Collaborator

kentr commented Jan 26, 2016

Logging in via one browser resulted in my being logged in automatically when using another browser which should have caused an anonymous visit.

To repeat

  1. Log in using one browser.
  2. Visit the home page using another browser which shouldn't be logged in.

Expected results

The second browser shouldn't be logged in. It should be an anonymous user visit.

Actual results

The second browser is already logged in when the page loads.

@marcj
Copy link
Member

marcj commented Feb 19, 2016

"another browser" means really a completely different browser? I guess this has then something todo with $_SESSION if drupal is using it because this var is actually always the same and should be replaced after each request.

@kentr
Copy link
Collaborator Author

kentr commented Feb 20, 2016

Yeah, a completely different browser.

I think it's similar to what you're suggesting. Looks like this piece isn't fully converted to dependency injection and uses a global (singleton?) containing the current user: \Drupal::currentUser().

@kentr
Copy link
Collaborator Author

kentr commented Feb 20, 2016

Hmm. If I'm reading this correctly, the service uses \Drupal\Core\Session\AccountProxy, and the current user can be changed in the request pipeline.

Ah, but it would probably still be global...

@kentr
Copy link
Collaborator Author

kentr commented Mar 11, 2016

@marcj Does authentication work as expected in the Symfony & Laravel versions of PHP-PM?

@marcj
Copy link
Member

marcj commented Mar 11, 2016

Thats a good question, I guess so, but I'm not sure.

@marcj
Copy link
Member

marcj commented Mar 18, 2016

@kentr I've fixed the cookie and header sending issue in HttpKernel. Login works there now correctly. Unfortunately php-pm-drupal needs some adjustments to keep it working with the current master@php-pm. I'm providing you tomorrow a pull-request also with changes for #11

@kentr
Copy link
Collaborator Author

kentr commented Nov 8, 2016

@bertrama's idea in the D7 issue might help with this.

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

2 participants