Re: Bug in digest_md5_parse_challenge
"Pablo Álvarez de Sotomayor Posadillo" <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
Paul> Additionally, if base64_decode() returns FALSE, we need to
Paul> add one more line ABOVE the while statement so that the
Paul> return value is initialized (otherwise, it should generate a
Paul> PHP notice):
Paul> $parsed = array();
You are right once again, I'm just thinking about it. I attach the patch.
Regards
--
Pablo Álvarez de Sotomayor Posadillo
Ingeniero Técnico en Informática de Sistemas
http://ritho.net
"De todas las cosas que he perdido la que
mas hecho de menos es mi cerebro"
===File ~/auth_digest_md5_warning.patch=====================
Index: functions/auth.php
===================================================================
--- functions/auth.php (revision 13262)
+++ functions/auth.php (working copy)
@@ -199,7 +199,8 @@
*/
function digest_md5_parse_challenge($challenge) {
$challenge=base64_decode($challenge);
- while (isset($challenge) && $challenge !== FALSE) {
+ $parsed = array();
+ while (!empty($challenge)) {
if ($challenge{0} == ',') { // First char is a comma, must not be 1st time through loop
$challenge=substr($challenge,1);
}
============================================================
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel