Seafile 8.0 logout

Hi all,
I have just upgraded the server from 7.1.10 to 8.0.0 Everything works well, only logout doesn’t work.
I run the seafile not on the domain root but server. mydomain. com/seafile
The login page is server. mydomain. com/ seafile/accounts/login/ it is ok,
but when I want to logout the link is server. mydomain. com/ accounts/logout/ the part of the path seafile is missing.
Thank you for your help.

I can confirm this behaviour with the logout page under 8.0.4 community edition. I am running my seafile under the non-root context /seafile too. I can also confirm that this error did NOT occur under 8.0.3.

Okay, I did some more research.

When manually pointing the browser url to from /accounts/logout/ to /seafile/accounts/logout/ the according page is being displayed (and the link there back to the login page also works).

I also did a comparison between the 8.0.3 and 8.0.4 community server packages regarding everything that contains “logout” and I think I found at least the change that causes this:
seahub/frontend/src/components/common/logout.js differs from 8.0.3

import React from 'react';
import { siteRoot, gettext } from '../../utils/constants';

export default function Logout() {
  return (
    <a className="logout-icon" href={`${siteRoot}accounts/logout/`} title={gettext('Log out')}>
      <i className="sf3-font sf3-font-logout" style={{fontSize: '24px'}}></i>
    </a>
  );
}

to 8.0.4

import React from 'react';
import { gettext, logoutUrl } from '../../utils/constants';

export default function Logout() {
  return (
    <a className="logout-icon" href={logoutUrl} title={gettext('Log out')}>
      <i className="sf3-font sf3-font-logout" style={{fontSize: '24px'}}></i>
    </a>
  );
}

I will try to change that file back to the 8.0.3 version and report back if that might do as a workaround until (hopefully) some bugfix is available with 8.0.5

So the new server 8.0.5CE still contains the same error.

My suggestion from above to try and change the logout.js back to the version from 8.0.3CE also had no effect during a test with 8.0.4CE, so I’m running out of ideas on that side.

The logout issue has also been filed here https://github.com/haiwen/seafile/issues/2443 almost a month ago but has not even been tagged or anything since then.

I know this logout issue is only a nuisance and not a major bug, but I am starting to wonder about the activity of the project (has also been questioned here https://github.com/haiwen/seafile/issues/2368 by someone else) and the general willingsness to fix bugs at all (also seing issues like https://github.com/haiwen/seafile/issues/2240 hanging around since at least 6.0.7 without being implemented, despite being already confirmed as a bug plus having the solution attached)

Confirming this problem as well. I ended up adding a “Redirect permanent /accounts/logout/ /seafile/accounts/logout/” to my apache conf file but it’s not exactly the cleanest way to fix this (and lucky that the /accounts/logout/ url is not actually used by something else)

So, after GREPing looking through a lot of js and py files in the current release, I found out this:

just as the login url, the logout url is now being loaded from the default settings.py file, and can be overriden in the conf/seahub_settings.py just like this:

SITE_ROOT = '/seafile/'
LOGIN_URL = '/seafile/accounts/login/'
LOGOUT_URL = '/seafile/accounts/logout/'

The other two entries (SITE_ROOT, LOGIN_URL) were already set, and after adding the LOGOUT_URL in the same manner, logging out worked correctly.

3 Likes