1. Daniel Poelzleithner
  2. liquid_feedback_frontend

Commits

bsw  committed 3da8612

Security related fix of locking during registration process

  • Participants
  • Parent commits 8183cc8
  • Branches default

Comments (0)

Files changed (1)

File app/main/index/_action/register.lua

View file
  • Ignore whitespace
-local invite_code = InviteCode:by_code(param.get("code"))
+local code = param.get("code")
+
+local invite_code = InviteCode:new_selector()
+  :add_where{ "code = ?", code }
+  :optional_object_mode()
+  :for_update()
+  :exec()
 
 if not invite_code or invite_code.used then
   slot.put_into("error", _"The code you've entered is invalid")