Commit 66075a5
Fix share link download counter incrementing before file existence check (#146)
The download counter was incremented before verifying the shared file
still exists in the bucket. If the file was deleted, accessing the share
link would increment the counter and eventually exhaust the download
limit without any actual downloads. Move file retrieval before counter
increment so the count only increases on successful downloads.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0109d8c commit 66075a5
2 files changed
Lines changed: 15 additions & 10 deletions
File tree
- .changeset
- packages/worker/src/modules/buckets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
| |||
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
0 commit comments