ensure releases' names match in releases.name column + the blob

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: bhearsum, Assigned: bhearsum)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Right now, Balrog allows you to insert a row into the releases table that uses one value for the "name" column, while using a different value for "name" within the release blob. This doesn't break anything within Balrog itself (the "name" in the blob is not used anywhere), but it confuses clients who request blobs through URLs like /api/releases/foo, and get back a piece of data that claims name is "bar".

We should stop allowing this inconsistency, and throw a 400 error at submission time if someone attempts to make such a change.
(Assignee)

Comment 1

3 years ago
Created attachment 8707492 [details] [review]
don't allow blobs to have mismatched names
Attachment #8707492 - Flags: review?(catlee)

Updated

3 years ago
Attachment #8707492 - Flags: review?(catlee) → review+

Comment 2

3 years ago
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/810b29dd2992094f734ce3d0793734355c1d2eee
Merge pull request #44 from bhearsum/name-mismatch

bug 1239318: Don't allow blobs to have mismatched names between the database colum and blob data. r=catlee
(Assignee)

Updated

3 years ago
Attachment #8707492 - Flags: checked-in+
(Assignee)

Comment 3

3 years ago
This went to production today and I re-verified it there.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.