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

[BUG] Cookie settings don't take effect #86

Closed
1 task done
szerencl opened this issue May 25, 2024 · 3 comments
Closed
1 task done

[BUG] Cookie settings don't take effect #86

szerencl opened this issue May 25, 2024 · 3 comments

Comments

@szerencl
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I tried enabling HttpOnly and Secure cookies in php-local.ini, but when opening the site in my browser and checking the cookies it shows the following:
kép
php-local.ini

session.cookie_secure = 1
session.cookie_httponly = 1
session.cookie_samesite = None

phpinfo() shows the settings taking effect:

Directive | Local Value | Master Value
session.cookie_httponly | On | On
session.cookie_samesite | no value | no value
session.cookie_secure | On | On

Because of this I also tried changing /config/nginx/site-confs/default.conf by adding the following:

    location / {
        # ...
        proxy_cookie_path / "/; secure; HttpOnly; SameSite=none";
        proxy_cookie_flags ~ secure samesite=none;
        # ...
    }

But to no avail.

Expected Behavior

Setting the following in php-local.ini should change the behaviour observed in the browser.

session.cookie_secure = 1
session.cookie_httponly = 1
session.cookie_samesite = None

Steps To Reproduce

  1. Add the following to php-local.ini:
session.cookie_secure = 1
session.cookie_httponly = 1
session.cookie_samesite = None
  1. Restart container
  2. Open Grocy in the browser
  3. Login
  4. Open developer console
  5. Check session cookie

Environment

- OS: Raspbian Bookworm
- How docker service was installed: apt install

CPU architecture

arm64

Docker creation

---
version: "2.4"
services:
  grocy:
    image: lscr.io/linuxserver/grocy:latest
    container_name: grocy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Budapest
    volumes:
      - grocy/config:/config
    ports:
      - 9283:80
    restart: unless-stopped

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2024-03-06 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CI LinuxServer-CI closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Aug 24, 2024
Copy link

This issue is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

2 participants