Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit e4232e0

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: core/src/plugins/action.compression/PluginCompression.php
2 parents 0389ee0 + b920b73 commit e4232e0

File tree

116 files changed

+2526
-1442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+2526
-1442
lines changed

core/src/conf/RELEASE_NOTE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ Pydio ##VERSION_NUMBER## Release Note
22

33
TODO : This is a temporary package for testing upgrade from v6 to v7
44

5+
Third Beta for Pydio 7
6+
7+
----
8+
Pydio Core 6.5.2
9+
510
Second beta for Pydio 7
611

712
----

core/src/core/src/lib/pclzip.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
// define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
6767
// define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
6868
if (!defined('PCLZIP_TEMPORARY_DIR')) {
69-
define( 'PCLZIP_TEMPORARY_DIR', ApplicationState::getAjxpTmpDir() .DIRECTORY_SEPARATOR );
69+
define( 'PCLZIP_TEMPORARY_DIR', ApplicationState::getTemporaryFolder() .DIRECTORY_SEPARATOR );
7070
}
7171

7272
// ----- Optional threshold ratio for use of temporary files

core/src/core/src/pydio/Core/PluginFramework/PluginsService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ private function loadPluginsFromCache($cacheStorage) {
491491
if(!empty($this->detectedPlugins)){
492492
return true;
493493
}
494-
if(!empty($cacheStorage) && $this->_loadDetectedPluginsFromCache($cacheStorage)){
494+
if($this->_loadDetectedPluginsFromCache($cacheStorage)){
495495
return true;
496496
}
497497

core/src/core/src/pydio/Core/Services/ApplicationState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public static function getWorkspaceShortcutURL($repository)
230230
* @static
231231
* @return mixed|null|string
232232
*/
233-
public static function getAjxpTmpDir()
233+
public static function getTemporaryFolder()
234234
{
235235
$conf = ConfService::getGlobalConf("AJXP_TMP_DIR");
236236
if (!empty($conf)) {

core/src/core/src/pydio/Core/Utils/Http/BruteForceHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class BruteForceHelper
4141
*/
4242
public static function getBruteForceLoginArray()
4343
{
44-
$failedLog = ApplicationState::getAjxpTmpDir() . "/failedAJXP.log";
44+
$failedLog = ApplicationState::getTemporaryFolder() . "/failedAJXP.log";
4545
$loginAttempt = @file_get_contents($failedLog);
4646
$loginArray = unserialize($loginAttempt);
4747
$ret = array();
@@ -66,7 +66,7 @@ public static function setBruteForceLoginArray($loginArray, $validCurrent = fals
6666
if($validCurrent && isSet($loginArray[$_SERVER["REMOTE_ADDR"]])){
6767
unset($loginArray[$_SERVER["REMOTE_ADDR"]]);
6868
}
69-
$failedLog = ApplicationState::getAjxpTmpDir() . "/failedAJXP.log";
69+
$failedLog = ApplicationState::getTemporaryFolder() . "/failedAJXP.log";
7070
@file_put_contents($failedLog, serialize($loginArray));
7171
}
7272

core/src/core/src/pydio/Core/Utils/Http/UserAgent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ public static function osFromUserAgent($useragent = null)
189189
'PydioPro iOS Native Application' => 'Pydio-Native-iOS',
190190
'Pydio Android Native Application' => 'Apache-HttpClient',
191191
'PydioPro Android Native Application' => 'Pydio-Native-Android',
192-
'Pydio Sync Client' => 'python-requests'
192+
'Pydio Sync Client' => 'python-requests',
193+
'Pydio Booster' => "Go-http-client"
193194
);
194195

195196
if ($useragent == null) {

core/src/core/src/pydio/Core/Utils/Vars/OptionsHelper.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function filterFormElementsFromMeta(ContextInterface $ctx, $metada
7575
}
7676
$value = "";
7777
} else {
78-
$file = ApplicationState::getAjxpTmpDir() . "/" . $value;
78+
$file = ApplicationState::getTemporaryFolder() . "/" . $value;
7979
if (file_exists($file)) {
8080
$id = !empty($level["original_binary"]) ? $level["original_binary"] : null;
8181
$id = ConfService::getConfStorageImpl()->saveBinary($binariesContext, $file, $id);
@@ -137,7 +137,7 @@ public static function parseStandardFormParameters(ContextInterface $ctx, &$repD
137137
}
138138
$value = "";
139139
} else {
140-
$file = ApplicationState::getAjxpTmpDir() . "/" . $value;
140+
$file = ApplicationState::getTemporaryFolder() . "/" . $value;
141141
if (file_exists($file)) {
142142
$id = !empty($repDef[$key . "_original_binary"]) ? $repDef[$key . "_original_binary"] : null;
143143
$id = ConfService::getConfStorageImpl()->saveBinary($binariesContext, $file, $id);
@@ -236,6 +236,13 @@ public static function cleanDibiDriverParameters($params)
236236
$params["formatDate"] = "'Y-m-d'";
237237
break;
238238
}
239+
if(strpos($params['host'], ':') !== false){
240+
list($h, $portOrSocket) = explode(":", $params['host']);
241+
if(!is_numeric($portOrSocket) && file_exists($portOrSocket)){
242+
$params['host'] = $h;
243+
$params['socket'] = $portOrSocket;
244+
}
245+
}
239246
if (isSet($value)) {
240247
self::$_dibiParamClean[$value] = $params;
241248
}

core/src/core/src/pydio/Core/Utils/Vars/StringHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public static function regexpToLdap($regexp)
302302
public static function createGUID()
303303
{
304304
if (function_exists('com_create_guid')) {
305-
return com_create_guid();
305+
return trim(com_create_guid(), "{}");
306306
} else {
307307
mt_srand((double)microtime() * 10000);//optional for php 4.2.0 and up.
308308
$charid = strtoupper(md5(uniqid(rand(), true)));

core/src/core/src/pydio/Core/Utils/Vars/VarsFilter.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ class VarsFilter
5151
*/
5252
public static function filter($value, ContextInterface $ctx)
5353
{
54+
// If AJXP_PARENT_OPTION, resolve and return directly, do not filter the real value.
55+
if(is_string($value) && preg_match("/AJXP_PARENT_OPTION:([\w_-]*):/", $value, $matches)){
56+
$repoObject = $ctx->getRepository();
57+
$parentRepository = $repoObject->getParentRepository();
58+
if(empty($parentRepository)){
59+
throw new PydioException("Cannot resolve ".$matches[0]." without parent workspace");
60+
}
61+
$parentOwner = $ctx->getRepository()->getOwner();
62+
$parentContext = Context::contextWithObjects(null, $parentRepository);
63+
$parentContext->setUserId($parentOwner);
64+
$parentPath = rtrim($parentRepository->getContextOption($parentContext, $matches[1]), "/");
65+
$value = str_replace($matches[0], $parentPath, $value);
66+
return $value;
67+
}
68+
5469
if (is_string($value) && strpos($value, "AJXP_USER")!==false) {
5570
if (UsersService::usersEnabled()) {
5671
if(!$ctx->hasUser()){
@@ -85,18 +100,6 @@ public static function filter($value, ContextInterface $ctx)
85100
if (is_string($value) && strstr($value, "AJXP_WORKSPACE_SLUG") !== false) {
86101
$value = rtrim(str_replace("AJXP_WORKSPACE_SLUG", $ctx->getRepository()->getSlug(), $value), "/");
87102
}
88-
if(is_string($value) && preg_match("/AJXP_PARENT_OPTION:([\w_-]*):/", $value, $matches)){
89-
$repoObject = $ctx->getRepository();
90-
$parentRepository = $repoObject->getParentRepository();
91-
if(empty($parentRepository)){
92-
throw new PydioException("Cannot resolve ".$matches[0]." without parent workspace");
93-
}
94-
$parentOwner = $ctx->getRepository()->getOwner();
95-
$parentContext = Context::contextWithObjects(null, $parentRepository);
96-
$parentContext->setUserId($parentOwner);
97-
$parentPath = rtrim($parentRepository->getContextOption($parentContext, $matches[1]), "/");
98-
$value = str_replace($matches[0], $parentPath, $value);
99-
}
100103

101104
$tab = array(&$value, $ctx);
102105
Controller::applyIncludeHook("vars.filter", $tab);

core/src/nginx.conf.sample

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Debian 8 with default /etc/nginx/nginx.conf
2+
# File name: /etc/nginx/sites-available/pydio.conf
3+
server {
4+
listen 80 default_server;
5+
keepalive_requests 10;
6+
keepalive_timeout 60 60;
7+
8+
client_max_body_size 800M;
9+
client_body_buffer_size 128k;
10+
11+
# Document Root
12+
root /usr/share/pydio;
13+
14+
if (!-e $request_filename){
15+
rewrite ^(.*)$ /index.php break;
16+
}
17+
18+
# nginx configuration
19+
location ~ \.php$ {
20+
include snippets/fastcgi-php.conf;
21+
fastcgi_pass unix:/var/lib/php5-fpm/www.sock;
22+
}
23+
}
24+
types {
25+
application/font-woff2 woff2;
26+
}

0 commit comments

Comments
 (0)