NIIF / simplesamlphp-module-authtfaga

Two-factor authentication module for simpleSAMLphp using Google Authenticator
12 stars 10 forks source link

Spaces in totpIssuer will cause Google Authenticator to fail #8

Closed vittala closed 7 years ago

vittala commented 7 years ago

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 7 years ago

Thanks. Commited.