CLDSRV-849: don't crash if invalid Date header#6079
Conversation
Hello leif-scality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.2 #6079 +/- ##
===================================================
- Coverage 84.19% 84.17% -0.03%
===================================================
Files 204 204
Lines 13124 13124
===================================================
- Hits 11050 11047 -3
- Misses 2074 2077 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
eae4ba3 to
a801a95
Compare
a801a95 to
5b20578
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
| const bucket = 'test-bucket'; | ||
| const objectKey = 'test-file.txt'; | ||
|
|
||
| describe('malformed Date header should not crash server:', () => { |
There was a problem hiding this comment.
should you have the same test with X-Amz-Date header as well ?
There was a problem hiding this comment.
A bad X-Amz-Date did not crash before, but I added a test anyways
There was a problem hiding this comment.
To prevent duplication, you could use an array to generate the same test for 2 different date headers
['Date', 'X-Amz-Date'].forEach(
dateHeader => it(`should return ...${dateHeader}...`, done => {
// ...
headers: {
[dateHeader]: 'BAD_DATE'
}
}
)| method: 'GET', | ||
| headers: { | ||
| 'Date': 'BAD_DATE', | ||
| 'Authorization': 'AWS4-HMAC-SHA256 Credential=accessKey1/20260211/us-east-1/s3/aws4_request, ' + |
There was a problem hiding this comment.
With the fixed date in the authorization is it going to work any other day ?
There was a problem hiding this comment.
We test the Date, before the Authorization so it does not matter
There was a problem hiding this comment.
We also check the error string Authentication requires a valid Date or x-amz-date header, so it we fail for another reason we would find out
There was a problem hiding this comment.
You can put that comment direct into code so we know when we read it next time
af0269d to
286f7ed
Compare
… does not crash cloudserver
286f7ed to
13eb2ce
Compare
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
|
/create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: git fetch
git checkout -B w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header origin/development/9.3
git merge origin/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header
# <intense conflict resolution>
git commit
git push -u origin w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-headerThe following options are set: create_integration_branches |
|
ping |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
|
/approve |
Build failedThe build for commit did not succeed in branch w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header The following options are set: approve, create_integration_branches |
Unknown commandI didn't understand this comment by @leif-scality:
I don't know what Please edit or delete the corresponding comment so I can move on. The following options are set: approve, create_integration_branches |
|
/help |
Build failedThe build for commit did not succeed in branch w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header The following options are set: approve, create_integration_branches |
|
/create_integration_branches |
1 similar comment
|
/create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: git fetch
git checkout -B w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header origin/development/9.3
git merge origin/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header
# <intense conflict resolution>
git commit
git push -u origin w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-headerThe following options are set: approve, create_integration_branches |
Build failedThe build for commit did not succeed in branch w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header The following options are set: approve, create_integration_branches |
Build failedThe build for commit did not succeed in branch w/9.3/bugfix/CLDSRV-849-dont-crash-if-invalid-Date-header The following options are set: approve, create_integration_branches |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-849. Goodbye leif-scality. The following options are set: approve, create_integration_branches |
Test that the arsenal bump fixed the invalid Date header crash.
Repro code: