3885893316
db: split password & user
2023-04-30 21:44:48 +02:00
44e74b5d0c
passwords: add version field, more constants for params
2023-04-30 21:38:30 +02:00
f5e107e3a0
comparePassword: eliminate unsafe slice
2023-04-30 21:20:41 +02:00
11975d7911
use constant-time hash comparison
2023-04-30 21:08:36 +02:00
0643176ed1
Run go fmt
2023-04-30 21:04:55 +02:00
8e949f837b
Use PHC hashes for password storage
2023-04-30 18:16:52 +02:00
788e75c4c1
Add users system, required for uploading new pastes
2023-04-30 12:06:09 +02:00
Daan Sprenkels
30ab6f9228
Fix gopls issues
2021-05-08 22:42:13 +02:00
Daan Sprenkels
f530a543f9
db: Test truncated keys are invalid; NFC
2020-12-17 15:15:04 +01:00
Daan Sprenkels
f527f2fb38
Automigrate when opening db
2020-12-17 15:14:45 +01:00
Daan Sprenkels
1ecb11c65f
db: Do not warn during paste key generation
2020-12-17 14:49:52 +01:00
Daan Sprenkels
0048004252
Use sql database instead of bolt
2020-10-25 17:33:51 +01:00
Daan Sprenkels
f36fa30eff
Rename current db to boltdb
2020-10-23 16:14:57 +02:00
Daan Sprenkels
104dbab335
db: Refactor switch; NFC
2020-07-27 18:49:26 +02:00
Daan Sprenkels
a8eba1b0df
db: Add a test for key validation; NFC
2020-07-27 18:48:24 +02:00
Daan Sprenkels
26be9b5104
Validate key format before retrieving from database
...
Fixes #67
2020-07-27 16:58:27 +02:00
Daan Sprenkels
6d3e8028cb
Use high-entropy URLs for file uploads
...
Fixes issue #59
2020-07-27 14:53:19 +02:00
Daan Sprenkels
77e89251e7
db: Change db file mode to 660
...
Fixes #58
2020-05-30 17:07:35 +02:00
Daan Sprenkels
2c889e0808
Prevent directory traversal in file upload
...
Fixes #53
2020-05-12 20:01:03 +02:00
Daan Sprenkels
e476797da0
db: Prevent infinite recursion when closing
2020-04-22 18:25:27 +02:00
Daan Sprenkels
63a588ba59
db: Add docstrings to FileUpload; NFC
2020-04-22 16:00:36 +02:00
Daan Sprenkels
ca859adab1
Redirect to /meta after upload/shorten
2019-12-16 10:51:21 +05:30
Daan Sprenkels
ba08aca622
db: Refactor paste decoding into new func
2019-12-10 12:24:58 +01:00
Daan Sprenkels
76cf92e22d
db: Add missing docs to public symbols
2019-12-10 12:08:27 +01:00
Daan Sprenkels
62e82d831e
db: Migrate FileUpload.ContentTypes to auto-detect
2019-12-10 11:59:02 +01:00
Daan Sprenkels
eec5e4def4
Detect file types instead of trusting clients
2019-12-10 11:16:18 +01:00
Daan Sprenkels
0cfad96b68
Refactor database login into a separate module
2019-12-06 18:03:56 +01:00
Daan Sprenkels
b7a4b1fee8
Move packages out of dirs
...
Fixes #2
2019-09-15 18:21:02 +02:00
Daan Sprenkels
544c093c35
Use a more standardized project layout
...
In #2 , mrngm made the point that we should move to a more
standardized project structure. This commit does exactly that.
The new project structure is based on the repository listed at
<https://github.com/golang-standards/project-layout >.
Fixes #2 .
2019-09-10 17:52:45 +02:00