Charcoal-SE / SmokeDetector

Headless chatbot that detects spam and posts links to it in chatrooms for quick deletion.
https://metasmoke.erwaysoftware.com
Apache License 2.0
467 stars 181 forks source link

Watches: Migrate phone number out of regexes #13126

Closed micsthepick closed 1 week ago

micsthepick commented 1 week ago

Some time ago, Mayken wrote a heavily obfuscated phone number matching regex. This migrates it to watched_numbers.txt.

codygray commented 1 week ago

The CI checks are failing because you did not follow the correct format. The items in each line of watched_numbers.txt are tab-separated. Spaces will not work. It must be:

1725623085→micsthepick→919145958860

where is an actual tab character (\t).

micsthepick commented 1 week ago

huh, I used at least one tab

micsthepick commented 1 week ago

!!/blame Github.dev What happened is I checked to make sure that tabs were indeed in use, and made sure to use tab to insert tabs. What I forgot to do is check that tabs were actually inserted, and not replaced by spaces... Which of course they were...

codygray commented 1 week ago

The file also has to end with a newline character. That got omitted somehow. This is why the CI is failing this time (Failed: watched_numbers.txt:4713:No newline).

tripleee commented 1 week ago

For context, I encouraged @micsthepick to submit this as a PR so that we could have a brief discussion and rope in @makyen as a reviewer. I think we would want to do this, but I wanted to check before merging.

tripleee commented 1 week ago

Perhaps to remain faithful to the original, 1530522060 should remain the date stamp on the new entry?

micsthepick commented 1 week ago

@tripleee I don't think that makes sense, unless we also attribute mayken there also, but that seems less genuine?

tripleee commented 1 week ago

Well yes, if this is a migration then the original author and timestamp should be preserved; sorry for being vague.

micsthepick commented 1 week ago

oops, somehow in all that rebasing I managed to copy paste the wrong whitespace, one moment