Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ec916b11 | |||
| 7d94d963e9 | |||
| c051c180ab | |||
| 9cba7c1793 | |||
| 16514762bf | |||
| caa3210a59 | |||
| 8fe5d4b268 | |||
| 85fc84e3d3 | |||
| 6008bf975d | |||
| 4abec8b5b9 | |||
| d6cbf8be71 | |||
| d6b24c7bbc | |||
| c7bc669e00 | |||
| 09038697cd | |||
| eb2e8d99cc | |||
| 82493e9789 | |||
| 526a45be18 | |||
| 283f8e7e69 |
@@ -19,5 +19,4 @@ Turning the feature off removes shared files and folders on the server for all s
|
||||
<files>public.php</files>
|
||||
<webdav>publicwebdav.php</webdav>
|
||||
</public>
|
||||
<ocsid>166050</ocsid>
|
||||
</info>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.6.1
|
||||
0.6.2
|
||||
|
||||
@@ -18,5 +18,4 @@ To prevent a user from running out of disk space, the ownCloud Deleted files app
|
||||
<documentation>
|
||||
<user>user-trashbin</user>
|
||||
</documentation>
|
||||
<ocsid>166052</ocsid>
|
||||
</info>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.6.2
|
||||
0.6.3
|
||||
|
||||
@@ -18,5 +18,4 @@ In addition to the expiry of versions, ownCloud’s versions app makes certain n
|
||||
<user>user-versions</user>
|
||||
</documentation>
|
||||
<default_enable/>
|
||||
<ocsid>166053</ocsid>
|
||||
</info>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.5
|
||||
1.0.6
|
||||
|
||||
@@ -17,7 +17,6 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce
|
||||
<documentation>
|
||||
<admin>admin-ldap</admin>
|
||||
</documentation>
|
||||
<ocsid>166061</ocsid>
|
||||
<dependencies>
|
||||
<lib>ldap</lib>
|
||||
</dependencies>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.6.0
|
||||
0.6.1
|
||||
|
||||
@@ -12,5 +12,4 @@
|
||||
<types>
|
||||
<authentication/>
|
||||
</types>
|
||||
<ocsid>166062</ocsid>
|
||||
</info>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.0.1
|
||||
1.1.0.2
|
||||
|
||||
+1
-1
@@ -410,7 +410,6 @@
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#app-content-wrapper {
|
||||
@@ -556,3 +555,4 @@ em {
|
||||
z-index:500;
|
||||
padding:16px;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,6 @@ a.showCruds:hover,a.unshare:hover {
|
||||
max-height:103px;
|
||||
overflow-y:auto;
|
||||
overflow-x:hidden;
|
||||
z-index: 101 !important;
|
||||
}
|
||||
|
||||
.notCreatable {
|
||||
|
||||
+5
-2
@@ -1174,6 +1174,8 @@ class OC_App {
|
||||
$appData = self::getAppInfo($appId);
|
||||
if (array_key_exists('ocsid', $appData)) {
|
||||
OC_Appconfig::setValue($appId, 'ocsid', $appData['ocsid']);
|
||||
} elseif(OC_Appconfig::getValue($appId, 'ocsid', null) !== null) {
|
||||
OC_Appconfig::deleteKey($appId, 'ocsid');
|
||||
}
|
||||
foreach ($appData['remote'] as $name => $path) {
|
||||
OCP\CONFIG::setAppValue('core', 'remote_' . $name, $appId . '/' . $path);
|
||||
@@ -1228,17 +1230,18 @@ class OC_App {
|
||||
// manages line breaks itself
|
||||
|
||||
// first of all we split on empty lines
|
||||
$paragraphs = preg_split("!\n[[:space:]]*\n!m", $data['description']);
|
||||
$paragraphs = preg_split("!\n[[:space:]]*\n!mu", $data['description']);
|
||||
|
||||
$result = [];
|
||||
foreach ($paragraphs as $value) {
|
||||
// replace multiple whitespace (tabs, space, newlines) inside a paragraph
|
||||
// with a single space - also trims whitespace
|
||||
$result[] = trim(preg_replace('![[:space:]]+!m', ' ', $value));
|
||||
$result[] = trim(preg_replace('![[:space:]]+!mu', ' ', $value));
|
||||
}
|
||||
|
||||
// join the single paragraphs with a empty line in between
|
||||
$data['description'] = implode("\n\n", $result);
|
||||
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@@ -30,7 +30,12 @@
|
||||
*/
|
||||
namespace OC\Connector\Sabre;
|
||||
|
||||
class Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
|
||||
use Exception;
|
||||
use Sabre\DAV\Auth\Backend\AbstractBasic;
|
||||
use Sabre\DAV\Exception\NotAuthenticated;
|
||||
use Sabre\DAV\Exception\ServiceUnavailable;
|
||||
|
||||
class Auth extends AbstractBasic {
|
||||
const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
|
||||
|
||||
/**
|
||||
@@ -69,7 +74,7 @@ class Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
|
||||
} else {
|
||||
\OC_Util::setUpFS(); //login hooks may need early access to the filesystem
|
||||
if(\OC_User::login($username, $password)) {
|
||||
// make sure we use owncloud's internal username here
|
||||
// make sure we use ownCloud's internal username here
|
||||
// and not the HTTP auth supplied one, see issue #14048
|
||||
$ocUser = \OC_User::getUser();
|
||||
\OC_Util::setUpFS($ocUser);
|
||||
@@ -99,21 +104,30 @@ class Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
|
||||
}
|
||||
|
||||
/**
|
||||
* Override function here. We want to cache authentication cookies
|
||||
* in the syncing client to avoid HTTP-401 roundtrips.
|
||||
* If the sync client supplies the cookies, then OC_User::isLoggedIn()
|
||||
* will return true and we can see this WebDAV request as already authenticated,
|
||||
* even if there are no HTTP Basic Auth headers.
|
||||
* In other case, just fallback to the parent implementation.
|
||||
*
|
||||
* @param \Sabre\DAV\Server $server
|
||||
* @param $realm
|
||||
* @return bool
|
||||
*/
|
||||
* Override function here. We want to cache authentication cookies
|
||||
* in the syncing client to avoid HTTP-401 roundtrips.
|
||||
* If the sync client supplies the cookies, then OC_User::isLoggedIn()
|
||||
* will return true and we can see this WebDAV request as already authenticated,
|
||||
* even if there are no HTTP Basic Auth headers.
|
||||
* In other case, just fallback to the parent implementation.
|
||||
*
|
||||
* @param \Sabre\DAV\Server $server
|
||||
* @param string $realm
|
||||
* @return bool
|
||||
* @throws ServiceUnavailable
|
||||
*/
|
||||
public function authenticate(\Sabre\DAV\Server $server, $realm) {
|
||||
|
||||
$result = $this->auth($server, $realm);
|
||||
return $result;
|
||||
try {
|
||||
$result = $this->auth($server, $realm);
|
||||
return $result;
|
||||
} catch (NotAuthenticated $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
$class = get_class($e);
|
||||
$msg = $e->getMessage();
|
||||
throw new ServiceUnavailable("$class: $msg");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+57
-14
@@ -25,22 +25,72 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
|
||||
use OC\Connector\Sabre\ExceptionLoggerPlugin;
|
||||
use Sabre\DAV\Exception\ServiceUnavailable;
|
||||
use Sabre\DAV\Server;
|
||||
|
||||
/**
|
||||
* Class RemoteException
|
||||
* Dummy exception class to be use locally to identify certain conditions
|
||||
*/
|
||||
class RemoteException extends Exception {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Exception $e
|
||||
*/
|
||||
function handleException(Exception $e) {
|
||||
$request = \OC::$server->getRequest();
|
||||
// in case the request content type is text/xml - we assume it's a WebDAV request
|
||||
$isXmlContentType = strpos($request->getHeader('Content-Type'), 'text/xml');
|
||||
if ($isXmlContentType === 0) {
|
||||
// fire up a simple server to properly process the exception
|
||||
$server = new Server();
|
||||
$server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger()));
|
||||
$server->on('beforeMethod', function () use ($e) {
|
||||
if ($e instanceof RemoteException) {
|
||||
switch ($e->getCode()) {
|
||||
case OC_Response::STATUS_SERVICE_UNAVAILABLE:
|
||||
throw new ServiceUnavailable($e->getMessage());
|
||||
case OC_Response::STATUS_NOT_FOUND:
|
||||
throw new \Sabre\DAV\Exception\NotFound($e->getMessage());
|
||||
}
|
||||
}
|
||||
$class = get_class($e);
|
||||
$msg = $e->getMessage();
|
||||
throw new ServiceUnavailable("$class: $msg");
|
||||
});
|
||||
$server->exec();
|
||||
} else {
|
||||
$statusCode = OC_Response::STATUS_INTERNAL_SERVER_ERROR;
|
||||
if ($e instanceof \OC\ServiceUnavailableException ) {
|
||||
$statusCode = OC_Response::STATUS_SERVICE_UNAVAILABLE;
|
||||
}
|
||||
\OCP\Util::writeLog('remote', $e->getMessage(), \OCP\Util::FATAL);
|
||||
if ($e instanceof RemoteException) {
|
||||
OC_Response::setStatus($e->getCode());
|
||||
OC_Template::printErrorPage($e->getMessage());
|
||||
} else {
|
||||
OC_Response::setStatus($statusCode);
|
||||
OC_Template::printExceptionErrorPage($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
require_once 'lib/base.php';
|
||||
|
||||
if (\OCP\Util::needUpgrade()) {
|
||||
// since the behavior of apps or remotes are unpredictable during
|
||||
// an upgrade, return a 503 directly
|
||||
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
|
||||
OC_Template::printErrorPage('Service unavailable');
|
||||
exit;
|
||||
throw new RemoteException('Service unavailable', OC_Response::STATUS_SERVICE_UNAVAILABLE);
|
||||
}
|
||||
|
||||
$request = \OC::$server->getRequest();
|
||||
$pathInfo = $request->getPathInfo();
|
||||
if ($pathInfo === false || $pathInfo === '') {
|
||||
OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
|
||||
exit;
|
||||
throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
|
||||
}
|
||||
if (!$pos = strpos($pathInfo, '/', 1)) {
|
||||
$pos = strlen($pathInfo);
|
||||
@@ -50,8 +100,7 @@ try {
|
||||
$file = \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service);
|
||||
|
||||
if(is_null($file)) {
|
||||
OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
|
||||
exit;
|
||||
throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
// force language as given in the http request
|
||||
@@ -82,12 +131,6 @@ try {
|
||||
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
|
||||
require_once $file;
|
||||
|
||||
} catch (\OC\ServiceUnavailableException $ex) {
|
||||
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
|
||||
\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
|
||||
OC_Template::printExceptionErrorPage($ex);
|
||||
} catch (Exception $ex) {
|
||||
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
|
||||
\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
|
||||
OC_Template::printExceptionErrorPage($ex);
|
||||
handleException($ex);
|
||||
}
|
||||
|
||||
+3
-2
@@ -86,11 +86,12 @@ OC.Settings.Apps = OC.Settings.Apps || {
|
||||
}), {
|
||||
type:'GET',
|
||||
success: function (apps) {
|
||||
var appList = _.map(_.indexBy(apps.apps, 'id'), function(app) {
|
||||
var appListWithIndex = _.indexBy(apps.apps, 'id');
|
||||
OC.Settings.Apps.State.apps = appListWithIndex;
|
||||
var appList = _.map(appListWithIndex, function(app) {
|
||||
// default values for missing fields
|
||||
return _.extend({level: 0}, app);
|
||||
});
|
||||
OC.Settings.Apps.State.apps = appList;
|
||||
var source = $("#app-template").html();
|
||||
var template = Handlebars.compile(source);
|
||||
|
||||
|
||||
@@ -159,6 +159,32 @@ describe('OC.Settings.Apps tests', function() {
|
||||
var results = getResultsFromDom();
|
||||
expect(results.length).toEqual(5);
|
||||
expect(results).toEqual(['alpha', 'delta', 'zork', 'foo', 'nolevel']);
|
||||
expect(OC.Settings.Apps.State.apps).toEqual({
|
||||
'foo': {
|
||||
id: 'foo',
|
||||
name: 'Foo app',
|
||||
level: 0
|
||||
},
|
||||
'alpha': {
|
||||
id: 'alpha',
|
||||
name: 'Alpha app',
|
||||
level: 300
|
||||
},
|
||||
'nolevel': {
|
||||
id: 'nolevel',
|
||||
name: 'No level'
|
||||
},
|
||||
'zork': {
|
||||
id: 'zork',
|
||||
name: 'Some famous adventure game',
|
||||
level: 200
|
||||
},
|
||||
'delta': {
|
||||
id: 'delta',
|
||||
name: 'Mathematical symbol',
|
||||
level: 200
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+8
-2
@@ -502,6 +502,10 @@ class Test_App extends \Test\TestCase {
|
||||
['description' => " \t This is a multiline \n test with \n \t some new lines "],
|
||||
['description' => "This is a multiline test with some new lines"]
|
||||
],
|
||||
[
|
||||
['description' => hex2bin('5065726d657420646520732761757468656e7469666965722064616e732070697769676f20646972656374656d656e74206176656320736573206964656e74696669616e7473206f776e636c6f75642073616e73206c65732072657461706572206574206d657420c3a0206a6f757273206365757820636920656e20636173206465206368616e67656d656e74206465206d6f742064652070617373652e0d0a0d')],
|
||||
['description' => "Permet de s'authentifier dans piwigo directement avec ses identifiants owncloud sans les retaper et met à jours ceux ci en cas de changement de mot de passe."]
|
||||
],
|
||||
[
|
||||
['not-a-description' => " \t This is a multiline \n test with \n \t some new lines "],
|
||||
['not-a-description' => " \t This is a multiline \n test with \n \t some new lines "]
|
||||
@@ -513,9 +517,11 @@ class Test_App extends \Test\TestCase {
|
||||
* Test app info parser
|
||||
*
|
||||
* @dataProvider appDataProvider
|
||||
* @param array $data
|
||||
* @param array $expected
|
||||
*/
|
||||
public function testParseAppInfo($data, $expected) {
|
||||
$this->assertEquals($expected, \OC_App::parseAppInfo($data));
|
||||
public function testParseAppInfo(array $data, array $expected) {
|
||||
$this->assertSame($expected, \OC_App::parseAppInfo($data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -22,10 +22,10 @@
|
||||
// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
|
||||
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
||||
// when updating major/minor version number.
|
||||
$OC_Version=array(8, 1, 0, 7);
|
||||
$OC_Version=array(8, 1, 0, 8);
|
||||
|
||||
// The human readable string
|
||||
$OC_VersionString='8.1 RC1';
|
||||
$OC_VersionString='8.1.0';
|
||||
|
||||
// The ownCloud channel
|
||||
$OC_Channel='git';
|
||||
|
||||
Reference in New Issue
Block a user