E-mail OTP Login
The module does not limit how many times someone can guess a login code. A person who knows an email address could repeatedly guess the code until they succeed and log in as that user to view or alter any data.
- Who could do thisAnyone visiting the site. No login needed.
- Does it apply to youA site is affected if an attacker knows the registered email address of the target person.
- Has it been used in attacksA working example has been published, so assume someone will try.
- How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.
Tell your developerUpdate E-mail OTP Login to 1.0.8.
For developers: what the fix changed
The fix introduces `OtpStore` and `OtpFlood` services to limit the number of attempts and rate of attempts for OTP validation, and to expire and hash login codes. It updates `OtpEmailForm` and `OtpValidation` to use these services, and adds hooks in `EmailOtpLoginHooks` to invalidate codes on user update or deletion.
Also in this release Added tests for the new OTP protection features and updated the README.md with security information.
README.md+17 −0email_otp_login.install+28 −0 fixemail_otp_login.module+17 −0 fixemail_otp_login.services.yml+8 −0 fixsrc/Controller/OtpLoginController.php+5 −5 fixsrc/Form/OtpEmailForm.php+40 −31 fixsrc/Form/OtpValidation.php+57 −34 fixsrc/Hook/EmailOtpLoginHooks.php+33 −1 fixsrc/OtpAccount.php+50 −0 fixsrc/OtpFlood.php+180 −0 fixsrc/OtpStore.php+166 −0 fixsrc/OtpVerification.php+31 −0 fix