Remove path from fsentry metadata, make vfs and webdav work again with fixes
This commit is contained in:
@@ -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"')
|
||||
|
||||
Reference in New Issue
Block a user