generated from nyjc-computing/replit-flask-app
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
The GET /auth/v1/clients/{id}/access/check endpoint expects an int for the permission query parameter, but query parameters are always strings. This causes a TypeError when the endpoint tries to perform bitwise operations.
Location
- File:
campus/auth/resources/client.py:270 - Route:
campus/auth/routes/clients.py:181-200
Error
TypeError: unsupported operand type(s) for &: 'int' and 'str'
Root Cause
The parameter.reconcile() function in flask_campus does not perform type coercion for query parameters. The route signature specifies permission: int, but GET query params are always strings.
Steps to Reproduce
# Via curl or test client
GET /auth/v1/clients/{client_id}/access/check?vault=test&permission=1Expected Behavior
The endpoint should either:
- Coerce query param string to int before calling the route handler
- Or explicitly parse
permissionas int in the route handler
Contract Test Blocked
tests/contract/test_auth_clients.py::TestAuthClientsContract::test_check_client_accessis skipped due to this bug
Related
- Found during Phase 3 of integration test refactor
- HTTP contract test coverage expansion
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working