scitran / core

RESTful API
https://scitran.github.io
MIT License
18 stars 18 forks source link

Fix regex project match for reaper upload #1026

Closed nagem closed 6 years ago

nagem commented 6 years ago

A regex is required to do a case insensitive lookup of Mongo string fields. The existing regex did not use proper start-of-string and end-of-string tokens so it matched more generously than was expected. This change requires a case-insensitive exact match rather than the existence of the search string.

FYI @gsfr

Review Checklist

codecov-io commented 6 years ago

Codecov Report

Merging #1026 into master will increase coverage by <.01%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1026      +/-   ##
==========================================
+ Coverage   90.64%   90.64%   +<.01%     
==========================================
  Files          50       50              
  Lines        6763     6764       +1     
==========================================
+ Hits         6130     6131       +1     
  Misses        633      633
ryansanford commented 6 years ago

LGTM

Tested end-to-end and confirmed match is now case-insensitive, and anchored at both ends. Nice work!