TheOnlyArtz / Seday

A socket.io / Express / discord.js / RethinkDB app full example of how dashboards should work.
42 stars 12 forks source link

Invalid date string #4

Closed Bruno-Marley closed 5 years ago

Bruno-Marley commented 5 years ago

When I click the login button and authorize access to my information, it returns this error in the console and I am redirected back to the login page.

ReqlLogicError: Invalid date string+010000-01-01(got+but expected a digit) in: r.table("Sessions").insert({ id: "SOME TOKEN HERE", expires: r.ISO8601("+010000-01-01T11:47:01.159Z"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TheOnlyArtz commented 5 years ago

When I click the login button and authorize access to my information, it returns this error in the console and I am redirected back to the login page.

ReqlLogicError: Invalid date string+010000-01-01(got+but expected a digit) in: r.table("Sessions").insert({ id: "SOME TOKEN HERE", expires: r.ISO8601("+010000-01-01T11:47:01.159Z"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Hey, this is very weird actually, I'm using a 3rd party middleware to store the sessions, did you try to update all of the dependencies following the security patch? I've personally downloaded the ZIP archive of the repo today in order to fix Seday's functionality and it worked really well, didn't enocunter any issues with the database at all.

Bruno-Marley commented 5 years ago

Well I just downloaded the ZIP file, and set it all up again, and I used npm install to install all the updated dependencies but it still gives the same error.

TheOnlyArtz commented 5 years ago

Well, after heavy modifications I've got the exact same error too, I'm looking into it right now

TheOnlyArtz commented 5 years ago

I'm excited to tell you that it's fixed, it was a bug in the newest version of express-session so I've decided to downgrade it, no safety concerns on this one! a patch with a lot of new changes to the code will get committed at once, soon.

Bruno-Marley commented 5 years ago

Ok thanks, I'll wait. Just to remember this is missing the redirect_uri in config.json: https://github.com/TheOnlyArtz/Seday/blob/master/src/Website/config.json.example

and the config.json of the Bot folder is also missing: https://github.com/TheOnlyArtz/Seday/tree/master/src/Bot

TheOnlyArtz commented 5 years ago

Ok thanks, I'll wait. Just to remember this is missing the redirect_uri in config.json: https://github.com/TheOnlyArtz/Seday/blob/master/src/Website/config.json.example

and the config.json of the Bot folder is also missing: https://github.com/TheOnlyArtz/Seday/tree/master/src/Bot

Changes committed, along to the new config.examples I still need to implement the refresh_token mechanism

TheOnlyArtz commented 5 years ago

@BrunoMarley289 Please inform me if everything went well since the update so I will know if I should close this issue

Bruno-Marley commented 5 years ago

It's working, thank you.