You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are deliberately loose on validity checks in the point model, but in the api calls is where we have the most vulnerability to hacks - (people deliberately inserting bad stuff).
We need to create methods for strong validity checks for the properties in model/point.js and export them so that the api's can use them.
In app/models/point.js Create and export validity checks for:
_id
title
description
parentId
category
round
others to be determined
create jest tests for each of the above, with one passing and one failing case
apply the validity tests, for required, and optional fields if present, and create an additional jest test for failing
socket-apis/upsert-point
socket-apis/upsert-why
The name of the validity test should match the name of the property. Even better to consider if there is some shorthand way using joi or just an object to make the code clean and minimal in the apis.
The text was updated successfully, but these errors were encountered:
@edmundj0 how's school? You were pretty close on this one, what's the status. If you can't work on it any more for a while, can you let me know, and push anything else you've got. Things are starting to come together and we are tying all the components into a single UI. Thanks.
We are deliberately loose on validity checks in the point model, but in the api calls is where we have the most vulnerability to hacks - (people deliberately inserting bad stuff).
We need to create methods for strong validity checks for the properties in model/point.js and export them so that the api's can use them.
See Joi an it's methods for validity checking in undebate-ssp/app/socket-apis/find-and-set-election-doc
In app/models/point.js Create and export validity checks for:
apply the validity tests, for required, and optional fields if present, and create an additional jest test for failing
The name of the validity test should match the name of the property. Even better to consider if there is some shorthand way using joi or just an object to make the code clean and minimal in the apis.
The text was updated successfully, but these errors were encountered: