]> source.dussan.org Git - nextcloud-server.git/commitdiff
Sort parameters and cast to int
authorRobin Appelman <icewind@owncloud.com>
Tue, 15 Apr 2014 13:48:02 +0000 (15:48 +0200)
committerRobin Appelman <icewind@owncloud.com>
Tue, 15 Apr 2014 13:48:02 +0000 (15:48 +0200)
lib/private/route/cachingrouter.php

index 766c67c73a0aa19dd085cc9e473e7ce4831beb29..6412ceb0418265bc46a37d8eb650da8807de7596 100644 (file)
@@ -31,7 +31,8 @@ class CachingRouter extends Router {
         * @return string
         */
        public function generate($name, $parameters = array(), $absolute = false) {
-               $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . $absolute;
+               sort($parameters);
+               $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute);
                if ($this->cache->hasKey($key)) {
                        return $this->cache->get($key);
                } else {