From 3bd7c1af238191bd9b1a739b7123fc1ec0296174 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 15 Jul 2013 18:07:23 -0700 Subject: fix some issues that showed up in the logs. --- include/items.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 898fc9ff8..4a560afc9 100755 --- a/include/items.php +++ b/include/items.php @@ -1306,6 +1306,13 @@ function item_store($arr,$force_parent = false) { return 0; } + // Don't let anybody set these, either intentionally or accidentally + + if(array_key_exists('id',$arr)) + unset($arr['id']); + if(array_key_exists('parent',$arr)) + unset($arr['parent']); + $arr['lang'] = detect_language($arr['body']); $allowed_languages = get_pconfig($arr['uid'],'system','allowed_languages'); -- cgit v1.2.3