These are chat archives for fossasia/open-event-server

17th
Feb 2019
Divyam Goel
@divyam-goel
Feb 17 04:59
Hi! @mariobehling has mentioned in the roadmap that the error codes and messages need to be improved. I wish to work on this aspect. Can someone suggest how to proceed?
Anupam Dagar
@Anupam-dagar
Feb 17 07:48
For a verified user, is_verified needs to be true, right? I set it to true for my admin user but it still shows your email is not verified.
Saicharan Reddy
@mrsaicharan1
Feb 17 07:55
The Admin user is verified by default, isn't it?
Anupam Dagar
@Anupam-dagar
Feb 17 07:58
i suppose yes. I changed between db while testing, i guess i did some mistake. I am dropping and recreating the db
Mario Behling
@mariobehling
Feb 17 08:38
Anyone interested in this issue: fossasia/open-event-wsgen#2134 ?
Divyam Goel
@divyam-goel
Feb 17 10:55
I am not able to access the admin panel. I am using the admin credentials that I created while setting up the project. However, when I am using the APIs through I am able to access the API restricted for admin access with the same creds. Can someone suggest what might be the issue? @CosmicCoder96
Saicharan Reddy
@mrsaicharan1
Feb 17 10:57
Try recreating the database
Divyam Goel
@divyam-goel
Feb 17 11:07
@mrsaicharan1 I dropped the databases and created them again and then ran the create_db.py script. But I still can't access the admin panel. Any idea why?
Saicharan Reddy
@mrsaicharan1
Feb 17 11:08
Accessing admin panel in the sense? Are you getting a 404 when you route through the drop down?
Divyam Goel
@divyam-goel
Feb 17 11:15
It shows: "Credentials incorrect"
if user.password != generate_password_hash(self.password.data, user.salt): raise validators.ValidationError('Credentials incorrect.')
What does the above piece of code achieve? If I comment it out then I am able to login.
The code segment above is part of LoginForm.validate_login() in app.init.py
Saicharan Reddy
@mrsaicharan1
Feb 17 12:00
It just compares the hash of the input password and the saved password hash to check whether they match
Maybe you're putting inthe wrong pass
Uddeshya Singh
@uds5501
Feb 17 13:41
Maybe you're putting inthe wrong pass
+1
Divyam Goel
@divyam-goel
Feb 17 15:11
No, the password was right. The issue was the user.password is a string while the generate_password_hash produces a byte string. So even though contain the same value the "if" return false. However this code segment is unnecessary as there is a is_correct_password method in the User model. I have created a PR to fix this issue.
Divyam Goel
@divyam-goel
Feb 17 16:11
Thank you @iamareebjamal for merging #5615. This was my first open source PR and even though it was a small change, means a lot to me.
Shreyans Jain
@shreyansjain012
Feb 17 19:15
During installation, "INTEGRATE_SOCKETIO=false celery worker -A app.celery" this command is giving a warning how to deal with it?