Commit 9d4dda1
authored
Merge commit from fork
The adjustDraftOrderLine Admin API mutation was decorated with
Permission.Owner in addition to Permission.UpdateOrder. Permission.Owner
causes the AuthGuard to create an anonymous session and admit callers that
hold none of the other required permissions, so an unauthenticated caller
could adjust the line quantities of any draft order by supplying its id.
Draft orders have no owning customer, so Owner grants no meaningful scoping
here; every sibling draft-order mutation requires a concrete permission and
none use Owner.
Require Permission.UpdateOrder only, matching the other draft-order
mutations, and add an e2e test asserting an anonymous caller is rejected.
Relates to GHSA-hc75-2v4j-x3721 parent 551d423 commit 9d4dda1
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
171 | 188 | | |
172 | 189 | | |
173 | 190 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
0 commit comments