aboutsummaryrefslogtreecommitdiffstats
path: root/include/RedDAV
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2014-12-14 01:22:52 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2014-12-14 01:50:56 +0100
commit233903c84428b9322eaea94bf22f6ae972e44332 (patch)
tree15ef2df5a74cd6f9ad587417979ed7129dfb81d8 /include/RedDAV
parent7a19bd7fb35f5b41db81e9a2397ea085a165a94a (diff)
downloadvolse-hubzilla-233903c84428b9322eaea94bf22f6ae972e44332.tar.gz
volse-hubzilla-233903c84428b9322eaea94bf22f6ae972e44332.tar.bz2
volse-hubzilla-233903c84428b9322eaea94bf22f6ae972e44332.zip
Add security logger to RedDAV.
Some smaller clean ups whitepsaces and tabs, use PHP_EOL, Doxygen, etc.
Diffstat (limited to 'include/RedDAV')
-rw-r--r--include/RedDAV/RedBasicAuth.php7
-rw-r--r--include/RedDAV/RedBrowser.php9
2 files changed, 10 insertions, 6 deletions
diff --git a/include/RedDAV/RedBasicAuth.php b/include/RedDAV/RedBasicAuth.php
index 2f86d4f82..19dd9a5f0 100644
--- a/include/RedDAV/RedBasicAuth.php
+++ b/include/RedDAV/RedBasicAuth.php
@@ -118,8 +118,11 @@ class RedBasicAuth extends DAV\Auth\Backend\AbstractBasic {
}
}
}
- logger('password failed for ' . $username);
- // @TODO add security logger
+
+ $error = 'password failed for ' . $username;
+ logger($error);
+ log_failed_login($error);
+
return false;
}
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php
index 21ea76aed..eb08fd79f 100644
--- a/include/RedDAV/RedBrowser.php
+++ b/include/RedDAV/RedBrowser.php
@@ -182,10 +182,10 @@ class RedBrowser extends DAV\Browser\Plugin {
}
}
}
-
- $parentHash = "";
+
+ $parentHash = '';
$owner = $this->auth->owner_id;
- $splitPath = split("/", $fullPath);
+ $splitPath = split('/', $fullPath);
if (count($splitPath) > 3) {
for ($i = 3; $i < count($splitPath); $i++) {
$attachName = urldecode($splitPath[$i]);
@@ -233,6 +233,7 @@ class RedBrowser extends DAV\Browser\Plugin {
}
// prepare quota for template
+ $quota = array();
$quota['used'] = $used;
$quota['limit'] = $limit;
$quota['desc'] = $quotaDesc;
@@ -257,7 +258,7 @@ class RedBrowser extends DAV\Browser\Plugin {
$this->server->broadcastEvent('onHTMLActionsPanel', array($parent, &$output));
}
$html .= $output;
-
+
get_app()->page['content'] = $html;
load_pdl(get_app());
construct_page(get_app());