Fixes:
This is a further fix to correct the way OTK's are counted
Description of what your PR accomplishes:
Only persist counts for OTKExpired, OTKExhausted, OTKExpiredNoUploads and OTKUnclaimed if a deletion actually occurs.
This PR also fixes a small potential bug where SQL Queries are using fmt.sprintf that can potentially allow a sql injection attack if someone was able to modify our Server Secrets. Although if that were to occur we would have significantly greater problems then a sql injection. This is just closing up a small issue.
Why this approach? Any notable design decisions?
In order to not have to amend ATO we are modifying the existing services instead of breaking out expiration code into a serverless function ala #422
Fixes: This is a further fix to correct the way OTK's are counted
Description of what your PR accomplishes:
Only persist counts for OTKExpired, OTKExhausted, OTKExpiredNoUploads and OTKUnclaimed if a deletion actually occurs.
This PR also fixes a small potential bug where SQL Queries are using fmt.sprintf that can potentially allow a sql injection attack if someone was able to modify our Server Secrets. Although if that were to occur we would have significantly greater problems then a sql injection. This is just closing up a small issue.
Why this approach? Any notable design decisions?
In order to not have to amend ATO we are modifying the existing services instead of breaking out expiration code into a serverless function ala #422