From ab5bf1b7d69f4027f595eef56cf4d99207b8b46e Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Sat, 22 Nov 2014 11:54:40 -0800 Subject: prevent database hackery from leaking over the wire --- include/items.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 477b5197e..c488e1953 100755 --- a/include/items.php +++ b/include/items.php @@ -1094,7 +1094,8 @@ function encode_item($item,$mirror = false) { $x['message_parent'] = $item['thr_parent']; $x['created'] = $item['created']; $x['edited'] = $item['edited']; - $x['expires'] = $item['expires']; + // always send 0's over the wire + $x['expires'] = (($item['expires'] == '0001-01-01 00:00:00') ? '0000-00-00 00:00:00' : $item['expires']); $x['commented'] = $item['commented']; $x['mimetype'] = $item['mimetype']; $x['title'] = $item['title']; -- cgit v1.2.3