Baptiste Gelez
9a13d804c5
impl FromRequest for ApiToken
...
and use it for the posts API
2018-10-30 18:13:49 +01:00
Baptiste Gelez
663ec52fea
Disable CSRF for the whole API
2018-10-30 18:13:49 +01:00
Baptiste Gelez
2394ff424b
Add an ApiToken model, and an endpoint to get one
2018-10-30 18:13:49 +01:00
Baptiste Gelez
f2190adfc2
Add an API endpoint to register apps
2018-10-30 18:13:49 +01:00
Trinity Pointard
76ca76f068
Update tags and hashtags on remote post edition
2018-10-29 20:54:27 +01:00
Trinity Pointard
c4fc656809
Update mentions on remote post edition
2018-10-29 20:54:27 +01:00
Trinity Pointard
2523f3b523
Prevent duplication of mention on post update
...
and delete mentions and notifications of user no longer mentioned
2018-10-29 20:54:27 +01:00
Trinity Pointard
1689813df4
Deduplicate tags and mentions
...
Use set to work on tags and mentions, allowing deduplication of them,
and clearer code
May also help with distinguishing tags and hashtags latter
2018-10-29 20:54:27 +01:00
Trinity Pointard
0bb2e6293a
Send Create activity when undrafting post
...
Send a Create activity when a post get undrafted, instead of sending an
Update activity for a non federated post
Fix #221
2018-10-28 11:42:01 +01:00
Trinity Pointard
cbbd0ca920
Group post by 12 instead of 10
...
Fix #251
2018-10-28 11:26:24 +01:00
Baptiste Gelez
fcf911fac9
ActivityPub: don't delete anything if the actor is not authorized
2018-10-22 16:29:25 +01:00
Baptiste Gelez
fc5acac861
Merge pull request #283 from Plume-org/hashtags
...
Support hashtags
2018-10-21 13:53:15 +01:00
Trinity Pointard
95ea248518
Add support for hashtag on user interface
...
Add migration to fix typo
Add support for linking hashtags with posts
Rework tag search page so it says a nicer message than page not found
when no post use that tag
Add new string to translation
2018-10-20 19:27:49 +02:00
Trinity Pointard
4fa3a0f6ee
Add support for hashtags in md parser
2018-10-20 16:38:16 +02:00
Trinity Pointard
eca458b0e5
Add support for blog deletion
...
fix #181
2018-10-20 15:03:59 +02:00
Trinity Pointard
a6e73f4667
Allow tag deletion
...
Fix #232
2018-10-20 14:05:41 +02:00
Trinity Pointard
fd92383f87
Normalize panic message and return 400 or 404 when suitable
2018-10-20 11:04:20 +02:00
Bat
9d70eeae61
Don't register the media serving route (they are now served with other static files)
...
And remove some unused imports
2018-10-12 20:48:11 +01:00
Bat
14969d489c
Save medias in static/media
...
Fixes #272
2018-10-12 20:32:34 +01:00
Trinity Pointard
f9498828c4
Modify post slug only when it's still drafted
...
Fix #207
2018-10-11 14:23:23 +02:00
Baptiste Gelez
8fdb55a501
Merge pull request #256 from Plume-org/verify-signature
...
Verify activity's signature
2018-10-10 21:31:11 +01:00
Trinity Pointard
ba4695f490
Add support for signature verification on pseudo header
...
Add support for pseudo-header '(request-target)'
Add some logging for denied request
2018-10-10 21:10:43 +02:00
Bat
1b9c3f69bf
Add icons to Web Manifest
2018-10-09 19:38:01 +01:00
Bat
3b7842d040
Rocket should manage DbConn, not Option<DbConn>
...
Otherwise it fails when using DbConn as a request guard
2018-10-08 20:02:17 +01:00
Baptiste Gelez
0469b8dae2
Merge pull request #266 from Plume-org/cc-by-sa
...
Change default license to CC-BY-SA
2018-10-07 21:28:43 +01:00
Baptiste Gelez
3a13d80dc6
Merge pull request #267 from Plume-org/db-url
...
Replace DB_URL with DATABASE_URL
2018-10-07 21:28:28 +01:00
Bat
9cc795d8be
Replace DB_URL with DATABASE_URL
...
This way it is shared with diesel, which simplifies a lot the setup
Also fixes a few issues in the documentation, that are not directly related
2018-10-07 11:00:50 +01:00
Bat
915b9bb0e5
Use env!("CARGO_PKG_VERSION") instead of hardcoding version when possible
...
See https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates
2018-10-06 18:55:30 +01:00
Bat
387efbf3e9
Change default license to CC-BY-SA
...
Fixes #258
2018-10-06 18:19:45 +01:00
Baptiste Gelez
00fe11fcbb
Merge pull request #261 from Plume-org/setup-tools
...
CLI tools
2018-10-06 14:28:13 +01:00
Bat
478e9dcac9
Show your own posts in your feed
...
Fixes #213
2018-10-06 13:42:57 +01:00
Bat
4d382d8014
Fix compatibility with SQlite
...
Also fixes a bug in plume-models
2018-10-06 12:59:08 +01:00
Bat
5fa7a2a742
Remove legacy setup script
2018-10-06 12:31:00 +01:00
Baptiste Gelez
b464671cf0
Merge pull request #226 from igalic/feat/sqlite
...
Add SQLite as supported database
2018-10-06 12:15:00 +01:00
Trinity Pointard
3466e55548
Implement JSON-ld signature verification
...
Implement JSON-ld signature verification
Move signature verification functions to the proper file
2018-10-06 10:06:06 +02:00
Trinity Pointard
62c94ed463
Refactor and verify http signature on personnal inbox
...
Verify signature on personnal inbox
Reduce code duplication
Put Headers in plume-models
2018-10-03 20:48:25 +02:00
Trinity Pointard
0a5d435249
Verify http signatures
2018-10-03 09:31:38 +02:00
Trinity Pointard
d3ed2d8af5
Fix regression and update rocket_csrf
...
Fix account creation, introduced by fceb9ab
Update to latest rocket_csrf
2018-10-02 11:51:12 +02:00
Bat
07f2c979ec
Make the REST API compatible with SQlite
2018-09-30 14:21:07 +01:00
Bat
743620eb6a
Fix the SQlite build
2018-09-30 14:13:56 +02:00
Trinity Pointard
fceb9ab0cd
Update cookie management a bit
...
Update to latest rocket_csrf
Make user_id a samesite lax cookie (see https://github.com/Plume-org/Plume/issues/233#issuecomment-422660275 )
2018-09-30 11:56:12 +02:00
Baptiste Gelez
236cf14406
Merge pull request #245 from Plume-org/rest-api
...
Some API endpoints for articles
2018-09-29 16:33:31 +01:00
Bat
72fd9eb610
API: Filter posts in the list
2018-09-29 15:45:27 +01:00
Bat
f893056d6d
Mount the API endpoints
2018-09-25 20:45:32 +01:00
Bat
d8ca1d70b7
Fix CSRF issues
...
GET routes are not protected against CSRF. This commit changes the needed URLs to
POST and replace simple links with forms.
Thanks @fdb-hiroshima for noticing it!
2018-09-19 18:13:07 +01:00
Bat
1500267125
Add canapi and try to use for the API
2018-09-19 15:49:34 +01:00
Igor Galić
06718a5c8a
directly use SafeString in InstanceSettingsForm
2018-09-14 20:25:16 +02:00
Igor Galić
65e213309b
do not allocate empty strings
...
follow review from @pwoolcoc, and do not use
SafeString::new(&<String>::new())
since this makes an allocation which will then just be thrown away.
Instead, we pass ""
2018-09-14 18:24:27 +02:00
Igor Galić
f5c299f23c
make blog/instance description a SafeString
...
long_description & short_description's documentation say they can be
Markdown, but they are String, not SafeString.
This led to escaped strings being printed in the editor
https://github.com/Plume-org/Plume/issues/220
2018-09-14 15:14:24 +02:00
Bat
0200a7b223
Only send notifications for mentions if the post is not a draft
2018-09-12 17:00:00 +01:00