aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/NativeWikiPage.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-05 16:33:24 -0800
committerzotlabs <mike@macgirvin.com>2017-12-05 16:33:24 -0800
commit8451ee20c913a76dd301375823bbda7364f18310 (patch)
treec7e202b7c4717d52c8861aa42dc859791e8e5569 /Zotlabs/Lib/NativeWikiPage.php
parentd4acf4119226394b203d8bb52b75eec6d56d6631 (diff)
downloadvolse-hubzilla-8451ee20c913a76dd301375823bbda7364f18310.tar.gz
volse-hubzilla-8451ee20c913a76dd301375823bbda7364f18310.tar.bz2
volse-hubzilla-8451ee20c913a76dd301375823bbda7364f18310.zip
disallow backslashes in wiki and wiki-page names
Diffstat (limited to 'Zotlabs/Lib/NativeWikiPage.php')
-rw-r--r--Zotlabs/Lib/NativeWikiPage.php4
1 files changed, 4 insertions, 0 deletions
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);
}