Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | guard main() call to allow importing __main__ | Tomasz Kramkowski | 2023-03-27 | 1 | -1/+2 |
| | |||||
* | Only handle PUT requests and respond correctly | Tomasz Kramkowski | 2023-03-27 | 2 | -12/+22 |
| | | | | | | | Previously PUT and POST requests were handled the same way, this isn't correct and POST should be used for the functionality where a random URL is generated. Additionally PUT should reply with 201 when inserting and 204 when updating. | ||||
* | Return a string content_length for HEAD | Tomasz Kramkowski | 2023-03-27 | 1 | -1/+1 |
| | |||||
* | if_none_match: quote ETag values | Tomasz Kramkowski | 2023-03-27 | 2 | -2/+5 |
| | |||||
* | Respond to auth failures with WWW-Authenticate | Tomasz Kramkowski | 2023-03-27 | 2 | -2/+13 |
| | |||||
* | tests/middleware/if_none_match: remove duplicate test | Tomasz Kramkowski | 2023-03-27 | 1 | -7/+0 |
| | |||||
* | pass exc_info explicitly | Tomasz Kramkowski | 2023-03-27 | 1 | -1/+1 |
| | |||||
* | Remove format executable | Tomasz Kramkowski | 2023-03-27 | 1 | -3/+0 |
| | |||||
* | add middleware tests | Tomasz Kramkowski | 2023-03-24 | 8 | -0/+483 |
| | |||||
* | add tests for paste.db | Tomasz Kramkowski | 2023-03-24 | 4 | -1/+141 |
| | |||||
* | paste.db.connect: add docstrings and doctests | Tomasz Kramkowski | 2023-03-24 | 1 | -0/+70 |
| | |||||
* | paste.db.connect: make migrations optional | Tomasz Kramkowski | 2023-03-24 | 1 | -2/+3 |
| | |||||
* | authenticate: rewrite | Tomasz Kramkowski | 2023-03-24 | 1 | -10/+15 |
| | | | | | | | | | | Fixes a few core issues: - No longer uses the Bearer type, instead using a custom APIKey type, this is because this has nothing to do with OAuth 2.0 bearer tokens. - Validation is moved into the middleware, with the check_auth function renamed to check_token with the sole job of checking the token, this makes testing easier - Validation handles more cases | ||||
* | catch_exceptions: set exc_info in response | Tomasz Kramkowski | 2023-03-24 | 1 | -2/+8 |
| | |||||
* | terminate all migrations with semicolon | Tomasz Kramkowski | 2023-03-24 | 1 | -1/+1 |
| | |||||
* | prevent accessing a future database version | Tomasz Kramkowski | 2023-03-24 | 1 | -0/+4 |
| | |||||
* | do not shorten connection to conn in the db API | Tomasz Kramkowski | 2023-03-24 | 1 | -7/+7 |
| | |||||
* | .ignore: ignore poetry.lock for tools like ag | Tomasz Kramkowski | 2023-03-24 | 1 | -0/+1 |
| | |||||
* | Use blake2b instead of sha256 as the data hash | Tomasz Kramkowski | 2023-03-24 | 1 | -2/+2 |
| | | | | With a digest size of 32 so it takes up the same amount of space | ||||
* | Add a DATA_HASH UDF (same as SHA256) | Tomasz Kramkowski | 2023-03-24 | 2 | -6/+15 |
| | | | | | | This means that the underlying hash function can be changed without needing to change the name. Although the change would still break the database backwards compatibility, but that's a separate problem. | ||||
* | isort imports | Tomasz Kramkowski | 2023-03-24 | 3 | -16/+14 |
| | |||||
* | add isort as a dev dependency | Tomasz Kramkowski | 2023-03-24 | 2 | -1/+20 |
| | |||||
* | paste.db: Refactor connect | Tomasz Kramkowski | 2023-03-24 | 1 | -10/+19 |
| | |||||
* | Implement If-None-Match handling | Tomasz Kramkowski | 2023-03-24 | 1 | -1/+55 |
| | |||||
* | Fix ETag header format | Tomasz Kramkowski | 2023-03-24 | 1 | -2/+2 |
| | |||||
* | fix the StartResponse type and make it a protocol | Tomasz Kramkowski | 2023-03-24 | 1 | -2/+13 |
| | |||||
* | remove unnecessary import (hashlib.sha256) | Tomasz Kramkowski | 2023-03-24 | 1 | -1/+0 |
| | |||||
* | First draft version | Tomasz Kramkowski | 2023-02-14 | 12 | -0/+739 |
| | |||||
* | init commit | Tomasz Kramkowski | 2023-02-14 | 0 | -0/+0 |