Summary
The Checkout endpoint accepts a JSON array body and creates a persistent order whose total and shipping address are null.
- Severity: Medium
- Environment: Local Docker
eshop-sut-backend-1
- HW06 Pool: Pool B / FR-08
- Test case:
FR08-DOM-007
Preconditions
A disposable authenticated user has a valid token and a non-empty fixture cart. The collection-level script supplies X-Student-Id.
Steps to reproduce
- Send
POST /api/checkout with valid bearer authorization, Content-Type: application/json, and raw body [].
- Record the response.
- Inspect only the disposable user's order row through the restricted SQLite snapshot.
Expected result
Reject the non-object JSON envelope with a 4xx response and create no order. Exact status/schema is unspecified.
Actual result
The endpoint returned HTTP 200 with a Checkout-success response. The after-state contained a created order with orderTotal: null and shippingAddress: null.
Impact
Authenticated clients can create malformed persistent financial records.
Evidence
23127379_Homework/HW6/Pool-B_FR08_Checkout/postman/newman/Pool-B_FR08_full_report.json
23127379_Homework/HW6/Pool-B_FR08_Checkout/postman/newman/Pool-B_FR08_full_report.html
23127379_Homework/HW6/Pool-B_FR08_Checkout/evidence/Pool-B_FR08_full_db-after.json
- Screenshot generated from the
FR08-DOM-007 failure with MSSV 23127379.
Requirement source: API specification §4.3 and the confirmed object-envelope oracle
Suggested labels: bug, validation, data-integrity, FR-08, api
Summary
The Checkout endpoint accepts a JSON array body and creates a persistent order whose total and shipping address are null.
eshop-sut-backend-1FR08-DOM-007Preconditions
A disposable authenticated user has a valid token and a non-empty fixture cart. The collection-level script supplies
X-Student-Id.Steps to reproduce
POST /api/checkoutwith valid bearer authorization,Content-Type: application/json, and raw body[].Expected result
Reject the non-object JSON envelope with a 4xx response and create no order. Exact status/schema is unspecified.
Actual result
The endpoint returned HTTP 200 with a Checkout-success response. The after-state contained a created order with
orderTotal: nullandshippingAddress: null.Impact
Authenticated clients can create malformed persistent financial records.
Evidence
23127379_Homework/HW6/Pool-B_FR08_Checkout/postman/newman/Pool-B_FR08_full_report.json23127379_Homework/HW6/Pool-B_FR08_Checkout/postman/newman/Pool-B_FR08_full_report.html23127379_Homework/HW6/Pool-B_FR08_Checkout/evidence/Pool-B_FR08_full_db-after.jsonFR08-DOM-007failure with MSSV23127379.Requirement source: API specification §4.3 and the confirmed object-envelope oracle
Suggested labels:
bug,validation,data-integrity,FR-08,api