Page MenuHomePhabricator

Correct an ambiguous regexp in DiffusionRequest

Authored by epriestley on Nov 2 2018, 2:56 AM.




The intent of [\d-,] is "digits, hyphen, and comma" but [x-y] means "character range x-y".

Specify [\d,-] instead to disambiguate the hyphen as "literal hyphen", not a character range marker.

Test Plan

I can't reproduce the original error as reported, but browsed around Diffusion for a bit.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Nov 2 2018, 2:56 AM
epriestley requested review of this revision.Nov 2 2018, 2:58 AM
avivey accepted this revision.Nov 2 2018, 3:00 AM
This revision is now accepted and ready to land.Nov 2 2018, 3:00 AM
This revision was automatically updated to reflect the committed changes.

Thanks, this is similar to the solution I came up with.