NIIF/simplesamlphp-module-authtfaga

Spaces in totpIssuer will cause Google Authenticator to fail

Closed this issue · 1 comments

In https://github.com/NIIF/simplesamlphp-module-authtfaga/blob/master/lib/Auth/Source/authtfaga.php#L254, urlencode is called on the otpauth:// URL so it can be passed to googleapis to make a QR code. Any spaces in the totpIssuer value will not be URL encoded, so will result in a otpauth:// URL containing spaces. Google authenticator will not accept this.

Rather than urlencode, rawurlencode should be used which will convert spaces to %20.

sitya commented

Thanks. Commited.