A security flaw in a popular internet-connected chastity sex toy put tens of thousands of users at risk of permanent lock-in.