summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-21 09:45:05 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-21 09:45:05 +0100
commit16782484b9d75bac38cacce25e407d917d442af4 (patch)
tree144652a5f003ebc14d6f2f4f9f2d2a89ee4c3515 /lib
parentef4dc22a6a8ebc9d9859467ef8a812143f42c9f3 (diff)
parentbf017f5c11177174bacfc5bb2570b34a404ecda7 (diff)
downloadnextcloud-server-16782484b9d75bac38cacce25e407d917d442af4.tar.gz
nextcloud-server-16782484b9d75bac38cacce25e407d917d442af4.zip
Merge pull request #23349 from owncloud/hardenings
Hardenings
Diffstat (limited to 'lib')
-rw-r--r--lib/private/filechunking.php29
-rw-r--r--lib/private/route/router.php4
2 files changed, 4 insertions, 29 deletions
diff --git a/lib/private/filechunking.php b/lib/private/filechunking.php
index 32cbb7559f0..d6ff160870d 100644
--- a/lib/private/filechunking.php
+++ b/lib/private/filechunking.php
@@ -146,35 +146,6 @@ class OC_FileChunking {
$cache->remove($prefix.$index);
}
- public function signature_split($orgfile, $input) {
- $info = unpack('n', fread($input, 2));
- $blocksize = $info[1];
- $this->info['transferid'] = mt_rand();
- $count = 0;
- $needed = array();
- $cache = $this->getCache();
- $prefix = $this->getPrefix();
- while (!feof($orgfile)) {
- $new_md5 = fread($input, 16);
- if (feof($input)) {
- break;
- }
- $data = fread($orgfile, $blocksize);
- $org_md5 = md5($data, true);
- if ($org_md5 == $new_md5) {
- $cache->set($prefix.$count, $data);
- } else {
- $needed[] = $count;
- }
- $count++;
- }
- return array(
- 'transferid' => $this->info['transferid'],
- 'needed' => $needed,
- 'count' => $count,
- );
- }
-
/**
* Assembles the chunks into the file specified by the path.
* Also triggers the relevant hooks and proxies.
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 13f7a7a1cfb..03bee3d2037 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -110,6 +110,10 @@ class Router implements IRouter {
* @param null|string $app
*/
public function loadRoutes($app = null) {
+ if(is_string($app)) {
+ $app = \OC_App::cleanAppId($app);
+ }
+
$requestedApp = $app;
if ($this->loaded) {
return;