jd1378 / otphelper

open-source application that can copy OTP and codes from notifications automatically for you
GNU Affero General Public License v3.0
428 stars 32 forks source link

False positive when SMS contains a URL? #54

Closed Dev-iL closed 8 months ago

Dev-iL commented 8 months ago

Today I received an SMS, which had the https detected as the code. It should be noted that this SMS has no code whatsoever.

שלום שם , משלוח שהזמנת מFedEx שמספרו 7153853481 נקלט במערכת. המשלוח מיועד להימסר בנקודת חלוקה שנבחרה אוטומטית על ידי המערכת וסמוכה לכתובת: כתובת. מומלץ לוודא את הישוב ואת נקודת החלוקה אליה תשלח החבילה בלינק: https://ilto.run/UHgjdlGX . השינוי יכול להתבצע עד קליטת החבילה במחסן - במידה ולא ייקלט השינוי, החבילה תשלח לנקודת חלוקה באזור כתובתך.

Above is the SMS almost verbatim (with PII removed).

I was on v1.9.0 at the time.

jd1378 commented 8 months ago

the reason is that קוד is a sensitive keyword. if it's not supposed to be a sensitive keyword let me know

Dev-iL commented 8 months ago

Took me a while to spot the offending word.... So קוד is correct, but it shouldn't be detected when these 3 letters appear as part of another word, in this case נקודת (i.e. "codec" shouldn't trigger it just because it has "code" in it). I suggest limiting it to קוד, הקוד and discard the match if there are any other prefixes or suffixes.

jd1378 commented 8 months ago

so the fix is simple, I'll apply the fix and release it with the next version

jd1378 commented 8 months ago

released in v1.11.0