Skip to content

Commit 4dd276a

Browse files
Version Packages (#7609)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/[email protected] ### Patch Changes - [#7604](#7604) [`aeb511c7d`](aeb511c) Thanks [@renovate](https://github.com/apps/renovate)! - Update `graphql-http` dependency - [`0adaf80d1`](0adaf80) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Address Content Security Policy issues The previous implementation of CSP nonces within the landing pages did not take full advantage of the security benefit of using them. Nonces should only be used once per request, whereas Apollo Server was generating one nonce and reusing it for the lifetime of the instance. The reuse of nonces degrades the security benefit of using them but does not pose a security risk on its own. The CSP provides a defense-in-depth measure against a _potential_ XSS, so in the absence of a _known_ XSS vulnerability there is likely no risk to the user. The mentioned fix also coincidentally addresses an issue with using crypto functions on startup within Cloudflare Workers. Crypto functions are now called during requests only, which resolves the error that Cloudflare Workers were facing. A recent change introduced a `precomputedNonce` configuration option to mitigate this issue, but it was an incorrect approach given the nature of CSP nonces. This configuration option is now deprecated and should not be used for any reason since it suffers from the previously mentioned issue of reusing nonces. Additionally, this change adds other applicable CSPs for the scripts, styles, images, manifest, and iframes that the landing pages load. A final consequence of this change is an extension of the `renderLandingPage` plugin hook. This hook can now return an object with an `html` property which returns a `Promise<string>` in addition to a `string` (which was the only option before). - Updated dependencies \[[`0adaf80d1`](0adaf80)]: - @apollo/[email protected] ## @apollo/[email protected] ### Patch Changes - [`0adaf80d1`](0adaf80) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Address Content Security Policy issues The previous implementation of CSP nonces within the landing pages did not take full advantage of the security benefit of using them. Nonces should only be used once per request, whereas Apollo Server was generating one nonce and reusing it for the lifetime of the instance. The reuse of nonces degrades the security benefit of using them but does not pose a security risk on its own. The CSP provides a defense-in-depth measure against a _potential_ XSS, so in the absence of a _known_ XSS vulnerability there is likely no risk to the user. The mentioned fix also coincidentally addresses an issue with using crypto functions on startup within Cloudflare Workers. Crypto functions are now called during requests only, which resolves the error that Cloudflare Workers were facing. A recent change introduced a `precomputedNonce` configuration option to mitigate this issue, but it was an incorrect approach given the nature of CSP nonces. This configuration option is now deprecated and should not be used for any reason since it suffers from the previously mentioned issue of reusing nonces. Additionally, this change adds other applicable CSPs for the scripts, styles, images, manifest, and iframes that the landing pages load. A final consequence of this change is an extension of the `renderLandingPage` plugin hook. This hook can now return an object with an `html` property which returns a `Promise<string>` in addition to a `string` (which was the only option before). Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 0adaf80 commit 4dd276a

File tree

7 files changed

+40
-26
lines changed

7 files changed

+40
-26
lines changed

.changeset/afraid-vans-boil.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/pink-walls-train.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/integration-testsuite/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# @apollo/server-integration-testsuite
22

3+
## 4.7.4
4+
5+
### Patch Changes
6+
7+
- [#7604](https://github.com/apollographql/apollo-server/pull/7604) [`aeb511c7d`](https://github.com/apollographql/apollo-server/commit/aeb511c7d7b3b7260b33c7e392580bac6565e465) Thanks [@renovate](https://github.com/apps/renovate)! - Update `graphql-http` dependency
8+
9+
- [`0adaf80d1`](https://github.com/apollographql/apollo-server/commit/0adaf80d1ee51d8c7e5fd863c04478536d15eb8c) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Address Content Security Policy issues
10+
11+
The previous implementation of CSP nonces within the landing pages did not take full advantage of the security benefit of using them. Nonces should only be used once per request, whereas Apollo Server was generating one nonce and reusing it for the lifetime of the instance. The reuse of nonces degrades the security benefit of using them but does not pose a security risk on its own. The CSP provides a defense-in-depth measure against a _potential_ XSS, so in the absence of a _known_ XSS vulnerability there is likely no risk to the user.
12+
13+
The mentioned fix also coincidentally addresses an issue with using crypto functions on startup within Cloudflare Workers. Crypto functions are now called during requests only, which resolves the error that Cloudflare Workers were facing. A recent change introduced a `precomputedNonce` configuration option to mitigate this issue, but it was an incorrect approach given the nature of CSP nonces. This configuration option is now deprecated and should not be used for any reason since it suffers from the previously mentioned issue of reusing nonces.
14+
15+
Additionally, this change adds other applicable CSPs for the scripts, styles, images, manifest, and iframes that the landing pages load.
16+
17+
A final consequence of this change is an extension of the `renderLandingPage` plugin hook. This hook can now return an object with an `html` property which returns a `Promise<string>` in addition to a `string` (which was the only option before).
18+
19+
- Updated dependencies [[`0adaf80d1`](https://github.com/apollographql/apollo-server/commit/0adaf80d1ee51d8c7e5fd863c04478536d15eb8c)]:
20+
- @apollo/server@4.7.4
21+
322
## 4.7.3
423

524
### Patch Changes

packages/integration-testsuite/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/server-integration-testsuite",
3-
"version": "4.7.3",
3+
"version": "4.7.4",
44
"description": "Test suite for Apollo Server integrations",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
2828
"dependencies": {
2929
"@apollo/cache-control-types": "^1.0.2",
3030
"@apollo/client": "^3.6.9",
31-
"@apollo/server": "4.7.3",
31+
"@apollo/server": "4.7.4",
3232
"@apollo/utils.keyvaluecache": "^2.1.0",
3333
"@apollo/utils.createhash": "^2.0.0",
3434
"@apollo/usage-reporting-protobuf": "^4.1.0",

packages/server/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @apollo/server
22

3+
## 4.7.4
4+
5+
### Patch Changes
6+
7+
- [`0adaf80d1`](https://github.com/apollographql/apollo-server/commit/0adaf80d1ee51d8c7e5fd863c04478536d15eb8c) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Address Content Security Policy issues
8+
9+
The previous implementation of CSP nonces within the landing pages did not take full advantage of the security benefit of using them. Nonces should only be used once per request, whereas Apollo Server was generating one nonce and reusing it for the lifetime of the instance. The reuse of nonces degrades the security benefit of using them but does not pose a security risk on its own. The CSP provides a defense-in-depth measure against a _potential_ XSS, so in the absence of a _known_ XSS vulnerability there is likely no risk to the user.
10+
11+
The mentioned fix also coincidentally addresses an issue with using crypto functions on startup within Cloudflare Workers. Crypto functions are now called during requests only, which resolves the error that Cloudflare Workers were facing. A recent change introduced a `precomputedNonce` configuration option to mitigate this issue, but it was an incorrect approach given the nature of CSP nonces. This configuration option is now deprecated and should not be used for any reason since it suffers from the previously mentioned issue of reusing nonces.
12+
13+
Additionally, this change adds other applicable CSPs for the scripts, styles, images, manifest, and iframes that the landing pages load.
14+
15+
A final consequence of this change is an extension of the `renderLandingPage` plugin hook. This hook can now return an object with an `html` property which returns a `Promise<string>` in addition to a `string` (which was the only option before).
16+
317
## 4.7.3
418

519
### Patch Changes

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/server",
3-
"version": "4.7.3",
3+
"version": "4.7.4",
44
"description": "Core engine for Apollo GraphQL server",
55
"type": "module",
66
"main": "dist/cjs/index.js",

0 commit comments

Comments
 (0)