about summary refs log tree commit diff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Introduce `Storage::update_with`Vika2024-08-284-7/+54
| | | | | | | | | This function takes a closure that modifies the post. This could be useful in maintenance utilities that scan and fixup posts. For now this isn't used anywhere within Kittybox, but once all backends implement this correctly, this could replace `Storage::update_post` calls. For supporting backends, `Storage::update_post` is implemented in terms of `Storage::update_with`.
* Check validity of Micropub updatesVika2024-08-281-6/+50
| | | | | | | | In Kittybox, Micropub updates cannot modify UIDs, since UIDs are used as a primary key. Additional constraints may be added later, and perhaps I'll add a Storage method that would check backend-specific constraints.
* Make Micropub update logic self-containedVika2024-08-283-35/+42
| | | | | | This allows for a separation of concerns between database backends and Micropub, unless such backend have special requirements, like the file backend storing children of a feed in an array.
* Add Last-Modified header to post pages to help heuristic cachingVika2024-08-261-0/+22
|
* Use `Cache-Control: private` whenever the user is authorizedVika2024-08-261-18/+31
|
* Explicitly allow caching IndieAuth client metadataVika2024-08-261-2/+23
| | | | | This might save a round-trip for clients that know how to cache things. Such as Kittybox's HTTP fetcher.
* Set MSRV to 1.75, remove #[async_trait] declarations whenever possibleVika2024-08-2610-91/+78
| | | | | | | Axum still uses `async_trait`, let them do whatever they want. I will no longer be subject to the humiliation of trying to dig through lifetime errors and unreadable declarations. Also I don't fucking care about MSRV, I'm not a library. If you don't have modern Rust, get one.
* Indicate `u-uid` as `rel=canonical`Vika2024-08-261-1/+1
| | | | | | | | | | | This only displays on top-level entries, not ones in feeds. This should help search indexers know which URI is the canonical for a given link. I wonder why Google doesn't bother to parse MF2 markup. Do they think themselves monarchs of the Internet, able to show peasants their place? their search results are shitty anyway, I'd rather ask GPT-2. Yes, GPT TWO. Not even 3, 4 or 4o!
* Fix kittybox-check-webmention CLI toolVika2024-08-262-109/+8
| | | | Now it uses the same code as Kittybox itself.
* Add HTTP fetcher cacheVika2024-08-268-27/+57
| | | | | | | It just does its thing in the background, potentially speeding up things. Maybe I could also use the underlying in-memory cache implementation (Moka) to speed up my database. I heard crates.io got some good results from that.
* Appease most clippy warningsVika2024-08-2611-110/+27
| | | | | | The warnings only remain in places where I need them to remain, because I either need a reminder to implement something, or I need to refactor and simplify the code in question.
* FileStorage: appease clippy and use block_in_place for rewinding feedsVika2024-08-262-10/+15
| | | | | Using `tokio::task::block_in_place` downgrades the thread temporarily to avoid starvation.
* indieauth_metadata -> indieauth-metadataVika2024-08-241-1/+1
|
* micropub: Suppress adding to default feeds on visibility="unlisted"Vika2024-08-231-2/+30
| | | | | | If the post has no explicit channels, normally Kittybox attempts to post to a channel that makes sense for the post type. Adding `unlisted` to `visibility` now suppresses this behavior.
* Fix private posts with no defined audience not being shown in feedsVika2024-08-232-7/+10
|
* kittybox-util: 0.1.0 -> 0.2.0Vika2024-08-204-47/+46
| | | | Micropub types are now more coherent and gathered in one place.
* oopsVika2024-08-181-2/+1
|
* Better match html content-typeVika2024-08-181-1/+1
|
* kittybox-indieauth-helper: ignore TLS in debug and xdg-open the pageVika2024-08-181-1/+14
|
* Parse redirect URIs from MF2 metadataVika2024-08-181-1/+3
|
* feat: logins!!Vika2024-08-186-63/+493
| | | | | | | | yes you can finally sign in this is also supposed to show private posts intended for you! maybe i can also reveal my email to those who sign in! :3
* indieauth: Extension -> StateVika2024-08-181-10/+12
| | | | whoops
* indieauth: fix profile fetching if some properties are undeclaredVika2024-08-181-19/+23
|
* file auth backend: properly handle non-standard relative file:// urlsVika2024-08-181-4/+15
| | | | I use these in development.
* kittybox-indieauth: support OAuth2 Client MetadataVika2024-08-181-0/+1
| | | | Required for new revision of IndieAuth.
* kittybox-indieauth: separate ProfileUrl struct from GrantResponseVika2024-08-181-1/+1
| | | | Seems to be useful on its own.
* Don't verify TLS certificates when fetching things in devVika2024-08-181-0/+9
| | | | | | | When testing things, I don't test TLS verification, that's what reqwest unit tests should exist for. I test my things, and some of my things assume some form of TLS. I don't need it to be valid TLS, I need it to be TLS so I can use the `https://` links in dev.
* kittybox-indieauth-helper: small cleanupsVika2024-08-181-44/+44
| | | | | | | - Properly catch IndieAuth errors when parsing grant responses - Use the new `into_query_pairs()` method to serialize the authorization request into the authorization endpoint URL - Migrate to `axum::serve` for simplicity in serving the callback hook
* Upgrade dependencies and fix deprecated functionalityVika2024-08-029-47/+580
| | | | | | | I think I managed to not lose any functionality from my dependencies. sqlparser remains unupgraded, but that's mostly because it is only used in one example and it's not worth it to upgrade right now.
* Get cookie key from the environmentVika2024-08-011-1/+8
|
* Move Kittybox router composition into the libraryVika2024-08-012-53/+51
| | | | | | | | Since Kittybox router composition is entirely generic, we can move it into the library. I feel like I could also split database types into their own crates, too.
* Simplify jobset creation a littleVika2024-08-011-1/+2
|
* Migrate from axum::Extension to axum::extract::StateVika2024-08-019-372/+378
| | | | | This somehow allowed me to shrink the construction phase of Kittybox by a huge amount of code.
* treewide: create a common method for state initializationVika2024-08-0110-65/+53
| | | | | Now the database objects can be uniformly created from a URI. They can also optionally do sanity checks and one-time initialization.
* indieauth: remove unnecessary cloning of MF2 itemsVika2024-08-011-5/+11
| | | | | | | | | Per clippy suggestion. While they're behind a reference counter, and thus cloning is cheap, we can avoid increasing the reference counter by borrowing here. Also now the code is a bit prettier.
* Start working on login functionalityVika2024-07-093-1/+50
|
* database: use Url to represent user authoritiesVika2024-07-098-91/+93
| | | | This makes the interface more consistent and resistant to misuse.
* kittybox-indieauth: 0.1.0 -> 0.2.0Vika2024-07-091-2/+4
| | | | | | | | | Added fundamental AutoAuth types. This library can now be used to augment existing authorization and token endpoints with AutoAuth capabilities. See https://github.com/sknebel/AutoAuth/blob/master/AutoAuth.md for the latest spec draft.
* micropub: fix channels in ?q=configVika2024-07-091-1/+2
|
* WIP: admin (not wired up yet, and DEFINITELY NOT SECURE, DO NOT WIRE UP)Vika2024-07-081-0/+114
|
* webmention: HTTP 202 shouldn't include Location URLVika2024-07-081-3/+1
|
* Mask sensitive headersVika2024-06-141-1/+7
|
* Expose ?q=category queries in Micropub APIVika2024-03-041-1/+15
|
* Support ?q=category queriesVika2024-03-044-1/+37
| | | | Warning, untested. But hopefully works!
* lint: no extra whitespace on line endingsVika2024-01-299-24/+24
|
* Switch reply contexts from a Vec to HashMapVika2023-11-131-16/+15
| | | | This reduces the worst-case complexity to O(n) from O(n^2).
* Fix bug with likes/bookmarks on h-entries lacking URLs in markupVika2023-10-151-7/+21
|
* Moved the entire Kittybox tree into the rootVika2023-07-2931-0/+9450
|
* flake.nix: reorganizeVika2022-05-2422-6078/+0
| | | | | | | | | | | | - Kittybox's source code is moved to a subfolder - This improves build caching by Nix since it doesn't take changes to other files into account - Package and test definitions were spun into separate files - This makes my flake.nix much easier to navigate - This also makes it somewhat possible to use without flakes (but it is still not easy, so use flakes!) - Some attributes were moved in compliance with Nix 2.8's changes to flake schema
* templates: add a banner for Kittybox in the footerVika2022-05-231-0/+3
| | | | Now everyone will know where to get my software if they see it.