From 4670182d79f7866072c3a241e19be592e0a04c0a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Oct 2017 14:53:49 +0800 Subject: [PATCH 1/2] fix invalid value for token_validity --- model/AdminHandler.php | 2 +- model/MailboxHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/AdminHandler.php b/model/AdminHandler.php index bce422fa..1b398377 100644 --- a/model/AdminHandler.php +++ b/model/AdminHandler.php @@ -79,7 +79,7 @@ class AdminHandler extends PFAHandler { 'phone' => pacol( 1, $passwordReset, 0, 'text', 'pCreate_mailbox_phone', 'pCreate_mailbox_phone_desc', ''), 'email_other' => pacol( 1, $passwordReset, 0, 'mail', 'pCreate_mailbox_email', 'pCreate_mailbox_email_desc', ''), 'token' => pacol( 1, 0, 0, 'text', '' , '' ), - 'token_validity' => pacol( 1, 0, 0, 'ts', '' , '' ), + 'token_validity' => pacol( 1, 0, 0, 'ts', '' , '', '2000-01-01 00:00:00'), 'created' => pacol( 0, 0, 0, 'ts', 'created' , '' ), 'modified' => pacol( 0, 0, 1, 'ts', 'last_modified' , '' ), ); diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 0e0fbccb..b0ad2316 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -42,7 +42,7 @@ class MailboxHandler extends PFAHandler { 'phone' => pacol( 1, $passwordReset, 0, 'text', 'pCreate_mailbox_phone' , 'pCreate_mailbox_phone_desc' , ''), 'email_other' => pacol( 1, $passwordReset, 0, 'mail', 'pCreate_mailbox_email' , 'pCreate_mailbox_email_desc' , ''), 'token' => pacol( 1, 0, 0, 'text', '' , '' ), - 'token_validity'=> pacol( 1, 0, 0, 'ts', '' , '' ), + 'token_validity'=> pacol( 1, 0, 0, 'ts', '' , '', '2000-01-01 00:00:00' ), 'created' => pacol( 0, 0, 1, 'ts', 'created' , '' ), 'modified' => pacol( 0, 0, 1, 'ts', 'last_modified' , '' ), # TODO: add virtual 'notified' column and allow to display who received a vacation response? From 5f1ac12d72ea138b0ca619b45cd2b5eff731f9c6 Mon Sep 17 00:00:00 2001 From: houmingtao Date: Fri, 24 Nov 2017 16:04:18 +0800 Subject: [PATCH 2/2] use current time as default token_validity value --- model/AdminHandler.php | 2 +- model/MailboxHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/AdminHandler.php b/model/AdminHandler.php index 1b398377..2897f5ff 100644 --- a/model/AdminHandler.php +++ b/model/AdminHandler.php @@ -79,7 +79,7 @@ class AdminHandler extends PFAHandler { 'phone' => pacol( 1, $passwordReset, 0, 'text', 'pCreate_mailbox_phone', 'pCreate_mailbox_phone_desc', ''), 'email_other' => pacol( 1, $passwordReset, 0, 'mail', 'pCreate_mailbox_email', 'pCreate_mailbox_email_desc', ''), 'token' => pacol( 1, 0, 0, 'text', '' , '' ), - 'token_validity' => pacol( 1, 0, 0, 'ts', '' , '', '2000-01-01 00:00:00'), + 'token_validity' => pacol( 1, 0, 0, 'ts', '' , '', date("Y-m-d H:i:s",time())), 'created' => pacol( 0, 0, 0, 'ts', 'created' , '' ), 'modified' => pacol( 0, 0, 1, 'ts', 'last_modified' , '' ), ); diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index b0ad2316..4bd7a8f6 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -42,7 +42,7 @@ class MailboxHandler extends PFAHandler { 'phone' => pacol( 1, $passwordReset, 0, 'text', 'pCreate_mailbox_phone' , 'pCreate_mailbox_phone_desc' , ''), 'email_other' => pacol( 1, $passwordReset, 0, 'mail', 'pCreate_mailbox_email' , 'pCreate_mailbox_email_desc' , ''), 'token' => pacol( 1, 0, 0, 'text', '' , '' ), - 'token_validity'=> pacol( 1, 0, 0, 'ts', '' , '', '2000-01-01 00:00:00' ), + 'token_validity'=> pacol( 1, 0, 0, 'ts', '' , '', date("Y-m-d H:i:s",time())), 'created' => pacol( 0, 0, 1, 'ts', 'created' , '' ), 'modified' => pacol( 0, 0, 1, 'ts', 'last_modified' , '' ), # TODO: add virtual 'notified' column and allow to display who received a vacation response?