bcgov / nr-forests-access-management

Authorization solution for BC natural resource sector
Apache License 2.0
8 stars 2 forks source link

Input sanitization #700

Closed gormless87 closed 1 year ago

gormless87 commented 1 year ago

Describe the task Implement explicit sanitization of input received from the Web Browser

Acceptance Criteria

Additional context

DerekRoberts commented 1 year ago

FastAPI has baked-in sanitization. Verify this is being taken advantage of. https://fastapi.tiangolo.com/tutorial/query-params-str-validations/

ianliuwk1019 commented 1 year ago

This is only for developer: While verifying the change for input restriction addition, found FastAPI is having one known bug that change the expecting error behavior from client side error (422) to server side error (500). This is not good and a major bug from framework we do not want otherwise our frontend will not handle it to user properly. Added comment in code. Private Zenhub Image