crisisboard / opencrisisboard

OpenCrisisBoard (OCB) is an open-source, self-hosted communications board where communities can organize around local information
https://opencrisisboard.org/
MIT License
48 stars 17 forks source link

Security issue: Admin check in backend is done via field in request #29

Open aPruner opened 4 years ago

aPruner commented 4 years ago

Currently, the admin checks in the Admin backend API are done via a flag in the request. This is obviously not secure as requests can be hijacked and have their contents changed.

Instead, what we need a utility that looks up the user in the database and checks their role string (or role flag, or whatever) to ensure it's that of an admin. This would be much more secure.