Problem - The logout link is different

Steps to reproduce
1. Connect to the owncloud platform
2. Disconnect session from the logout link
3. The disconnect display the error : Deny access - CSRF check failed

Expected behaviour
When I click on the logout link, the session should be destroy and redirect to the authentification page

Actual behaviour

URL src : 'https://myndnsentry/index.php/'

When I click on my logout link,

Sometimes i have this error "Deny access - CSRF check failed" sometimes nothing and the authentification page is dsiplay.

In the both case the session is not destroy

After to have click on logout, If I write the url ('https://mydnsentry') i'am always connected

If I check the logout URL, this one should be ('https://mydnsentry/index.php/login?redirect_url=%252Findex.php%252Flogout%253Frequesttoken%253DImcKCi5GH1E4HGgoHSMKPgEXGRI%25252BVSMjMEQdeRNKNQU%25253D%25253AwSsDD1JbVFPpSqLO3sXfF4Noi2s%25252BIrQKCN5eyy3xbjs%25253D')

but in place I have

'https://10.XXX:XXX.XXX/index.php/login?redirect_url=%252Findex.php%252Flogout%253Frequesttoken%253DImcKCi5GH1E4HGgoHSMKPgEXGRI%25252BVSMjMEQdeRNKNQU%25253D%25253AwSsDD1JbVFPpSqLO3sXfF4Noi2s%25252BIrQKCN5eyy3xbjs%25253D'

If i replace the IP adress by the dns name then the session is destroyed

On my plateform, the logout link are different than other links on the plateform. All links have the dns name in their URL
sample : ('https://myndnsentry/index....')

But the logout link is the alone have the server local IP instead the dns name and i don't know why ?
sample :('https://10.xxx.xxx.xxx/index....')

Server configuration
Operating system: Ubuntu 16.04.1 LTS
Web server: Apache/2.4.18 (Ubuntu)
Database: mysql Ver 15.1 Distrib 10.0.28-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
PHP version: PHP 7.0.8-0ubuntu0.16.04.3
ownCloud version : 9.1.1
Updated from an older ownCloud or fresh install: Fresh install

Integrity status for oC9+

No errors have been found.

Configuration file (/var/www/owncloud/config/config.php)

<?php
$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'Confidential',
  'passwordsalt' => 'Confidential',
  'secret' => 'Confidential',
  'trusted_domains' =>
  array (
    0 => '10.XXX.XXX.XXX',
    1 => 'mydnsentry',
    2 => '62.XXX.XXX.XXX',
  ),
  'datadirectory' => '/ocdata',
  'overwrite.cli.url' => 'https://10.XXX.XXX.XXX/owncloud',
  'dbtype' => 'mysql',
  'version' => '9.1.1.3',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'Confidential',
  'dbpassword' => 'Confidential',
  'logtimezone' => 'Europe/Berlin',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'Confidential',
  'mail_domain' => 'Confidential',
  'mail_smtphost' => 'Confidential',
  'mail_smtpport' => 'Confidential',
);

Do you have any idea how could i change the logout URL?

You probably need to fiddle around with one of the override config options listed here:

https://doc.owncloud.org/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#overwrite-parameters

1 Like

Had the same issue today with combo owncloud docker image and nginx proxy server and solution is to editi config.php located in /var/lib/docker/volumes/owncloud-docker-server_files/_data/config and insert this value ‘overwritehost’ => ‘DNS_name_of_your_OwnCloudWeb’,

2 Likes