Skip to content

Commit e687fd1

Browse files
committed
Merge branch 'master' of github.com:expressjs/session into chore/generateSessionId
2 parents 4c6e250 + 2cd6561 commit e687fd1

File tree

14 files changed

+135
-61
lines changed

14 files changed

+135
-61
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: monthly
12+
ignore:
13+
- dependency-name: "*"
14+
update-types: ["version-update:semver-major"]

.github/workflows/ci.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
- pull_request
55
- push
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
912
runs-on: ubuntu-latest
@@ -79,33 +82,34 @@ jobs:
7982

8083
- name: Node.js 8.x
8184
node-version: "8.17"
82-
85+
8386

8487
- name: Node.js 9.x
8588
node-version: "9.11"
86-
89+
8790

8891
- name: Node.js 10.x
8992
node-version: "10.24"
90-
93+
9194

9295
- name: Node.js 11.x
9396
node-version: "11.15"
94-
97+
9598

9699
- name: Node.js 12.x
97100
node-version: "12.22"
98-
101+
99102

100103
- name: Node.js 13.x
101104
node-version: "13.14"
102-
105+
103106

104107
- name: Node.js 14.x
105108
node-version: "14.21"
106109

107110
- name: Node.js 15.x
108-
node-version: "15.14"
111+
node-version: "15.14"
112+
109113

110114
- name: Node.js 16.x
111115
node-version: "16.20"
@@ -126,7 +130,7 @@ jobs:
126130
node-version: "21.6"
127131

128132
steps:
129-
- uses: actions/checkout@v4
133+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
130134

131135
- name: Install Node.js ${{ matrix.node-version }}
132136
shell: bash -eo pipefail -l {0}
@@ -185,7 +189,7 @@ jobs:
185189
run: |
186190
if npm -ps ls nyc | grep -q nyc; then
187191
npm run test-ci
188-
cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
192+
cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"
189193
else
190194
npm test
191195
fi
@@ -198,40 +202,42 @@ jobs:
198202
if: steps.list_env.outputs.nyc != ''
199203
run: |
200204
if [[ -d ./coverage ]]; then
201-
mv ./coverage "./${{ matrix.name }}"
205+
mv ./coverage "./${{ matrix.node-version }}"
202206
mkdir ./coverage
203-
mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
207+
mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"
204208
fi
205209
206210
- name: Upload code coverage
207-
uses: actions/upload-artifact@v3
211+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
208212
if: steps.list_env.outputs.nyc != ''
209213
with:
210-
name: coverage
211-
path: ./coverage
214+
name: coverage-${{ matrix.node-version }}
215+
path: "./coverage/${{ matrix.node-version }}"
212216
retention-days: 1
213217

214218
coverage:
219+
permissions:
220+
checks: write # for coverallsapp/github-action to create new checks
221+
contents: read # for actions/checkout to fetch code
215222
needs: test
216223
runs-on: ubuntu-latest
217224
steps:
218-
- uses: actions/checkout@v4
225+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
219226

220227
- name: Install lcov
221228
shell: bash
222229
run: sudo apt-get -y install lcov
223230

224231
- name: Collect coverage reports
225-
uses: actions/download-artifact@v3
232+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
226233
with:
227-
name: coverage
228234
path: ./coverage
229235

230236
- name: Merge coverage reports
231237
shell: bash
232238
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
233239

234240
- name: Upload coverage report
235-
uses: coverallsapp/github-action@master
241+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # master
236242
with:
237243
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codeql.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: ["master"]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: ["master"]
20+
schedule:
21+
- cron: "0 0 * * 1"
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
analyze:
28+
name: Analyze
29+
runs-on: ubuntu-latest
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
38+
39+
# Initializes the CodeQL tools for scanning.
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
42+
with:
43+
languages: javascript
44+
# If you wish to specify custom queries, you can do so here or in a config file.
45+
# By default, queries listed here will override any specified in a config file.
46+
# Prefix the list here with "+" to use these queries and those in the config file.
47+
48+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
49+
# If this step fails, then you should remove it and run the build manually (see below)
50+
# - name: Autobuild
51+
# uses: github/codeql-action/autobuild@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7
52+
53+
# ℹ️ Command-line programs to run using the OS shell.
54+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
55+
56+
# If the Autobuild fails above, remove it and uncomment the following three lines.
57+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
58+
59+
# - run: |
60+
# echo "Run, Build Application using script"
61+
# ./location_of_script_within_repo/buildscript.sh
62+
63+
- name: Perform CodeQL Analysis
64+
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
65+
with:
66+
category: "/language:javascript"

.github/workflows/scorecard.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
steps:
3535
- name: "Checkout code"
36-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
36+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3737
with:
3838
persist-credentials: false
3939

4040
- name: "Run analysis"
41-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
41+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
4242
with:
4343
results_file: results.sarif
4444
results_format: sarif
@@ -60,14 +60,14 @@ jobs:
6060
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6161
# format to the repository Actions tab.
6262
- name: "Upload artifact"
63-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
63+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6464
with:
6565
name: SARIF file
6666
path: results.sarif
6767
retention-days: 5
6868

6969
# Upload the results to GitHub's code scanning dashboard.
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@2f93e4319b2f04a2efc38fa7f78bd681bc3f7b2f # v2.23.2
71+
uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
7272
with:
73-
sarif_file: results.sarif
73+
sarif_file: results.sarif

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ coverage
33
node_modules
44
npm-debug.log
55
package-lock.json
6+
/test/fixtures/server.crt
7+
/test/fixtures/server.key

HISTORY.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
1.18.2 / 2025-07-17
2+
==========
3+
4+
* deps: on-headers@~1.1.0
5+
- Fix [CVE-2025-7339](https://www.cve.org/CVERecord?id=CVE-2025-7339) ([GHSA-76c9-3jph-rj3q](https://github.com/expressjs/on-headers/security/advisories/GHSA-76c9-3jph-rj3q))
6+
17
1.18.1 / 2024-10-08
28
==========
39

@@ -166,7 +172,7 @@
166172
- Improve error message when `expires` is not a `Date`
167173
- perf: enable strict mode
168174
- perf: use for loop in parse
169-
- perf: use string concatination for serialization
175+
- perf: use string concatenation for serialization
170176
* deps: parseurl@~1.3.1
171177
- perf: enable strict mode
172178
* deps: uid-safe@~2.1.1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ With this enabled, the session identifier cookie will expire in
269269
[`maxAge`](#cookiemaxage) since the last response was sent instead of in
270270
[`maxAge`](#cookiemaxage) since the session was last modified by the server.
271271

272-
This is typically used in conjuction with short, non-session-length
272+
This is typically used in conjunction with short, non-session-length
273273
[`maxAge`](#cookiemaxage) values to provide a quick timeout of the session data
274274
with reduced potential of it occurring during on going server interactions.
275275

@@ -773,7 +773,7 @@ a [variety of storage types](https://www.npmjs.com/package/cache-manager#store-e
773773
[express-session-level-url]: https://www.npmjs.com/package/express-session-level
774774
[express-session-level-image]: https://badgen.net/github/stars/tgohn/express-session-level?label=%E2%98%85
775775

776-
[![][express-session-rsdb-image] express-session-rsdb][express-session-rsdb-url] Session store based on Rocket-Store: A very simple, super fast and yet powerfull, flat file database.
776+
[![][express-session-rsdb-image] express-session-rsdb][express-session-rsdb-url] Session store based on Rocket-Store: A very simple, super fast and yet powerful, flat file database.
777777

778778
[express-session-rsdb-url]: https://www.npmjs.com/package/express-session-rsdb
779779
[express-session-rsdb-image]: https://badgen.net/github/stars/paragi/express-session-rsdb?label=%E2%98%85

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{
22
"name": "express-session",
3-
"version": "1.18.1",
3+
"version": "1.18.2",
44
"description": "Simple session middleware for Express",
55
"author": "TJ Holowaychuk <[email protected]> (http://tjholowaychuk.com)",
66
"contributors": [
77
"Douglas Christopher Wilson <[email protected]>",
88
"Joe Wagner <[email protected]>"
99
],
1010
"repository": "expressjs/session",
11+
"funding": {
12+
"type": "opencollective",
13+
"url": "https://opencollective.com/express"
14+
},
1115
"license": "MIT",
1216
"dependencies": {
1317
"cookie": "0.7.2",
1418
"cookie-signature": "1.0.7",
1519
"debug": "2.6.9",
1620
"depd": "~2.0.0",
17-
"on-headers": "~1.0.2",
21+
"on-headers": "~1.1.0",
1822
"parseurl": "~1.3.3",
1923
"safe-buffer": "5.2.1",
2024
"uid-safe": "~2.1.5"
@@ -25,7 +29,7 @@
2529
"eslint": "8.56.0",
2630
"eslint-plugin-markdown": "3.0.1",
2731
"express": "4.17.3",
28-
"mocha": "10.2.0",
32+
"mocha": "10.8.2",
2933
"nyc": "15.1.0",
3034
"supertest": "6.3.4"
3135
},
@@ -39,7 +43,7 @@
3943
},
4044
"scripts": {
4145
"lint": "eslint . && node ./scripts/lint-readme.js",
42-
"test": "mocha --require test/support/env --check-leaks --bail --no-exit --reporter spec test/",
46+
"test": "./test/support/gencert.sh && mocha --require test/support/env --check-leaks --bail --no-exit --reporter spec test/",
4347
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
4448
"test-cov": "nyc npm test",
4549
"version": "node scripts/version-history.js && git add HISTORY.md"

scripts/version-history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (!MD_HEADER_REGEXP.test(historyFileLines[1])) {
1616
}
1717

1818
if (!VERSION_PLACEHOLDER_REGEXP.test(historyFileLines[0])) {
19-
console.error('Missing placegolder version in HISTORY.md')
19+
console.error('Missing placeholder version in HISTORY.md')
2020
process.exit(1)
2121
}
2222

test/fixtures/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)