Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to admin UI in roundcube broken for WEB_WEBMAIL path with more than two subdirectories #3164

Open
acran opened this issue Feb 12, 2024 · 4 comments
Labels
type/bug Bug. Not working as intended

Comments

@acran
Copy link

acran commented Feb 12, 2024

Environment & Version

  • Version: master

Description

When WEB_WEBMAIL is set to a path with more than two subdirectories the link back to the mailu admin UI in roundcube is broken.
This is due to the link not point to "$WEB_ADMIN" but to "../..$WEB_ADMIN", see

$config['support_url'] = '../..{{ WEB_ADMIN }}';

With less than two subdirectories this does not matter since the superfluous ../ are simply ignored.

Replication Steps

  1. Set WEB_WEBMAIL=/webmail/sub/directory
  2. Set WEB_ADMIN=/admin
  3. Klick on mailu link in roundcube taskbar

Observed behaviour

The browser navigates to /webmail/admin.

Expected behaviour

The browser should navigate to /admin.

Further background

The obvious solution would be to simply change

$config['support_url'] = '../..{{ WEB_ADMIN }}';

to

 $config['support_url'] = '{{ WEB_ADMIN }}'; 

Unfortunately this doesn't work because the URL would the be "corrected" by roundcube to be relative to the skin directory

Copy link

stale bot commented Mar 13, 2024

Issues not for bugs, enhancement requests or discussion go stale after 21 days of inactivity. This issue will be automatically closed after 14 days.
For all metrics refer to the stale.yml file.
Github issues are not meant for user support. For user-support questions, reach out on the matrix support channel.

Mark the issue as fresh by simply adding a comment to the issue.
If this issue is safe to close, please do so now.

@stale stale bot added the status/response_needed Waiting for a response from the author label Mar 13, 2024
@acran
Copy link
Author

acran commented Mar 13, 2024

The issue is still valid and reproducible.

@nextgens
Copy link
Contributor

Just override it with the (absolute) path you want it to point to.

I think that we are going to remove all the WEB_ variables and hard-code the paths (force a dedicated FQDN for Mailu)

@stale stale bot removed the status/response_needed Waiting for a response from the author label Mar 13, 2024
@acran
Copy link
Author

acran commented Mar 13, 2024

Just override it with the (absolute) path you want it to point to.

Where should one override it? With the mailu configuration, esp. WEB_ADMIN this is not possible.
So do you mean overwriting $config['support_url'] in die roundcube config directly? Yes, that could be a workaround, but requires to manually patch around in the provided containers, so I'd still consider this a bug - although actually a bit more on the roundcube side since it does not allow to correctly provide an absolute URL path but only relative to the skin directory...

(note that I'm not actually affected by this issue. I just stumbled over it while testing and I think this is a defective behavior - but whether it is relevant enough to be fixed, I don't really mind)

@nextgens nextgens added the type/bug Bug. Not working as intended label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug. Not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants