Commit graph

168 commits

Author SHA1 Message Date
Andrea Spacca
634c356285 allow range request for every content type, move lock only when metadata has to be updated 2022-07-10 13:51:24 +09:00
Andrea Spacca
35e794220b
Issue 485: fix IDN unicode/punycode handling (#486) 2022-05-15 16:48:13 +02:00
Stefan Benten
92324798d5
server: adding no-store header (#476)
In order to prevent viewing content, which max-download rate has been reached,
we need to ensure the data is not stored locally in a browser cache.
To achieve this, we set the Cache-Control Setting to "no-store" according to:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

fixes #470
2022-04-10 12:13:06 +02:00
Anirudh Haritas Murali
597554a59e
Add X-Url-Delete-* headers to POST handler (#435)
* Add X-Url-Delete-* headers to POST handler

* Remove token from header

* Fix writing of headers

* Handle error returned by Write

* Update handlers.go

Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
2022-03-02 13:26:00 +01:00
Stefan Benten
368431fb6b
server/storage.go: Update storj dependencies and set user-agent (#467) 2022-02-09 12:37:11 +01:00
Andrea Spacca
cff0a88bf3
Clamav prescan (#389) 2022-01-09 22:14:10 +01:00
Stefan Benten
492731e31f
server: propagate context to storage layer (#455)
This change propagates the context of the actual user request through.
Additionally it configures the Storj Backend to do in memory buffering instead of relying on temporary files in /tmp/ folders.
Fixes #448
2021-12-26 17:17:28 +01:00
Stefan Benten
f062af9fc5
server/handlers.go,storage.go: smaller fixes (#452)
This change moves a couple of defers in order to prevent them from not being executed since we have returned in error cases early.
It also fixes a couple of smaller linting issues, like error messages not starting with a capital letter and variable name collisions with imported packages.
2021-12-26 14:37:22 +01:00
Stefan Benten
2fbd19365c
.github/workflows: adding golangci-lint as new job (#453)
In order to follow golang's best practices, we should lint the code base properly beyond usual syntax mistakes.
2021-12-26 14:03:27 +01:00
Andrea Spacca
acd6fb084f
remove tor, remove bitcoing, fix contact us (#447) 2021-12-15 21:06:54 +01:00
Andrea Spacca
d2a0e77814
fix in force-https redirect (#441) 2021-12-07 19:41:42 +01:00
kugiyasan
c7164856d2
issue #420 added MaxDate.IsZero() check (#427)
* issue #420 return 400 response when Max-Days is too big

* issue #420 moved the Max-Days check before saving the metadata

* issue #420 added a logging message when Max-Days is invalid

* issue #420 added MaxDate.IsZero() check

Co-authored-by: kugiyasan <kugiyasan@users.noreply.github.com>
2021-10-30 10:04:43 +02:00
Andrea Spacca
fa74be02d2
Revert "issue #420 return 400 response when Max-Days is too big (#422)" (#426)
This reverts commit 2959fc2992.
2021-10-26 19:03:51 +02:00
kugiyasan
2959fc2992
issue #420 return 400 response when Max-Days is too big (#422)
* issue #420 return 400 response when Max-Days is too big

Co-authored-by: kugiyasan <kugiyasan@users.noreply.github.com>
2021-10-25 18:33:18 +02:00
Masaya Watanabe
92948fab23
fix missed errors (#417)
Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
2021-10-16 09:57:59 +02:00
mattn
e5455d9713
Fix path (#416)
* chan is leaked

* Remove path.Clean

Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
2021-10-16 09:51:09 +02:00
Andrea Spacca
9fe5f9a5c9
Golint (#404)
* golint
* remove gitter badge
2021-08-19 22:45:30 +02:00
Andrea Spacca
224f8dca42 s3 and storj storage: use nill when purgeDays is 0 2021-08-15 10:40:58 +02:00
Andrea Spacca
3990c3c5b7 gofmt 2021-07-23 11:21:05 +02:00
Andrea Spacca
3ea4ffd0e3 cr fixes and dynamic upload size in UI 2021-07-23 11:20:49 +02:00
Andrea Spacca
9baefbc4bf purge time in ui, fix range regeression from videojs 2021-07-19 21:03:41 +02:00
Andrea Spacca
e9148e0c20 remove unused const 2021-07-19 21:03:41 +02:00
Andrea Spacca
2ecedb93c6 rename file 2021-07-19 21:03:41 +02:00
Andrea Spacca
1ff9ccd01e copyright update 2021-07-19 21:03:41 +02:00
Andrea Spacca
a7a3e685fe gofmt 2021-07-19 21:03:41 +02:00
Andrea Spacca
94f94f27ff rename benchmark 2021-07-19 21:03:41 +02:00
Andrea Spacca
69d979ca48 issue 380 and simplier token generation 2021-07-19 21:03:41 +02:00
Andrea Spacca
d9198e78db always use logger 2021-07-19 21:03:41 +02:00
Andrea Spacca
9df18fdc69
fixes-20210521 (#373) 2021-05-21 15:49:48 +02:00
Andrea Spacca
fdfd453222 Added random-token-length, Encode() refactored 2021-05-20 08:26:07 +02:00
Andrea Spacca
0512452111 Added UrlRandomToken in template data 2021-05-09 09:21:54 +02:00
JustAnotherArchivist
6bd3e97186 Only increment download counter on files that have a download limit
For files that have no limit, there is no reason to track the download counter as its value will never be used anyway. This reduces costs on storage backends that have an operation fee (e.g. AWS S3) or a minimum retention (e.g. Wasabi S3).
2021-04-25 17:47:23 +00:00
JustAnotherArchivist
4daca97f89 Only rewrite metadata file when the download counter changed
Previously, the metadata file would be rewritten even if the download counter stayed the same (i.e. `increaseDownload = false`, previews and HEAD requests). Because the metadata doesn't change in that case, this would simply rewrite the exact same contents needlessly, which may also incur extra costs depending on the storage backend.
2021-04-19 18:37:47 +00:00
Andrea Spacca
69519d8fa4 Unwrap unnecessary bytes.NewReader 2021-03-19 08:25:40 +01:00
Andrea Spacca
b36711c1ea sanitize only on inline content-disposition 2021-03-02 16:50:53 +01:00
Andrea Spacca
27f84e719a Content-Type metadata to lower 2021-03-02 16:48:04 +01:00
Andrea Spacca
7ea65c5a24 go get -u, go build ldflags, docker tag, inline handler 2021-02-19 14:50:40 +01:00
Andrea Spacca
7cf688e86e fix bug in purge for local storage 2021-01-11 16:02:00 +01:00
Andrea Spacca
d554eb8e2d clone url 2021-01-06 13:33:46 +01:00
Andrea Spacca
322310d47f fix bug in gdrive purge 2021-01-06 12:41:40 +01:00
Andrea Spacca
d3381a2293 GOFMT 2021-01-05 17:24:16 +01:00
Andrea Spacca
6ac6c8fa99 PURGE FEATURE 2021-01-05 17:23:47 +01:00
Andrea Spacca
e53d599e09 ISSUE-332 2020-12-31 20:08:42 +01:00
Stefan Benten
614a7fd23d Merge remote-tracking branch 'dutchcoders/master' 2020-12-16 01:13:04 +01:00
Andrea Spacca
06d87eac8e Remove fuzzit 2020-12-15 20:13:12 +01:00
Stefan Benten
b372dc97b5 Merge remote-tracking branch 'dutchcoders/master'
# Conflicts:
#	README.md
#	go.sum
2020-12-15 16:42:12 +01:00
Andrea Spacca
9430e53689
Merge pull request #307 from cheeseandcereal/add_proxy_port
add proxy-port for port override when running behind a proxy
2020-05-17 19:28:21 +02:00
Adam Crowder
0a6b5817a9
use cryptographically secure rng seed
Signed-off-by: Adam Crowder <adam@adamcrowder.net>
2020-05-11 18:57:04 -07:00
Adam Crowder
f909ad3ce2
fix missing metadata security vuln 2020-05-08 16:23:32 -07:00
Adam Crowder
d830bf1afc
revert println
Signed-off-by: Adam Crowder <adam@adamcrowder.net>
2020-05-08 11:49:21 -07:00