--- cacert/www/index.php	2008-10-06 22:29:20.000000000 +0100
+++ cacert/www/index.php	2008-11-13 16:58:56.000000000 +0000
@@ -432,7 +432,9 @@
 			$_SESSION['_config']['errmsg'] .= _("First and/or last names were blank.")."<br>\n";
 		}
 		if($_SESSION['signup']['year'] < 1900 || $_SESSION['signup']['month'] < 1 || $_SESSION['signup']['month'] > 12 ||
-			$_SESSION['signup']['day'] < 1 || $_SESSION['signup']['day'] > 31)
+			$_SESSION['signup']['day'] < 1 || $_SESSION['signup']['day'] > 31 ||
+			!checkdate($_SESSION['signup']['month'],$_SESSION['signup']['day'],$_SESSION['signup']['year']) ||
+			mktime(0,0,0,$_SESSION['signup']['month'],$_SESSION['signup']['day'],$_SESSION['signup']['year']) > time(now) )
 		{
 			$id = 1;
 			$_SESSION['_config']['errmsg'] .= _("Invalid date of birth")."<br>\n";
