Nextcloud (SAML) Logout issues after Update to 25.0.2

Nextcloud version (eg, 20.0.5): 25.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache2.4
PHP version (eg, 7.4): PHP8.0-FPM

The issue you are facing:

After the update last night from version 24.0.6 to version 25.0.2 we noticed that the (saml) logout via the logout button does not work properly anymore.

If you click on the logout button, nothing happens except for a redirect to the current directory (as if you press F5). After the 5th or 6th attempt, the logout usually works and redirects to the SAML logout page. Now the question, how can I debug the whole thing? I can’t think of any 3rd party plugin that could cause this phenomenon. Furthermore, I have already tried all sorts of repair commands alá

sudo -u www-data php /var/www/nextcloud/occ db:convert-filecache-bigint
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-columns
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-primary-keys
sudo -u www-data php /var/www/nextcloud/occ app:update --all

Unfortunately the logout still only works sporadically. Neither in the PHP, Apache2 and MySQL nor in the Nextcloud logs I can find any clues as to what is going wrong.

I would be very grateful for your help.

Is this the first time you’ve seen this error? (Y/N):
y

Steps to replicate it:

  1. Login
  2. Logout
  3. Repeat 5-6x times untill logout works

The output of your Nextcloud log in Admin > Logging:

Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:43:44+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:43:44+0100
Warnung	core	Renewing session token failed		2022-12-13T12:42:32+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:42:03+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:42:03+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:26+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:26+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:26+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:26+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:26+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:26+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:17+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:17+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:17+0100
Warnung	no app in context	Host CENSORED was not connected to because it violates local access rules		2022-12-13T12:41:16+0100

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'CENSORED',
  'passwordsalt' => 'CENSORED',
  'secret' => 'CENSORED',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'CENSORED',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.2.3',
  'overwrite.cli.url' => 'CENSORED',
  'dbname' => 'CENSORED',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'CENSORED',
  'installed' => true,
  'activity_expire_days' => 14,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'default_phone_region' => 'DE',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'trusted_proxies' =>
  array (
    0 => '127.0.0.1',
  CENSORED
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'htaccess.RewriteBase' => '/',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'loglevel' => 1,
  'logtimezone' => 'Europe/Berlin',
  'log_rotate_size' => 104857600,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'quota_include_external_storage' => false,
  'share_folder' => '/Freigaben',
  'skeletondirectory' => '',
  'theme' => '',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'mail_from_address' => 'nextcloud-no-reply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'CENSORED',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtphost' => 'CENSORED',
  'mail_smtpport' => '587'
);

The output of your Apache/nginx/system log in /var/log/____:

[Tue Dec 13 11:30:58.507102 2022] [access_compat:error] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Tue Dec 13 11:31:50.237676 2022] [access_compat:error] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Tue Dec 13 11:43:24.228282 2022] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocda

Thanks in advance!!

We have the same issue, except our instance doesn’t log you out ever. It appears in the SAML trace, that it forwards the request to the idp for logout, but it appears that it just brings you back the main dashboard without touching the session from the sp side.

Hi, did you already try v5.1.1 of the SAML app that was released yesterday?

I have updated to v5.1.1, and it appears to have fixed the issue. Thanks!

We updated the app to v5.1.1 but the issue still exists. Any other ideas? @szaimen :confused:

No, sorry.

No problem, Thank you anyways! If anyone still has an idea - please let me know.