[BUGFIX] Login fails silently, when no backend for rsaauth is available
authorSteffen Gebert <steffen.gebert@typo3.org>
Mon, 10 Oct 2011 22:15:13 +0000 (00:15 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Sun, 18 Dec 2011 11:09:25 +0000 (12:09 +0100)
In case of no OpenSSL backend being available for rsaauth (e.g. after
moving to another server), the login silently fails.

Better throw an Exception and give useful hints, why no login is
possible and how to fix it.

Change-Id: Ic91d150f3efa307d7a9fa35e30c2036ef2dfb93d
Resolves: #30758
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/6965
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/rsaauth/hooks/class.tx_rsaauth_loginformhook.php

index ad032b7..204582c 100644 (file)
@@ -68,6 +68,11 @@ class tx_rsaauth_loginformhook {
                                // Add RSA hidden fields
                                $form .= '<input type="hidden" id="rsa_n" name="n" value="' . htmlspecialchars($keyPair->getPublicKeyModulus()) . '" />';
                                $form .= '<input type="hidden" id="rsa_e" name="e" value="' . sprintf('%x', $keyPair->getExponent()) . '" />';
+                       } else {
+                               throw new t3lib_error_Exception(
+                                       'No OpenSSL backend could be obtained for rsaauth.',
+                                       1318283565
+                               );
                        }
                }
                return $form;