Remove path from fsentry metadata, make vfs and webdav work again with fixes

This commit is contained in:
timurgordon
2025-03-12 02:16:40 +01:00
parent f1991d89b3
commit ff430c2e4d
48 changed files with 1424 additions and 1350 deletions

View File

@@ -2,7 +2,7 @@ module webdav
import encoding.base64
fn (app &App) auth_middleware(mut ctx Context) bool {
fn (server &Server) auth_middleware(mut ctx Context) bool {
// return true
auth_header := ctx.get_header(.authorization) or {
ctx.res.set_status(.unauthorized)
@@ -33,7 +33,7 @@ fn (app &App) auth_middleware(mut ctx Context) bool {
}
username := split_credentials[0]
hashed_pass := split_credentials[1]
if user := app.user_db[username] {
if user := server.user_db[username] {
if user != hashed_pass {
ctx.res.set_status(.unauthorized)
ctx.res.header.add(.www_authenticate, 'Basic realm="WebDAV Server"')