Skip to content

Conversation

@st3iny
Copy link
Member

@st3iny st3iny commented Jan 27, 2025

  • Resolves: # none

Summary

Setting the sse_c_key to an empty string enables encryption despite no key actually being available.

Have a look at the following usage:

$key = $this->getSSECKey();
if ($key === null) {
return [];
}

Checklist

@st3iny st3iny added bug 3. to review Waiting for reviews labels Jan 27, 2025
@st3iny st3iny self-assigned this Jan 27, 2025
@solracsf
Copy link
Member

Since we're using similar logic on the file (empty check) function could be simplified to:

protected function getSSECKey(): ?string {
	return !empty($this->params['sse_c_key']) ? $this->params['sse_c_key'] : null;
}

@szaimen szaimen added this to the Nextcloud 32 milestone Jan 28, 2025
@juliusknorr
Copy link
Member

Conflicts with #50326 where I asked for the adjustment 🙈

@st3iny
Copy link
Member Author

st3iny commented Jan 28, 2025

Let's continue here: #50514

@st3iny st3iny closed this Jan 28, 2025
@st3iny st3iny deleted the fix/s3/empty-sse-c-key branch January 28, 2025 22:04
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants