urlencode company name; closes #1690

This commit is contained in:
Dane Everitt 2020-07-02 21:14:53 -07:00
parent e95a532da9
commit 7ee509d8c2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -71,7 +71,7 @@ class TwoFactorSetupService
'totp_secret' => $this->encrypter->encrypt($secret),
]);
$company = preg_replace('/\s/', '', $this->config->get('app.name'));
$company = urlencode(preg_replace('/\s/', '', $this->config->get('app.name')));
return sprintf(
'otpauth://totp/%1$s:%2$s?secret=%3$s&issuer=%1$s',