diff options
Diffstat (limited to 'build/appinfo')
-rw-r--r-- | build/appinfo/application.php | 10 | ||||
-rw-r--r-- | build/appinfo/info.xml | 2 | ||||
-rw-r--r-- | build/appinfo/routes.php | 1 |
3 files changed, 11 insertions, 2 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 + ) + ); } } diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml index eb5d21d..0757008 100644 --- a/build/appinfo/info.xml +++ b/build/appinfo/info.xml @@ -5,7 +5,7 @@ <name>JavaScript XMPP Chat</name> <summary>Facebook-like chat</summary> <description>Facebook-like chat with end-to-end encrypted conversation, video calls, multi-user rooms, XMPP and internal server backend.</description> - <version>3.3.0</version> + <version>3.3.1</version> <licence>agpl</licence> <author mail="klaus@jsxc.org">Klaus Herberth</author> <author>Tobia De Koninck</author> diff --git a/build/appinfo/routes.php b/build/appinfo/routes.php index 0119906..9374b62 100644 --- a/build/appinfo/routes.php +++ b/build/appinfo/routes.php @@ -15,6 +15,7 @@ $application->registerRoutes($this, array( array('name' => 'settings#setUser', 'url' => '/settings/user', 'verb' => 'POST'), array('name' => 'settings#getIceServers', 'url' => '/settings/iceServers', 'verb' => 'GET'), array('name' => 'settings#getUsers', 'url' => '/settings/users', 'verb' => 'GET'), + array('name' => 'settings#getServerType', 'url' => '/settings/servertype', 'verb' => 'GET'), array('name' => 'externalApi#index', 'url' => '/ajax/externalApi.php', 'verb' => 'POST'), // array('name' => 'externalApi#check_password', 'url' => '/api/v2/checkPassword', 'verb' => 'POST'), |