optional password
This commit is contained in:
@@ -24,7 +24,7 @@ export async function handleDownload(
|
||||
}
|
||||
if (!secretMatches(meta.downloadKeyHash, rawKey)) return notFound();
|
||||
|
||||
if (!hasValidAuth(req, secret, rawKey)) {
|
||||
if (meta.passwordHash && !hasValidAuth(req, secret, rawKey)) {
|
||||
const url = new URL(req.url);
|
||||
return renderPasswordForm(rawKey, meta.originalName, url.searchParams.has("e"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user