From 8451ee20c913a76dd301375823bbda7364f18310 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 5 Dec 2017 16:33:24 -0800 Subject: disallow backslashes in wiki and wiki-page names --- Zotlabs/Lib/NativeWikiPage.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Zotlabs/Lib/NativeWikiPage.php') diff --git a/Zotlabs/Lib/NativeWikiPage.php b/Zotlabs/Lib/NativeWikiPage.php index 209a5ef3c..919c51276 100644 --- a/Zotlabs/Lib/NativeWikiPage.php +++ b/Zotlabs/Lib/NativeWikiPage.php @@ -68,6 +68,9 @@ class NativeWikiPage { return array('content' => null, 'message' => 'Error reading wiki', 'success' => false); } + // backslashes won't work well in the javascript functions + $name = str_replace('\\','',$name); + // create an empty activity $arr = []; @@ -351,6 +354,7 @@ class NativeWikiPage { // fetch the most recently saved revision. $item = self::load_page($arr); + if(! $item) { return array('message' => t('Page not found'), 'success' => false); } -- cgit v1.2.3