Commit Graph
5 Commits
Author SHA1 Message Date
NachoSoto 6986a2f95e NetworkError.signatureVerificationFailed: added status code to error userInfo (#2657) 2023-06-16 07:55:21 -07:00
NachoSoto 06b0f3d723 Add InternalDangerousSettings.forceSignatureFailures (#2635)
Similar to #2486. This will be used for SDK-3181.

```
- WARN: ⚠️ Returning fake signature verification failure for 'GET /v1/subscribers/$RCAnonymousID:fc0508bea4a74a41bfc9a69db30d925f'
- ERROR: 😿‼️ Request failed signature verification. Request to /v1/subscribers/$RCAnonymousID%3Afc0508bea4a74a41bfc9a69db30d925f failed verification
```
2023-06-13 13:43:16 -07:00
NachoSoto 2276d5c2ce AppleReceipt.debugDescription: don't pretty-print JSON (#2564) 2023-05-31 07:11:23 -07:00
NachoSoto c617b392a2 ETagManager: don't use ETags if response verification failed (#2347)
Scenario:
- Response 1: 200 / `VerificationResult.failed`
- Response 2: 304 / `VerificationResult.verified`

Before this change, that was resulting in `VerificationResult.verified`,
even though it was using the unverified response body.
This fixes that so that we don't use the ETag for a response that failed
validation, even in `ResponseVerificationMode.informational`.
2023-03-17 11:37:35 -07:00
NachoSoto f5071b60b3 Finished signature verification HTTPClient tests (#2333)
See
https://docs.google.com/spreadsheets/d/1kNcFNB8U47N5_vm8Ww57izMgdp60mdzUxZFK-cm46KU/edit#gid=0
<img width="585" alt="Screenshot 2023-03-13 at 15 59 42"
src="https://user-images.githubusercontent.com/685609/224851071-ea150f7c-e282-4234-bbe2-b404da12208a.png">

### Changes:
- Extracted signature verification `HTTPClient` tests into a separate
file
- Added helper stubbing methods to simplify tests
- Created `InformationalSignatureVerificationHTTPClientTests` and
`EnforcedSignatureVerificationHTTPClientTests`
- Changed `VerificationResult.from(cache:response:)` to match new
expected tests
- Finished coverage for `ResponseVerificationMode.informational` tests
2023-03-14 09:12:43 -07:00