camicroscope / Caracal

Conslidated Backend, Auth, and Security Services for caMicroscope
GNU General Public License v3.0
15 stars 95 forks source link

Misleading error message which can cause trouble in debugging #115

Open YashKumarVerma opened 3 years ago

YashKumarVerma commented 3 years ago

https://github.com/camicroscope/Caracal/blob/91fec6d581a2e54e85faeb053511c2df55b49053/handlers/authHandlers.js#L31-L61

The code block on line 40 and 56 are triggered when DISABLE_SEC || ENABLE_SECURITY_AT && Date.parse(ENABLE_SECURITY_AT) > Date.now() turns false. This has no relation to the files being present or not, whereas the block logs out a message saying XXX does not exist

VishalMyla commented 1 year ago

it seems that the purpose of this error message is to alert the user that the file is missing and cannot be used for authentication.