TravelPouch / travelpouch

2 stars 2 forks source link

fix(travelcontainer): Change behaviour of isValidUid #28

Closed RemIsMyWaifuu closed 2 weeks ago

RemIsMyWaifuu commented 2 weeks ago

Change the regex expression for a valid fsUid to more closely reflect the way they are generated by firestore.

To be brief, the regex expression I was previously using did not guarantee that the string was exactly 20 characters, of the right type. By the addition of extra ^ and $ as request in #23, we're able to make sure it only matches valid strings correctly.

Extra unit tests were added so that this behaviour is set in stone. Closes #23

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud