isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

fix(otp): increment instead of update for concurrency #1186

Closed dcshzj closed 7 months ago

dcshzj commented 7 months ago

Problem

The update operation on the number of attempts for each OTP is subject to race conditions, which causes the value to be overwritten when many requests are made simultaneously.

Solution

Breaking Changes

Bug Fixes:

Tests

Deploy Notes

None