Closed bjeanes closed 2 years ago
Thanks for the patch. This does seem like an obvious bug, and I'll also not sure why the tests didn't catch it. Maybe because they don't end up using the resulting sms after the call to update_sms? We should probably add a test that breaks without this change. I'll see if I can work on that tomorrow, then merge this.
No worries. I was using update_hash_ds
in a local feature of mine and noticed the bug so just wanted to bring your attention to it. I would have added a test but I made this PR via GH UI because I'm on a new dev environment without DB setup for rodauth tests. I thought it best to just get your eyes on it first. :)
I'm surprised there wasn't a test that caught this for the
sms_codes
feature, which uses it thusly:https://github.com/jeremyevans/rodauth/blob/d21277ddaae0b74ba70c86a8f08f467344085f76/lib/rodauth/features/sms_codes.rb#L495-L497