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

Commit 7d0a0bf

Browse files
committed
Pydio Booster device : ignore session_set_credentials setup
1 parent 317ccb6 commit 7d0a0bf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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/plugins/authfront.keystore/KeystoreAuthFrontend.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Pydio\Auth\Frontend\Core\AbstractAuthFrontend;
3131
use Pydio\Core\Services\ConfService;
3232
use Pydio\Core\Services\LocaleService;
33+
use Pydio\Core\Utils\Http\UserAgent;
3334
use Pydio\Core\Utils\Vars\InputFilter;
3435
use Pydio\Core\Controller\HTMLWriter;
3536
use Zend\Diactoros\Response\JsonResponse;
@@ -141,7 +142,7 @@ function authTokenActions(ServerRequestInterface $requestInterface, ResponseInte
141142

142143
case "keystore_generate_auth_token":
143144

144-
if (ConfService::getContextConf($ctx, "SESSION_SET_CREDENTIALS", "auth")) {
145+
if (ConfService::getContextConf($ctx, "SESSION_SET_CREDENTIALS", "auth") && UserAgent::osFromUserAgent($requestInterface->getServerParams()['HTTP_USER_AGENT']) !== 'Pydio Booster') {
145146
$this->logDebug("Keystore Generate Tokens", "Session Credentials set: returning empty tokens to force basic authentication");
146147
HTMLWriter::charsetHeader("text/plain");
147148
echo "";

0 commit comments

Comments
 (0)