MFA fix, added IP blacklist, update webmail client

This commit is contained in:
2026-08-14 13:04:55 +01:00
parent 6063f95504
commit 892f366a16
122 changed files with 13362 additions and 251 deletions
+36
View File
@@ -0,0 +1,36 @@
package webui
import (
"net/http"
"net/http/httptest"
"testing"
)
// TestVendoredAssetsServedUnderBothPrefixes confirms Bootstrap/Bootstrap
// Icons/Quill are served locally (no CDN dependency) under both the admin and
// webmail static routes — templates in each tree reference their own prefix.
func TestVendoredAssetsServedUnderBothPrefixes(t *testing.T) {
app := newTestApp(t)
mux := app.Mux()
paths := []string{
Prefix + "/static/vendor/bootstrap/css/bootstrap.min.css",
Prefix + "/static/vendor/bootstrap/js/bootstrap.bundle.min.js",
Prefix + "/static/vendor/bootstrap-icons/font/bootstrap-icons.css",
Prefix + "/static/vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff2",
MailboxPrefix + "/static/vendor/bootstrap/css/bootstrap.min.css",
MailboxPrefix + "/static/vendor/quill/quill.js",
MailboxPrefix + "/static/vendor/quill/quill.snow.css",
}
for _, p := range paths {
req := httptest.NewRequest(http.MethodGet, p, nil)
rec := httptest.NewRecorder()
mux.ServeHTTP(rec, req)
if rec.Code != http.StatusOK {
t.Errorf("%s: status=%d", p, rec.Code)
}
if rec.Body.Len() == 0 {
t.Errorf("%s: empty body", p)
}
}
}