born05 / craft-twofactorauthentication

Craft plugin for two-factor or two-step login using Time Based OTP.
MIT License
36 stars 26 forks source link

rememberedUserSessionDuration of false causes crash #3

Closed brybeecher closed 6 years ago

brybeecher commented 6 years ago

The craftCms config value of rememberedUserSessionDuration being set to false instead of a time (eg. 'P1D') causes the following php error.

Exception: DateInterval::__construct(): Unknown or bad format () in /var/www/craft/plugins/twofactorauthentication/services/TwoFactorAuthentication_VerifyService.php:41 (see source)

Perhaps a sane default value for $sessionDuration when rememberedUserSessionDuration is false would be good? A few hours or a day perhaps?

roelvanhintum commented 6 years ago

@brybeecher thanks, i'll look into this.

roelvanhintum commented 6 years ago

fixed in 8571b5e8117760ceea606938c40c95215ecfd354