okawaffles / OkayuCDN

A File Upload Server based around Nekomata Okayu.
https://okayu.okawaffles.com
Other
2 stars 0 forks source link

Login issue on Test Server (okayu-nightly) #31

Closed tacobella03 closed 3 months ago

tacobella03 commented 3 months ago

Trying to log into okayu-nightly using my username and password does not work. Even when there is an account created with that username and the password is 100% correct, it still gives me the "Please check your username and password." error after no respose for 1 minute. After looking at the Network requests using the DevTools on browser, after trying to log in, you get a 504 Gateway Time-out error for the Login API. This issue was both on Edge and Firefox.

I understand that this is an extrememly unstable version of OkayuCDN since i have used it before. Images can be provided if they are wanted for further investigation.

tacobella03 commented 3 months ago

Also please tell me if these issues should be somewhere else and not in the main Issues for OkayuCDN.

okawaffles commented 3 months ago
4|OkayuCDN | TypeError: pchstr must be a non-empty string
4|OkayuCDN |     at deserialize (/home/okawaffles/okayucdn_nightly/okayucdn/node_modules/@phc/format/index.js:143:11)
4|OkayuCDN |     at verify (/home/okawaffles/okayucdn_nightly/okayucdn/node_modules/argon2/argon2.js:91:15)
4|OkayuCDN |     at LoginVerifySecure (/home/okawaffles/okayucdn_nightly/okayucdn/modules/accountHandler.js:38:27)
4|OkayuCDN |     at LoginPOSTHandler (/home/okawaffles/okayucdn_nightly/okayucdn/modules/accountHandler.js:138:15)
4|OkayuCDN |     at Layer.handle [as handle_request] (/home/okawaffles/okayucdn_nightly/okayucdn/node_modules/express/lib/router/layer.js:95:5)
4|OkayuCDN |     at next (/home/okawaffles/okayucdn_nightly/okayucdn/node_modules/express/lib/router/route.js:149:13)
4|OkayuCDN |     at middleware (/home/okawaffles/okayucdn_nightly/okayucdn/node_modules/express-validator/src/middlewares/check.js:16:13)
4|OkayuCDN |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
tacobella03 commented 3 months ago

This seems like a possible issue with Argon again. Since all i can do is find bugs, im not able to help fix anything but other developers with the same problem seem to have related it to Argon (specifically the function argon2.verify). I will let okawaffles figure it out since i don't have any skills in web development.

okawaffles commented 3 months ago

it is likely not an issue with argon but rather an issue with sanitization or configuration. it is only an issue on nightly server, so it is likely a misconfiguration in my haste of pushing.

okawaffles commented 3 months ago

userData.password is returning as an object????

okawaffles commented 3 months ago

culprit is SignupPOSTHandler

tacobella03 commented 3 months ago

Even after commit d9112b2 and creating a new account with the same username, i am getting the same error telling me to check username and password. And also the same 504 Gateway time out error. image I have cleared all Cookies and Site data before trying this.

I can provide as much evidence as needed if you want what is happening on my end.

okawaffles commented 3 months ago

oops lol i forgot to pull you'll need to sign up again

tacobella03 commented 3 months ago

oops lol i forgot to pull you'll need to sign up again

Just reply or edit your comment when i can sign up. 👍

okawaffles commented 3 months ago

i pulled

tacobella03 commented 3 months ago

I had a 504 Gateway error when creating an account but the request was sent and account was created.

image

Not sure what happened but account was created successfully.