bee-san / bee-san/pyWhat

Phone Number matches incorrectly

Open
#240 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
7.3k
Forks
391
PR merge metrics
No merged PRs in 30d

Description

I've had numerous false positives with the phone number regex that are obviously wrong. All of these match:
```
0000000000000
0123456789
3333333333333
3333333333
4444444444444
22223333333
-1606586780
```
The last one is potentially valid but `-1` is not valid in a phone number. `+1` is. If it can't be less broad then make the rarity `0`.

Contributor guide

Open the contributing guide

Research direction

Locate the phone-number regex and any related tests, then reproduce the listed false positives. Verify that the invalid examples no longer match, while a valid +1-prefixed number remains supported; add or update regression coverage for these cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.