Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Sanitize user input #77

Open
PzYon opened this issue Aug 27, 2019 · 0 comments
Open

Sanitize user input #77

PzYon opened this issue Aug 27, 2019 · 0 comments

Comments

@PzYon
Copy link
Owner

PzYon commented Aug 27, 2019

E.g. Trim texts (especially titles). Consider adding a "sanitizeItem" or something function to
https://github.com/PzYon/engraved/blob/master/server/src/db/DbService.ts:

  • call it for add and update
  • trim title and desc
  • maybe do other things
  • maybe even consider adding this to shared...?

While we are already at it, we might as well cleanup that class a bit. E.g. updateItem should not return promise of any, etc. There might be some other things, as apparently the typing for mongodb have been improved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant