Open shukkkur opened 2 years ago
https://github.com/Curiouspaul1/telegram-business/blob/8ca9209f9f174c6ee9db97250c9487a48fbf3b8c/handlers.py#L185-L194
Since it's possible to expect anything from the user, wouldn't it be safer to strip and lower case the string inputs?
new_user = client.query( q.create(q.collection('User'), { "data":{ "name":data[0].strip().lower(), "email":data[1].strip().lower(), "telephone":data[2], "is_smeowner":False, "preference": "", "chat_id":chat_id }
Like this?
yeah that makes sense, do you want to fix that and send a PR?
@Curiouspaul1 Sure, will do!
@shukkkur how's the PR coming along, also any feedbacks on the new updates i made to fix the issue?. Is it working well?
https://github.com/Curiouspaul1/telegram-business/blob/8ca9209f9f174c6ee9db97250c9487a48fbf3b8c/handlers.py#L185-L194
Since it's possible to expect anything from the user, wouldn't it be safer to strip and lower case the string inputs?
Like this?