Skip to content

Fix user webmail SSO entrypoints#7162

Open
zylos01 wants to merge 14 commits intomailcow:stagingfrom
zylos01:fix-sogo-sso-user-webmail
Open

Fix user webmail SSO entrypoints#7162
zylos01 wants to merge 14 commits intomailcow:stagingfrom
zylos01:fix-sogo-sso-user-webmail

Conversation

@zylos01
Copy link
Copy Markdown

@zylos01 zylos01 commented Mar 23, 2026

Summary

This fixes two related issues in the user webmail SSO flow:

  1. The user-facing Webmail entrypoint currently links directly to /SOGo/so, which bypasses the intended SSO handoff path.
  2. sogo-auth.php can reject a mailbox user's own SSO login because it only accepts alias-based lookup in paths where the mailbox itself should also be valid.

Changes

  • Change the user webmail link target to /sogo-auth.php?login=%u
  • Change the user auth tab button to use /sogo-auth.php?login={{ mailcow_cc_username }}
  • In sogo-auth.php, allow the currently logged-in mailbox user through the same SSO path without requiring alias lookup
  • In the authenticated SOGo path, treat the current mailbox user as valid even if user_get_alias_details() is not the matching mechanism
  • Fix the header link substitution guard to check the processed app entry consistently before replacing %u

Why

In our reproduction, mailbox users could hit Unauthorized / broken webmail navigation because the user-facing entrypoint skipped the SSO helper, and the SSO helper itself was stricter than necessary for the mailbox owner case.

Validation

I was able to reproduce the broken user webmail flow and confirm that these changes restore the expected SSO navigation path.

I could not run local PHP linting in this environment because php is not installed here.

DerLinkman and others added 14 commits December 9, 2025 13:29
* Initial plan

* Fix duplicate login announcement display

Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
…rify-hash

Support for PBKDF2-SHA512 hash algorithm in verify_hash() (FreeIPA compatibility) (issue 6646)
🐄🛡️ January 2026 Update | Limited EAS/DAV Access and Restricted Alias Sending
@milkmaker
Copy link
Copy Markdown
Collaborator

Thanks for contributing!

I noticed that you didn't select staging as your base branch. Please change the base branch to staging.
See the attached picture on how to change the base branch to staging:

check_prs_if_on_staging.png

@zylos01 zylos01 changed the base branch from master to staging March 23, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants