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

Remove version number from cookies #7639

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ about: Tracking the progress on preparing a new release branch
* [ ] package.json
* [ ] In setup.pm, add support to create databases of the version that 'master' becomes
* [ ] In LedgerSMB.pm, increase the $VERSION variable
* [ ] In bin/ledgersmb-server.psgi adjust the version-check regex and the cookie name in the `__DATA__` section
* [ ] In bin/ledgersmb-server.psgi adjust the version-check regex
* [ ] In locale/LedgerSMB.pot, adjust the Project-Id
* [ ] In t/data/Is_LSMB_running.html, increase the version text
* [ ] Update README.md reference to `docker-compose` file (both on the branch and on master)
* [ ] Create a new docker-compose branch
* [ ] Update the cookie's version number in the default config files `doc/conf/ledgersmb.yaml.*`
* [ ] Add the new version to renovate.json baseBranches

## General preparation
Expand Down
2 changes: 1 addition & 1 deletion bin/ledgersmb-server.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ $builder->to_app(

__DATA__
cookie:
name: LedgerSMB-1.12
name: LedgerSMB
db:
$class: LedgerSMB::Database::Factory
connect_data:
Expand Down
5 changes: 4 additions & 1 deletion doc/conf/ledgersmb.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

cookie:
name: LedgerSMB-1.12
# To run multiple LedgerSMB versions in parallel on the same domain,
# set the value of the cookie to 'LedgerSMB-<version>'; e.g. for version
# 1.1, that would become 'LedgerSMB-1.1'
name: LedgerSMB
# Leaving the secret empty causes a secret to be dynamically generated
# secret:

Expand Down
7 changes: 6 additions & 1 deletion lib/LedgerSMB/Routes/ERP/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: LedgerSMB-1.10
name: LedgerSMB
description: |
The authenticating cookie can be obtained by sending a `POST` request
to `login.pl?__action=authenticate&company=<url-encoded-company` with a
Expand All @@ -137,3 +137,8 @@ components:

**Note 2**: the validity of the cookie is as long the user's timeout
when logged into the application (default: 90 minutes).

**Note 3**: Sites may customize the name of the cookie in order to run
multiple versions in parallel. The advice is to append the version name
to the cookie, resulting in cookie name `LedgerSMB-1.1` for LedgerSMB
version 1.1.