Skip to content

Commit 0b96865

Browse files
committed
chore: add TODOs
1 parent 349e9c0 commit 0b96865

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function decodeBasicAuth(encodedString: string): {
2323
// return null if auth passes or is not required,
2424
// return auth page if auth is required
2525
// throw WorkerError if auth failed
26+
// TODO: only allow hashed passwd
2627
export function verifyAuth(request: Request, env: Env): Response | null {
2728
// pass auth if 'BASIC_AUTH' is not present
2829
const basic_auth = env.BASIC_AUTH as { [username: string]: string }

src/storage/storage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ export type PasteMetadata = {
66

77
lastModifiedAtUnix: number
88
createdAtUnix: number
9+
// TODO: allow admin to upload permanent paste
910
willExpireAtUnix: number
1011

1112
accessCounter: number // a counter representing how frequent it is accessed, to administration usage
12-
sizeBytes?: number,
13+
sizeBytes?: number
14+
// TODO: add filename length check
1315
filename?: string
1416
}
1517

0 commit comments

Comments
 (0)