aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/ajax/share.php17
-rw-r--r--lib/private/connector/sabre/auth.php6
-rw-r--r--lib/private/user.php2
-rw-r--r--settings/admin.php2
-rw-r--r--settings/templates/admin.php21
5 files changed, 23 insertions, 25 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 1a2faa75dac..6d0a6a4e3b9 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -236,23 +236,6 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
if (isset($_GET['search'])) {
$shareWithinGroupOnly = OC\Share\Share::shareWithGroupMembersOnly();
$shareWith = array();
-// if (OC_App::isEnabled('contacts')) {
-// // TODO Add function to contacts to only get the 'fullname' column to improve performance
-// $ids = OC_Contacts_Addressbook::activeIds();
-// foreach ($ids as $id) {
-// $vcards = OC_Contacts_VCard::all($id);
-// foreach ($vcards as $vcard) {
-// $contact = $vcard['fullname'];
-// if (stripos($contact, $_GET['search']) !== false
-// && (!isset($_GET['itemShares'])
-// || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT])
-// || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT])
-// || !in_array($contact, $_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]))) {
-// $shareWith[] = array('label' => $contact, 'value' => array('shareType' => 5, 'shareWith' => $vcard['id']));
-// }
-// }
-// }
-// }
$groups = OC_Group::getGroups($_GET['search']);
if ($shareWithinGroupOnly) {
$usergroups = OC_Group::getUserGroups(OC_User::getUser());
diff --git a/lib/private/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php
index f40706b73e3..533d250d68e 100644
--- a/lib/private/connector/sabre/auth.php
+++ b/lib/private/connector/sabre/auth.php
@@ -101,7 +101,6 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
public function authenticate(\Sabre\DAV\Server $server, $realm) {
$result = $this->auth($server, $realm);
-
return $result;
}
@@ -111,10 +110,13 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
* @return bool
*/
private function auth(\Sabre\DAV\Server $server, $realm) {
- if (OC_User::handleApacheAuth()) {
+ if (OC_User::handleApacheAuth() ||
+ (OC_User::isLoggedIn() && is_null(\OC::$server->getSession()->get(self::DAV_AUTHENTICATED)))
+ ) {
$user = OC_User::getUser();
OC_Util::setupFS($user);
$this->currentUser = $user;
+ \OC::$server->getSession()->close();
return true;
}
diff --git a/lib/private/user.php b/lib/private/user.php
index d66354b247d..d1fedffcaaf 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -320,7 +320,7 @@ class OC_User {
* Tries to login the user with HTTP Basic Authentication
*/
public static function tryBasicAuthLogin() {
- if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_USER'])) {
+ if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
\OC_User::login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
}
}
diff --git a/settings/admin.php b/settings/admin.php
index 01cab1fa1f4..bb20c665f56 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -81,6 +81,8 @@ $template->assign('onlyShareWithGroupMembers', \OC\Share\Share::shareWithGroupMe
$databaseOverload = (strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false);
$template->assign('databaseOverload', $databaseOverload);
+// warn if Windows is used
+$template->assign('WindowsWarning', OC_Util::runningOnWindows());
// add hardcoded forms from the template
$forms = OC_App::getForms('admin');
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 41b60b64428..65c6359e509 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -10,13 +10,10 @@
*/
style('settings', 'settings');
-script('settings', 'settings');
-script( "settings", "admin" );
-script( "settings", "log" );
-script( 'core', 'multiselect' );
+script('settings', [ 'settings', 'admin', 'log'] );
+script('core', ['multiselect', 'setupchecks']);
vendor_script('select2/select2');
vendor_style('select2/select2');
-script('core', 'setupchecks');
$levels = array('Debug', 'Info', 'Warning', 'Error', 'Fatal');
$levelLabels = array(
@@ -125,6 +122,20 @@ if ($_['databaseOverload']) {
<?php
}
+// Windows Warning
+if ($_['WindowsWarning']) {
+ ?>
+<div class="section">
+ <h2><?php p($l->t('Microsoft Windows Platform'));?></h2>
+
+ <p class="securitywarning">
+ <?php p($l->t('Your server is running on Microsoft Windows. We highly recommend Linux for optimal user experience.')); ?>
+ </p>
+
+</div>
+<?php
+}
+
// if module fileinfo available?
if (!$_['has_fileinfo']) {
?>