fix(PROJ-62): Cross-Tenant IDOR bei POP3-Konto-Löschung/-Import behoben (Sicherheitsbug)

handleDeletePop3 und handleStartPop3Import prüften nur Owner/Rollen-Level,
nicht den Tenant-Scope (anders als das korrekte IMAP-Pendant). Ein
domain_admin konnte dadurch POP3-Konten eines fremden Tenants löschen
oder deren Import anstoßen. Fix: tenantAccessAllowed(sess, acc.TenantID)
ergänzt, analog zum IMAP-Handler. Gefunden bei gezielter Nachsuche nach
Geschwister-Bugs zu PROJ-61.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sysops
2026-06-25 01:52:01 +02:00
co-authored by Claude Sonnet 4.6
parent 363874767b
commit 7c028601cf
3 changed files with 49 additions and 1 deletions
+8
View File
@@ -106,6 +106,10 @@ func (s *Server) handleDeletePop3(w http.ResponseWriter, r *http.Request) {
writeError(w, http.StatusForbidden, "access denied")
return
}
if !tenantAccessAllowed(sess, acc.TenantID) {
writeError(w, http.StatusForbidden, "access denied")
return
}
if err := s.pop3Store.Delete(r.Context(), id); err != nil {
writeError(w, http.StatusInternalServerError, "failed to delete account")
@@ -198,6 +202,10 @@ func (s *Server) handleStartPop3Import(w http.ResponseWriter, r *http.Request) {
writeError(w, http.StatusForbidden, "access denied")
return
}
if !tenantAccessAllowed(sess, acc.TenantID) {
writeError(w, http.StatusForbidden, "access denied")
return
}
if acc.Status == "running" {
writeError(w, http.StatusConflict, "import already running")