Permalink
Browse files

Pydio Booster device : ignore session_set_credentials setup

  • Loading branch information...
1 parent 317ccb6 commit 7d0a0bfac496463180e858504be9872adf95fc51 @cdujeu cdujeu committed Oct 3, 2016
@@ -189,7 +189,8 @@ public static function osFromUserAgent($useragent = null)
'PydioPro iOS Native Application' => 'Pydio-Native-iOS',
'Pydio Android Native Application' => 'Apache-HttpClient',
'PydioPro Android Native Application' => 'Pydio-Native-Android',
- 'Pydio Sync Client' => 'python-requests'
+ 'Pydio Sync Client' => 'python-requests',
+ 'Pydio Booster' => "Go-http-client"
);
if ($useragent == null) {
@@ -30,6 +30,7 @@
use Pydio\Auth\Frontend\Core\AbstractAuthFrontend;
use Pydio\Core\Services\ConfService;
use Pydio\Core\Services\LocaleService;
+use Pydio\Core\Utils\Http\UserAgent;
use Pydio\Core\Utils\Vars\InputFilter;
use Pydio\Core\Controller\HTMLWriter;
use Zend\Diactoros\Response\JsonResponse;
@@ -141,7 +142,7 @@ function authTokenActions(ServerRequestInterface $requestInterface, ResponseInte
case "keystore_generate_auth_token":
- if (ConfService::getContextConf($ctx, "SESSION_SET_CREDENTIALS", "auth")) {
+ if (ConfService::getContextConf($ctx, "SESSION_SET_CREDENTIALS", "auth") && UserAgent::osFromUserAgent($requestInterface->getServerParams()['HTTP_USER_AGENT']) !== 'Pydio Booster') {
$this->logDebug("Keystore Generate Tokens", "Session Credentials set: returning empty tokens to force basic authentication");
HTMLWriter::charsetHeader("text/plain");
echo "";

0 comments on commit 7d0a0bf

Please sign in to comment.