Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable23] Make X-HAS-{MD5/SHA256} opt-in #32759

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

CarlSchwan
Copy link
Member

This is not always needed and slow down the upload

Signed-off-by: Carl Schwan [email protected]
(cherry picked from commit 1b426ed)

This is not always needed and slow down the upload

Signed-off-by: Carl Schwan <[email protected]>
(cherry picked from commit 1b426ed)
@CarlSchwan CarlSchwan requested review from a team, PVince81, ArtificialOwl and skjnldsv and removed request for a team June 8, 2022 11:41
Copy link
Member

@ArtificialOwl ArtificialOwl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good

if ($this->request->getHeader('X-HASH') !== '') {
$hash = $this->request->getHeader('X-HASH');
if ($hash === 'all' || $hash === 'md5') {
$data = HashWrapper::wrap($data, 'md5', function ($hash) {

Check notice

Code scanning / Psalm

MissingClosureParamType

Parameter $hash has no provided type
}

if ($hash === 'all' || $hash === 'sha1') {
$data = HashWrapper::wrap($data, 'sha1', function ($hash) {

Check notice

Code scanning / Psalm

MissingClosureParamType

Parameter $hash has no provided type
}

if ($hash === 'all' || $hash === 'sha256') {
$data = HashWrapper::wrap($data, 'sha256', function ($hash) {

Check notice

Code scanning / Psalm

MissingClosureParamType

Parameter $hash has no provided type
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CarlSchwan CarlSchwan merged commit dd80963 into stable23 Jun 10, 2022
@CarlSchwan CarlSchwan deleted the backport/stable23/upload-speed branch June 10, 2022 09:34
@blizzz blizzz mentioned this pull request Jun 10, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants