nyaruka / gocommon

Common utility library for the TextIt platform.
Other
7 stars 11 forks source link

Make phone parsing stricter #122

Closed rowanseymour closed 5 months ago

rowanseymour commented 5 months ago

We currently allow phone URNs to be any garbage that is up to 64 chars of alphanumeric characters... and then in courier we have to make it stricter in StrictTelForCountry https://github.com/nyaruka/courier/blob/29ce7cd76c13081efb5e61be45f32770c7a2722a/handlers/utils.go#L99

I don't see why we can't be stricter here..

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.57%. Comparing base (40a12c7) to head (c9bf887).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #122 +/- ## ========================================== + Coverage 89.54% 89.57% +0.03% ========================================== Files 43 43 Lines 1979 1986 +7 ========================================== + Hits 1772 1779 +7 + Misses 168 167 -1 - Partials 39 40 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.