Skip to content

fix: prevent update bucket with missing payload#1040

Merged
itslenny merged 1 commit into
masterfrom
lenny/fix-do-not-allow-update-bucket-with-missing-payload
Apr 21, 2026
Merged

fix: prevent update bucket with missing payload#1040
itslenny merged 1 commit into
masterfrom
lenny/fix-do-not-allow-update-bucket-with-missing-payload

Conversation

@itslenny
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

If an empty payload is passed to storage.bucket.update it results in an empty update resulting in a 500 error

Empty .update() call detected! Update data does not contain any values to update. This will result in a faulty query. Table: buckets. Columns: public,file_size_limit,allowed_mime_types.

What is the new behavior?

Check that there is actually something to update and throw if there is not

@itslenny itslenny requested a review from a team as a code owner April 21, 2026 18:35
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 24739774876

Coverage increased (+0.03%) to 69.938%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (1 of 2 lines covered, 50.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/storage/storage.ts 2 1 50.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 9690
Covered Lines: 7147
Line Coverage: 73.76%
Relevant Branches: 5412
Covered Branches: 3415
Branch Coverage: 63.1%
Branches in Coverage %: Yes
Coverage Strength: 375.32 hits per line

💛 - Coveralls

@itslenny itslenny merged commit 8e93710 into master Apr 21, 2026
9 checks passed
@itslenny itslenny deleted the lenny/fix-do-not-allow-update-bucket-with-missing-payload branch April 21, 2026 19:26
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.

4 participants