From 80ad8a62ae085fe9d2867ec50911b6ca4a82ec80 Mon Sep 17 00:00:00 2001
From: whoswhip
Date: Sun, 22 Nov 2026 13:03:48 -0500
Subject: [PATCH] improve faq+privacy policy; rename pow and access tracker
intialize functions to just New since they are in their own package now
---
cmd/minibin/main.go | 4 ++--
internal/reports/pow.go | 2 +-
internal/uploads/access.go | 2 +-
readme.md | 1 +
web/templates/faq.html | 2 +-
web/templates/privacy.html | 7 +++++--
6 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/cmd/minibin/main.go b/cmd/minibin/main.go
index 30ae5d2..49faf17 100644
--- a/cmd/minibin/main.go
+++ b/cmd/minibin/main.go
@@ -40,12 +40,12 @@ func main() {
log.Fatal(err)
}
- tracker := uploads.NewAccessTracker()
+ tracker := uploads.New()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go tracker.Run(ctx, db)
- challengeStore := reports.NewChallengeStore(3 * time.Minute)
+ challengeStore := reports.New(3 * time.Minute)
log.Println("listening on", config.Addr)
router := server.NewRouter(db, config, pages, tracker, challengeStore)
diff --git a/internal/reports/pow.go b/internal/reports/pow.go
index 370a868..f34721f 100644
--- a/internal/reports/pow.go
+++ b/internal/reports/pow.go
@@ -27,7 +27,7 @@ type ChallengeStore struct {
const MaxChallenges = 10000
-func NewChallengeStore(ttl time.Duration) *ChallengeStore {
+func New(ttl time.Duration) *ChallengeStore {
if ttl <= 0 || ttl > 10*time.Minute {
panic("invalid challenge ttl")
}
diff --git a/internal/uploads/access.go b/internal/uploads/access.go
index e156578..692099e 100644
--- a/internal/uploads/access.go
+++ b/internal/uploads/access.go
@@ -15,7 +15,7 @@ type AccessTracker struct {
pending map[string]int64
}
-func NewAccessTracker() *AccessTracker {
+func New() *AccessTracker {
return &AccessTracker{
pending: make(map[string]int64),
}
diff --git a/readme.md b/readme.md
index 6439b2f..871986e 100644
--- a/readme.md
+++ b/readme.md
@@ -47,6 +47,7 @@ goals:
- [x] PoW challenges/captchas
- [ ] switch to argon2id instead of sha256
- javascript required
+- [ ] ASN blocking via geolite2
## misc goals
diff --git a/web/templates/faq.html b/web/templates/faq.html
index 670bb39..3370c3f 100644
--- a/web/templates/faq.html
+++ b/web/templates/faq.html
@@ -29,7 +29,7 @@
be wary of any metadata included in the files you are uploading,
- especially photos from a phone as they may contain GPS data.
+ especially photos from a phone as they may contain GPS metadata or any other private metadata.
{{if .NormalizeMIMETypes}}
why are my html/svg/pdf uploads not being rendered?
diff --git a/web/templates/privacy.html b/web/templates/privacy.html
index bb5ca9a..b24da5d 100644
--- a/web/templates/privacy.html
+++ b/web/templates/privacy.html
@@ -21,8 +21,11 @@
when you upload a file or paste, we store:
- the file or paste content
- - the original filename, type, and size
- - an upload id and a SHA256 hash of the content
+ - the original filename
+ - detected file type
+ - size of the content
+ - an upload id
+ - SHA256 hash of the content
- timestamps and the selected expiry
- a deletion token