View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000618 | Test1.cacert.at | public | 2008-09-19 07:31 | 2013-01-10 17:49 | |
Reporter | wolfman | Assigned To | Sourcerer | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Summary | 0000618: date of birth - absolutelly no sanity checks | ||||
Description | The value for "date of birth" is not checked at all. I tried different things like: - date in future - date not possible (like 31. Feb.) there are no complaints. I think the system should at least check that the date is possible and in the future. | ||||
Tags | No tags attached. | ||||
Attached Files | datecheck.patch (809 bytes)
--- 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"; | ||||
related to | 0000583 | closed | Main CAcert Website | "Assure Somebody" allows future assurance dates |
|
I have attached a patch that should solve both these validation issues. |
|
The "time(now)" piece of the patch does not work on PHP. time() does not take an argument, and now isn't a defined name. time() should be used instead. |
|
Patch has been adapted and applied. Please test and close the bug. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-09-19 07:31 | wolfman | New Issue | |
2008-11-13 17:03 | Gaz | File Added: datecheck.patch | |
2008-11-13 17:04 | Gaz | Note Added: 0001254 | |
2009-04-10 22:01 | Sourcerer | Note Added: 0001366 | |
2009-04-10 22:21 | Sourcerer | Note Added: 0001367 | |
2009-04-10 22:21 | Sourcerer | Status | new => solved? |
2009-04-10 22:21 | Sourcerer | Resolution | open => fixed |
2009-04-10 22:21 | Sourcerer | Assigned To | => Sourcerer |
2009-04-26 14:43 | Sourcerer | Status | solved? => closed |
2013-01-10 17:49 | Werner Dworak | Relationship added | related to 0000583 |