From 29266e780769e83234f586c9e5779e3ebc593264 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 27 Oct 2008 07:41:36 +0000 Subject: [PATCH] Assertion added to crypto helper (CAPTCHA might still be broken, why?) --- inc/classes/main/crypto/class_CryptoHelper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/classes/main/crypto/class_CryptoHelper.php b/inc/classes/main/crypto/class_CryptoHelper.php index 2ebafd8..1ccdaae 100644 --- a/inc/classes/main/crypto/class_CryptoHelper.php +++ b/inc/classes/main/crypto/class_CryptoHelper.php @@ -241,6 +241,11 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { // Get the real string out $strArray = explode("|", $garbageString); + + // Does the element count match? + assert(count($strArray) == 3); + + // Decode the string $str = base64_decode($strArray[1]); // Trim trailing nulls away -- 2.39.2