Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2017-10-20 15:35:03 +0300
committersualko <klaus@jsxc.org>2017-10-20 15:35:03 +0300
commit64575bf3c266cbeb88a2371cd887c054075afc8a (patch)
tree9e0f456f30ba61cd1fc3a764832e9a885d06644a /build/appinfo/application.php
parent534432e0ba766f4180260cdcc64614cf7ed0f6e2 (diff)
build v3.3.1v3.3.1
Diffstat (limited to 'build/appinfo/application.php')
-rw-r--r--build/appinfo/application.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/build/appinfo/application.php b/build/appinfo/application.php
index a735c9d..9ffb63e 100644
--- a/build/appinfo/application.php
+++ b/build/appinfo/application.php
@@ -240,7 +240,7 @@ class Application extends App {
* This is automatically made lowercase.
*/
$container->registerService('OJSXC_UserId', function(IContainer $c) {
- return strtolower($c->query('UserId'));
+ return self::santizeUserId($c->query('UserId'));
});
/**
@@ -294,6 +294,14 @@ class Application extends App {
$c->query('OCP\IConfig'),
$c->getServer()->getDatabaseConnection()
);
+ }
+
+ static public function santizeUserId($userId) {
+ return str_replace([" ", "'", "@"], ["_ojsxc_esc_space_", "_ojsxc_squote_space_", "_ojsxc_esc_at_"],
+ strtolower(
+ $userId
+ )
+ );
}
}