born05 / craft-twofactorauthentication

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

Issuer must not contain a colon #75

Closed supercooljames closed 1 year ago

supercooljames commented 1 year ago

I've installed the plugin, but I'm getting the following error message.

I've not configure or added any users. I've tried a combination of options in the config file to no avail.

Am I missing something obvious?

image

Assert\InvalidArgumentException
Issuer must not contain a colon

(Craft: 3.7)

Any help much appreciated

jamie-s-white commented 1 year ago

This is happening because the plugin is using the variable:

Craft::$app->getSystemName()

Which in our case is returning a system name variable which contains a colon character.

It seems that the problem is that the assumption with this plugin is that the Craft System Name only contains alphanumeric characters, which isn't necessiarily true, and that the fix for this bug would be to sanitise the system name before using it for the issuer parameter?