kolab_2fa: Fix compatibility with OTP apps that require algorithm in upper-case

This commit is contained in:
Aleksander Machniak 2024-09-03 15:40:32 +02:00
parent ccc000f219
commit 3d54dae3e6

View file

@ -734,6 +734,10 @@ class kolab_2fa extends rcube_plugin
try {
$uri = $driver->get_provisioning_uri();
// Some OTP apps have an issue with algorithm character case
// So we make sure we use upper-case per the spec.
$uri = str_replace('algorithm=sha', 'algorithm=SHA', $uri);
$qr = new Endroid\QrCode\QrCode();
$qr->setText($uri)
->setSize(240)