|
1 | 1 | # @apollo/datasource-rest |
2 | 2 |
|
| 3 | +## 5.0.2 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- [#159](https://github.com/apollographql/datasource-rest/pull/159) [`ee018a7`](https://github.com/apollographql/datasource-rest/commit/ee018a7744a8c6ea7f312eec33f1b99c4ae964d9) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Update `http-cache-semantics` package to latest patch, resolving a security |
| 8 | + issue. |
| 9 | + |
| 10 | + Unlike many security updates Apollo repos receive, this is an _actual_ (non-dev) |
| 11 | + dependency of this package which means it is actually a user-facing security |
| 12 | + issue. |
| 13 | + |
| 14 | + The potential impact of this issue is limited to a DOS attack (via an |
| 15 | + inefficient regex). |
| 16 | + |
| 17 | + This security issue would only affect you if either: |
| 18 | + |
| 19 | + - you pass untrusted (i.e. from your users) `cache-control` request headers |
| 20 | + - you sending requests to untrusted REST server that might return malicious |
| 21 | + `cache-control` headers |
| 22 | + |
| 23 | + Since `http-cache-semantics` is a careted (^) dependency in this package, the |
| 24 | + security issue can (and might already) be resolved via a `package-lock.json` |
| 25 | + update within your project (possibly triggered by `npm audit` or another |
| 26 | + dependency update which has already updated its version of the package in |
| 27 | + question). If `npm ls http-cache-semantics` reveals a tree of dependencies which |
| 28 | + only include the `4.1.1` version (and no references to any previous versions) |
| 29 | + then you are currently unaffected and this patch should have (for all intents |
| 30 | + and purpose) no effect. |
| 31 | + |
| 32 | + More details available here: https://github.com/advisories/GHSA-rc47-6667-2j5j |
| 33 | + |
| 34 | +- [#160](https://github.com/apollographql/datasource-rest/pull/160) [`786c44f`](https://github.com/apollographql/datasource-rest/commit/786c44f9fbb5aef43962fc39bb74baa870fdb8ec) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Add missing `@apollo/utils.withrequired` type dependency which is part of the |
| 35 | + public typings (via the `AugmentedRequest` type). |
| 36 | + |
| 37 | +- [#154](https://github.com/apollographql/datasource-rest/pull/154) [`bb0cff0`](https://github.com/apollographql/datasource-rest/commit/bb0cff0e1cb9e8adb13587fc9d99ea573be4cc32) Thanks [@JustinSomers](https://github.com/JustinSomers)! - Addresses duplicate content-type header bug due to upper-cased headers being forwarded. This change instead maps all headers to lowercased headers. |
| 38 | + |
3 | 39 | ## 5.0.1 |
4 | 40 |
|
5 | 41 | ### Patch Changes |
@@ -113,12 +149,12 @@ At a higher level, the most notable changes include: |
113 | 149 | You reasonably may have used this hook for things like observability and logging, |
114 | 150 | updating response headers, or mutating the response object in some other way. If |
115 | 151 | so, you can now override the public `fetch` method like so: |
116 | | - |
| 152 | + |
117 | 153 | ```ts |
118 | 154 | class MyDataSource extends RESTDataSource { |
119 | 155 | override async fetch<TResult>( |
120 | 156 | path: string, |
121 | | - incomingRequest: DataSourceRequest = {} |
| 157 | + incomingRequest: DataSourceRequest = {}, |
122 | 158 | ) { |
123 | 159 | const result = await super.fetch(path, incomingRequest); |
124 | 160 | // Log or update here; you have access to `result.parsedBody` and `result.response`. |
|
0 commit comments