summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php3
-rw-r--r--lib/private/files/view.php1
-rw-r--r--lib/private/image.php4
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index cba5d4a4276..99c2764d22c 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -699,6 +699,9 @@ class OC {
if (!OC_User::isLoggedIn()) {
// Test it the user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
+ if (!OC_Config::getValue('maintenance', false) && !self::checkUpgrade(false)) {
+ OC_App::loadApps(array('authentication'));
+ }
OC::tryBasicAuthLogin();
}
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 2a28e6fce88..6749fcd55d2 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -1182,6 +1182,7 @@ class View {
* @return string|null
*/
public function getPath($id) {
+ $id = (int) $id;
$manager = Filesystem::getMountManager();
$mounts = $manager->findIn($this->fakeRoot);
$mounts[] = $manager->find($this->fakeRoot);
diff --git a/lib/private/image.php b/lib/private/image.php
index 0dff8c5a9da..7ddc8dca143 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -603,6 +603,7 @@ class OC_Image {
$meta = unpack('vtype/Vfilesize/Vreserved/Voffset', fread($fh, 14));
// check for bitmap
if ($meta['type'] != 19778) {
+ fclose($fh);
trigger_error('imagecreatefrombmp: ' . $fileName . ' is not a bitmap!', E_USER_WARNING);
return false;
}
@@ -626,6 +627,7 @@ class OC_Image {
if ($meta['imagesize'] < 1) {
$meta['imagesize'] = @filesize($fileName) - $meta['offset'];
if ($meta['imagesize'] < 1) {
+ fclose($fh);
trigger_error('imagecreatefrombmp: Can not obtain filesize of ' . $fileName . '!', E_USER_WARNING);
return false;
}
@@ -666,6 +668,7 @@ class OC_Image {
break;
case 16:
if (!($part = substr($data, $p, 2))) {
+ fclose($fh);
trigger_error($error, E_USER_WARNING);
return $im;
}
@@ -712,6 +715,7 @@ class OC_Image {
$color[1] = $palette[ $color[1] + 1 ];
break;
default:
+ fclose($fh);
trigger_error('imagecreatefrombmp: '
. $fileName . ' has ' . $meta['bits'] . ' bits and this is not supported!',
E_USER_WARNING);