[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)
committerHelmut Hummel <typo3@helmut-hummel.de>
Sat, 22 Oct 2011 13:35:55 +0000 (15:35 +0200)
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: I810ac4fe38e11e8b049ec747ac746e356fcd90ed
Resolves: #30758
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/5689
Reviewed-by: Andreas Wolf
Reviewed-by: Björn Pedersen
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Georg Ringer
Reviewed-by: Markus Klein
Reviewed-by: Oliver Klee
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/rsaauth/hooks/class.tx_rsaauth_loginformhook.php

index df31d30..3fdae38 100644 (file)
@@ -60,6 +60,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;