J-Rios/TLG_JoinCaptchaBot

[Bug] Math captcha solved without equation result!

Closed this issue · 1 comments

Issue

Seems that an user could solve the math captcha by writting the math equation instead the result.

imagen

imagen

Reason

Once a message from a user that is solving a captcha is received, for both captcha mode "nums" or "math", Bot code first check if the message content has the number to solve, in the previous issue example, the expected solve number in this case is "8" and the user writes "56-48", containing a "8" on it, so it solves the captcha instead handle it like a "math" mode.

Bug located on code line:

if solve_num.lower() in msg_text.lower():

Issue solved by:
c72bd23

Closing.