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

Can't set cookie in middleware when ownCloud is not installed in a folder #19196

Closed
oparoz opened this issue Sep 20, 2015 · 6 comments · Fixed by #19607
Closed

Can't set cookie in middleware when ownCloud is not installed in a folder #19196

oparoz opened this issue Sep 20, 2015 · 6 comments · Fixed by #19607

Comments

@oparoz
Copy link
Contributor

oparoz commented Sep 20, 2015

To test this

  1. Launch the VM
  2. Add cookie setting code to middleware of an app and redirect to a page (https://github.com/owncloud/gallery/blob/master/middleware/checkmiddleware.php#L150-L159)
  3. Add code to landing page which reads the cookie (https://github.com/owncloud/gallery/blob/master/controller/pagecontroller.php#L134-L148)
  4. Go to localhost/owncloud/trigger.php

You get the cookie

  1. Go to localhost/trigger.php

Now you don't

Notes

It's a simple way to test this, but if you want to discard the methodology, then just set up 2 different instances, one installed in a folder and one installed at / and you'll get the same results.

The problem doesn't happen if you set a cookie in a controller.

Happens on both master and stable8.1

Reminds me of #19010

@LukasReschke @BernhardPosselt @nickvergessen @Xenopathic

@oparoz oparoz added this to the 8.2-current milestone Sep 20, 2015
@LukasReschke
Copy link
Member

Same issue - yes.

@oparoz
Copy link
Contributor Author

oparoz commented Sep 24, 2015

I wonder if this isn't also the cause of #18891

@ghost
Copy link

ghost commented Oct 1, 2015

is this resolved?

@LukasReschke
Copy link
Member

Let me try to hook up a debugger on iOS then.

@cmonteroluque - not yet. Will dig into this tomorrow.

@ghost
Copy link

ghost commented Oct 2, 2015

@LukasReschke thanks!

@DeepDiver1975
Copy link
Member

@LukasReschke any update on this? THX

@ghost ghost assigned LukasReschke Oct 6, 2015
LukasReschke added a commit that referenced this issue Oct 6, 2015
Otherwise an empty string is used indicating the cookie is only valid for those resources. This can lead to eunexpected behaviour.

Fixes #19196
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants