-
-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1733 from brefphp/multipart-arrays-malformed
Support malformed multipart body
- Loading branch information
Showing
6 changed files
with
155 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
tests/Event/Http/Fixture/ag-v1-body-form-multipart-arrays-malformed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"version": "1.0", | ||
"resource": "/path", | ||
"path": "/path", | ||
"httpMethod": "POST", | ||
"headers": { | ||
"Accept": "*/*", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Cache-Control": "no-cache", | ||
"Content-Type": "multipart/form-data; boundary=testBoundary", | ||
"Host": "example.org", | ||
"User-Agent": "PostmanRuntime/7.20.1", | ||
"X-Amzn-Trace-Id": "Root=1-ffffffff-ffffffffffffffffffffffff", | ||
"X-Forwarded-For": "1.1.1.1", | ||
"X-Forwarded-Port": "443", | ||
"X-Forwarded-Proto": "https" | ||
}, | ||
"queryStringParameters": null, | ||
"pathParameters": null, | ||
"stageVariables": null, | ||
"requestContext": { | ||
"resourceId": "xxxxxx", | ||
"resourcePath": "/path", | ||
"httpMethod": "PUT", | ||
"extendedRequestId": "XXXXXX-xxxxxxxx=", | ||
"requestTime": "24/Nov/2019:18:55:08 +0000", | ||
"path": "/path", | ||
"accountId": "123400000000", | ||
"protocol": "HTTP/1.1", | ||
"stage": "dev", | ||
"domainPrefix": "dev", | ||
"requestTimeEpoch": 1574621708700, | ||
"requestId": "ffffffff-ffff-4fff-ffff-ffffffffffff", | ||
"identity": { | ||
"cognitoIdentityPoolId": null, | ||
"accountId": null, | ||
"cognitoIdentityId": null, | ||
"caller": null, | ||
"sourceIp": "1.1.1.1", | ||
"principalOrgId": null, | ||
"accessKey": null, | ||
"cognitoAuthenticationType": null, | ||
"cognitoAuthenticationProvider": null, | ||
"userArn": null, | ||
"userAgent": "PostmanRuntime/7.20.1", | ||
"user": null | ||
}, | ||
"domainName": "example.org", | ||
"apiId": "xxxxxxxxxx" | ||
}, | ||
"body": "--testBoundary\r\nContent-Disposition: form-data; name=\"key0[key1][key2][\"\r\n\r\n123\r\n--testBoundary--\r\n", | ||
"isBase64Encoded": false | ||
} |
41 changes: 41 additions & 0 deletions
41
tests/Event/Http/Fixture/ag-v2-body-form-multipart-arrays-malformed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"version": "2.0", | ||
"routeKey": "ANY /path", | ||
"rawPath": "/path", | ||
"rawQueryString": "", | ||
"headers": { | ||
"Accept": "*/*", | ||
"Accept-Encoding": "gzip, deflate", | ||
"Cache-Control": "no-cache", | ||
"Content-Type": "multipart/form-data; boundary=testBoundary", | ||
"Host": "example.org", | ||
"User-Agent": "PostmanRuntime/7.20.1", | ||
"X-Amzn-Trace-Id": "Root=1-ffffffff-ffffffffffffffffffffffff", | ||
"X-Forwarded-For": "1.1.1.1", | ||
"X-Forwarded-Port": "443", | ||
"X-Forwarded-Proto": "https" | ||
}, | ||
"queryStringParameters": null, | ||
"stageVariables": null, | ||
"requestContext": { | ||
"accountId": "123400000000", | ||
"apiId": "xxxxxxxxxx", | ||
"domainName": "example.org", | ||
"domainPrefix": "0000000000", | ||
"http": { | ||
"method": "POST", | ||
"path": "/path", | ||
"protocol": "HTTP/1.1", | ||
"sourceIp": "1.1.1.1", | ||
"userAgent": "PostmanRuntime/7.20.1" | ||
}, | ||
"requestId": "JTHoQgr2oAMEPMg=", | ||
"routeId": "47matwk", | ||
"routeKey": "ANY /path", | ||
"stage": "$default", | ||
"time": "24/Nov/2019:18:55:08 +0000", | ||
"timeEpoch": 1574621708700 | ||
}, | ||
"body": "--testBoundary\r\nContent-Disposition: form-data; name=\"key0[key1][key2][\"\r\n\r\n123\r\n--testBoundary--\r\n", | ||
"isBase64Encoded": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters