summaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-xlib/private/util.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index c0e618cc863..8aa7a074d0d 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -51,6 +51,10 @@ class OC_Util {
self::$rootMounted = true;
}
+ if ($user != '' && !OCP\User::userExists($user)) {
+ return false;
+ }
+
//if we aren't logged in, there is no use to set up the filesystem
if( $user != "" ) {
\OC\Files\Filesystem::addStorageWrapper(function($mountPoint, $storage){
@@ -312,7 +316,7 @@ class OC_Util {
.'" target="_blank">giving the webserver write access to the root directory</a>.';
// Check if config folder is writable.
- if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
+ if(!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
$errors[] = array(
'error' => "Can't write into config directory",
'hint' => 'This can usually be fixed by '
@@ -580,7 +584,7 @@ class OC_Util {
// Check if we are a user
if( !OC_User::isLoggedIn()) {
header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php',
- array('redirectUrl' => OC_Request::requestUri())
+ array('redirect_url' => OC_Request::requestUri())
));
exit();
}
@@ -892,6 +896,11 @@ class OC_Util {
return false;
}
+ // in case the connection is via proxy return true to avoid connecting to owncloud.org
+ if(OC_Config::getValue('proxy', '') != '') {
+ return true;
+ }
+
// try to connect to owncloud.org to see if http connections to the internet are possible.
$connected = @fsockopen("www.owncloud.org", 80);
if ($connected) {