passing invalid json when updating a permission causes the field to become null

RESOLVED FIXED

Status

Release Engineering
Balrog: Backend
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: bhearsum, Assigned: bhearsum)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
This is pretty bad, as a simple typo can end up granting wider access than intended. The permissions update/create endpoints should be throwing errors about this rather than silently accepting it.
(Assignee)

Comment 1

2 years ago
Created attachment 8707072 [details] [review]
fix error showing for permissions

Details in PR.
Attachment #8707072 - Flags: review?(rail)
(Assignee)

Comment 2

2 years ago
Created attachment 8707074 [details] [review]
fix options handling/validation

Details in PR.
Attachment #8707074 - Flags: review?(rail)
Attachment #8707072 - Flags: review?(rail) → review+
Attachment #8707074 - Flags: review?(rail) → review+

Comment 3

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

https://github.com/mozilla/balrog/commit/9a9142540c4890784905d70a381245f6fddb1f4a
Merge pull request #43 from bhearsum/options-loss

bug 1237264: passing invalid json when updating a permission causes the field to become null
(Assignee)

Updated

2 years ago
Attachment #8707072 - Flags: checked-in+
(Assignee)

Comment 4

2 years ago
Comment on attachment 8707074 [details] [review]
fix options handling/validation

Landed both patches here. Will go to prod after a few other changes have been queued up.
Attachment #8707074 - Flags: checked-in+
(Assignee)

Comment 5

2 years ago
This went to production today, because I had to fix up an unfinished push from last week.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED

Comment 6

a year ago
Commits pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/73c457b73a0862b03f7b2c5fbeee382f7f563d3d
[balrog-ui] Merge pull request #15 from bhearsum/permission-error

bug 1237264: Fix error showing when updating permissions.

https://github.com/mozilla/balrog/commit/af33f3722b264f6241308b8c6bded8759cc42525
[balrog-ui] Rebuild UI to pick up bug 1237264.
You need to log in before you can comment on or make changes to this bug.