Skip to content

Conversation

@Magnus010
Copy link
Contributor

@Magnus010 Magnus010 commented Oct 10, 2025

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Added a cookie expiration of one week to allow long-running browser sessions to request new cookie.
Added a try-except block around the second cookie decode attempt to allow invalid cookies to be removed.

Benefits of this PR and context:

Applying these changes locally allowed my long-running browser sessions to automatically request login credentials again. Invalid cookies were handled properly due to the new try-except logic and new cookies have an expiration of one week so the browser will automatically request credentials after the cookie has expired.

Closes #60

How Has This Been Tested?

I deployed these changes in my personal Docker stack with other applications using ldap-auth. The changes worked immediately as I had several long-running tabs with "500 Internal Server Error" errors now properly show the ldap-auth login page.

Source / References:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-5b3ce53a-dev-8633511ca0354f0ff5a19b7236611b21f5e4ef56-pr-61/index.html
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-5b3ce53a-dev-8633511ca0354f0ff5a19b7236611b21f5e4ef56-pr-61/shellcheck-result.xml

Tag Passed
amd64-3.4.5-pkg-5b3ce53a-dev-8633511ca0354f0ff5a19b7236611b21f5e4ef56-pr-61
arm64v8-3.4.5-pkg-5b3ce53a-dev-8633511ca0354f0ff5a19b7236611b21f5e4ef56-pr-61

@aptalca aptalca self-assigned this Oct 10, 2025
@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-01cdfb4d-dev-ff7cb2df58891b50d94a90d06f4c7106960ce469-pr-61/index.html
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-01cdfb4d-dev-ff7cb2df58891b50d94a90d06f4c7106960ce469-pr-61/shellcheck-result.xml

Tag Passed
amd64-3.4.5-pkg-01cdfb4d-dev-ff7cb2df58891b50d94a90d06f4c7106960ce469-pr-61
arm64v8-3.4.5-pkg-01cdfb4d-dev-ff7cb2df58891b50d94a90d06f4c7106960ce469-pr-61

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-cf4419a9-dev-c1584f95b6844aac8317567c3d80f2a210d5e689-pr-61/index.html
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-cf4419a9-dev-c1584f95b6844aac8317567c3d80f2a210d5e689-pr-61/shellcheck-result.xml

Tag Passed
amd64-3.4.5-pkg-cf4419a9-dev-c1584f95b6844aac8317567c3d80f2a210d5e689-pr-61
arm64v8-3.4.5-pkg-cf4419a9-dev-c1584f95b6844aac8317567c3d80f2a210d5e689-pr-61

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-cf4419a9-dev-e5215ecd562cab1a8075924d6979c8aa6fba3584-pr-61/index.html
https://ci-tests.linuxserver.io/lspipepr/ldap-auth/3.4.5-pkg-cf4419a9-dev-e5215ecd562cab1a8075924d6979c8aa6fba3584-pr-61/shellcheck-result.xml

Tag Passed
amd64-3.4.5-pkg-cf4419a9-dev-e5215ecd562cab1a8075924d6979c8aa6fba3584-pr-61
arm64v8-3.4.5-pkg-cf4419a9-dev-e5215ecd562cab1a8075924d6979c8aa6fba3584-pr-61

@LinuxServer-CI
Copy link
Contributor

This pull request 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.

@github-project-automation github-project-automation bot moved this from PRs to PRs Approved in Issue & PR Tracker Nov 24, 2025
@aptalca aptalca merged commit 9a53ccb into linuxserver:master Nov 24, 2025
4 checks passed
@LinuxServer-CI LinuxServer-CI moved this from PRs Approved to Done in Issue & PR Tracker Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

[BUG] InvalidToken error followed by UnicodeDecodeError

4 participants