Bug #603

Profile Away Date can be in the past, in the same year

Added by Dennis Tsang about 2 years ago. Updated about 2 years ago.

Status:Closed Start date:12/20/2009
Priority:Normal Due date:
Assignee:Dennis Tsang % Done:

100%

Category:Profile
Target version:1.4.11
Reproducibility:Always Database Type:MySQLi
Reported In MyBB Version:1.4.10 Database Version:
PHP Version:5.2.6 SQA assignments:
Browser:Chrome 4

Description

You can set your profile away date to be in the past, in the current year. So say the current day is December 19, 2009. You can set your profile away date to Jan 1-Dec 18, 2009 with no error.

Reproduction:
If it is the year 2009, change your away date to 1 January 2009.

Fix:
In usercp.php, find:

            if ($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("Y"))

Replace with:
            if ($returntimestamp < $awaytimestamp)

Associated revisions

Revision 4620
Added by Dennis Tsang about 2 years ago

Validating input for return date (improves:600)
Fixing check for past return date(fixes:603)

Revision 4632
Added by Dennis Tsang about 2 years ago

Fixing years past 2038 (improves:603)

History

Updated by Dennis Tsang about 2 years ago

  • Assignee set to Dennis Tsang
  • Target version set to 1.4.11

Updated by Dennis Tsang about 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4620.

Updated by Stefan T. about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF