Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Exception;
use OC;
use OCA\GlobalSiteSelector\ConfigLexicon;
use OCA\GlobalSiteSelector\GlobalSiteSelector;
use OCA\GlobalSiteSelector\Listeners\AddContentSecurityPolicyListener;
use OCA\GlobalSiteSelector\Listeners\DeletingUser;
Expand Down Expand Up @@ -83,6 +84,7 @@ public function register(IRegistrationContext $context): void {
$context->registerEventListener(UserUpdatedEvent::class, UserChanged::class);

$context->registerSetupCheck(LongJwtKeySetupCheck::class);
$context->registerConfigLexicon(ConfigLexicon::class);

// registerGlobalScaleService() and IGlobalScaleService only exist since Nextcloud
// 34.0.3, but this app still supports 32 and 33, see lib/Service/GlobalScaleService.php
Expand Down Expand Up @@ -203,7 +205,13 @@ private function redirectToSlave(IRequest $request, Master $master, IUserSession

// We should ignore oauth2 token endpoint (oauth can send the credentials as basic auth which will fail with apache auth)
$uri = $request->getPathInfo();
if (str_starts_with($uri, '/apps/oauth/api/v1/token') || str_starts_with($uri, '/apps/oauth2/authorize') || str_starts_with($uri, '/login/flow')) {
if (str_starts_with($uri, '/apps/oauth/api/v1/token')
|| str_starts_with($uri, '/apps/oauth2/authorize')
|| str_starts_with($uri, '/apps/globalsiteselector/autologout')
|| str_starts_with($uri, '/apps/user_saml/saml/sls')
|| str_starts_with($uri, '/apps/user_oidc/sls')
|| str_starts_with($uri, '/login/flow')
) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ConfigLexicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getStrictness(): Strictness {
public function getAppConfigs(): array {
return [
new Entry(key: self::GS_TOKENS, type: ValueType::ARRAY, defaultRaw: [], definition: 'list of token+host to navigate through GlobalScale', lazy: true),
new Entry(key: self::LOCAL_TOKEN, type: ValueType::STRING, defaultRaw: '', definition: 'local token to id instance within GlobalScale', lazy: true),
new Entry(key: self::LOCAL_TOKEN, type: ValueType::STRING, defaultRaw: '', definition: 'local token to id instance within GlobalScale'),
new Entry(key: self::REDIRECT_WEBDAV, type: ValueType::BOOL, defaultRaw: false, definition: 'redirect WebDAV request on Master to Slaves', lazy: false),
];
}
Expand Down
Loading