blabla1337 / skf-flask

Security Knowledge Framework (SKF) Python Flask / Angular project
https://www.securityknowledgeframework.org
Apache License 2.0
810 stars 307 forks source link

Errors on first-login not working anymore #627

Closed eL-Prova closed 4 years ago

eL-Prova commented 4 years ago

Hi all,

Errors given by the API are not visible anymore. I cant create my first account for some reason, but API returns the JSON { "message": "User could not be activated" } but it is not shown on the page.

blabla1337 commented 4 years ago

Hi,

Hmm what are you using the local docker approach or installed it yourself on a dedicated server? Also can you try to login with: username: admin password: admin or password: skf-test

Maybe the database already has an activated user

eL-Prova commented 4 years ago

Hi,

I got Windows with docker. I used the command: docker run -e "ORIGIN=localhost" -e "JWT_SECRET=secretttt" -ti -p 127.0.0.1:443:443 blabla1337/skf-flask

Login with admin don't seems to work :-( I expect the database is not created but I am not sure.

blabla1337 commented 4 years ago

Check, and you used the correct input for the first registration? userid: 1 token: 1234 email: example@owasp.org username: admin and then choose your password

eL-Prova commented 4 years ago

@blabla1337 ok, no idea what happen but reboot macht good ;-) I can login, so the only thing left is that the message / errors should be shown :-) if possible I will try to fix it.

blabla1337 commented 4 years ago

Haha nice, rebooting is always magic and solves the most problems in the world :)

Alright thanks, maybe we already fixed it in the Dev branch as I remember this issue but we would appreciate if you could check it 👍 We didn't pushed it yet as the Dev branch will be a huge major release for SKF that we are planning in 2 months

cowbe0x004 commented 4 years ago

So this docker command doesn't really work if you're trying to access it remotely. I've tried changing localhost to my domain in /home/user_skf/Angular/dist. My command is

docker run -v /skf-flask/skf/db/db.sqlite:/skf-flask/skf/db/db.sqlite -e "ORIGIN=DOMAIN" -e "JWT_SECRET=change_this_super_secret_random_string" -ti -p 127.0.0.1:443:443 blabla1337/skf-flask

I still cannot past first login, and also getting error from js console,

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost/api/user/activate/1. (Reason: CORS request did not succeed).

Any further idea?

ducna96 commented 2 years ago

Haha nice, rebooting is always magic and solves the most problems in the world :)

Alright thanks, maybe we already fixed it in the Dev branch as I remember this issue but we would appreciate if you could check it 👍 We didn't pushed it yet as the Dev branch will be a huge major release for SKF that we are planning in 2 months

Hi blabla1337, i follow your instruction. but it not working for me image