Felix Ableitner
3d698dde7c
Merge branch 'main' into markdown-link-rule
2023-12-21 10:43:00 +01:00
Nutomic
6626d35b98
Second attempt to make command line options more consistent ( #4249 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-12-13 09:14:59 -05:00
Nutomic
cef3f220a2
Make command line options consistent ( #4243 )
2023-12-11 09:39:18 -05:00
Kroese
203ca9d617
Print version to log ( #4226 )
...
* Print version to log
* Keep cargofmt happy
* Keep cargo_fmt happy
* Keep Clippy happy
2023-12-05 11:35:59 -05:00
Nutomic
a790a24c4d
Revert debug auth ( #4232 )
...
* Revert "Some changes to help debug auth problems on lemmy.ml (#4220 )"
This reverts commit 16ac893e15
.
* Rename auth cookie back to jwt
2023-12-05 11:22:08 -05:00
Nutomic
a5386187e3
Enable missing code for prometheus actix-web stats ( #4230 )
...
* Enable missing code for prometheus actix-web stats
* enable middleware conditionally
2023-12-04 09:53:53 -05:00
Nutomic
16ac893e15
Some changes to help debug auth problems on lemmy.ml ( #4220 )
...
* Some changes to help debug auth problems on lemmy.ml
* fix
* clippy
2023-12-01 09:18:29 -05:00
Nutomic
d7376d9541
Fix cors_origin wildcard ( fixes #4214 ) ( #4221 )
2023-12-01 09:16:55 -05:00
Nutomic
934fe7d1cb
Remove pictrs config section `old_db` ( #4199 )
...
* Remove pictrs config section `old_db` (ref #4194 )
* ci
* remove cargo config comment
* ci
* Revert "remove cargo config comment"
This reverts commit 9389e93649
.
* rename .cargo to .cargo_home
2023-11-24 11:26:21 -05:00
Nutomic
7d489f1e3f
Upgrade pictrs to 0.5.0-beta.2 ( #4194 )
...
* Upgrade pictrs to 0.5.0-beta.2
* Update src/main.rs
Co-authored-by: asonix <asonix@asonix.dog>
* add comment
---------
Co-authored-by: asonix <asonix@asonix.dog>
2023-11-24 07:44:17 -05:00
Felix Ableitner
6232fa0279
Merge branch 'main' into markdown-link-rule
2023-11-23 12:04:40 +01:00
Nutomic
a00313e680
Merge `/site_inbox` into `/inbox`, remove unique constraint for inboxes ( #4138 )
...
* Merge /site_inbox into /inbox (fixes #4137 )
Get rid of different inboxes, only use /inbox
Remove shared_inbox_url db columns
add code migration
move to db migration, fixes
machete
fix sql
drop inbox url unique constraints
Dont create auth cookie in backend (#4136 )
dont change individual inboxes to shared inbox
Dont send comment reply to user who has community blocked. Fixes #3684 (#4096 )
* Dont send comment reply to user who has community blocked. Fixes #3684
* Adding source instance block check.
* Adding api test.
* Addressing PR comments.
* move site inbox rewrite to db
* fix test
* clippy
* clippy 2
* fix test
2023-11-16 14:22:40 +01:00
Nutomic
9a94a86363
Fix cors wildcard (ref #4095 ) ( #4156 )
...
* Fix cors wildcard (ref #4095 )
* cleanup
* clippy
2023-11-14 09:39:13 -05:00
dullbananas
8e2cbc9a0f
Remove id column and use different primary key on some tables ( #4093 )
...
* post_saved
* fmt
* remove unique and not null
* put person_id first in primary key and remove index
* use post_saved.find
* change captcha_answer
* remove removal of not null
* comment_aggregates
* comment_like
* comment_saved
* aggregates
* remove "\"
* deduplicate site_aggregates
* person_post_aggregates
* community_moderator
* community_block
* community_person_ban
* custom_emoji_keyword
* federation allow/block list
* federation_queue_state
* instance_block
* local_site_rate_limit, local_user_language, login_token
* person_ban, person_block, person_follower, post_like, post_read, received_activity
* community_follower, community_language, site_language
* fmt
* image_upload
* remove unused newtypes
* remove more indexes
* use .find
* merge
* fix site_aggregates_site function
* fmt
* Primary keys dess (#17 )
* Also order reports by oldest first (ref #4123 ) (#4129 )
* Support signed fetch for federation (fixes #868 ) (#4125 )
* Support signed fetch for federation (fixes #868 )
* taplo
* add federation queue state to get_federated_instances api (#4104 )
* add federation queue state to get_federated_instances api
* feature gate
* move retry sleep function
* move stuff around
* Add UI setting for collapsing bot comments. Fixes #3838 (#4098 )
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
* Only keep sent and received activities for 7 days (fixes #4113 , fixes #4110 ) (#4131 )
* Only check auth secure on release mode. (#4127 )
* Only check auth secure on release mode.
* Fixing wrong js-client.
* Adding is_debug_mode var.
* Fixing the desktop image on the README. (#4135 )
* Delete dupes and add possibly missing unique constraint on person_aggregates.
* Fixing clippy lints.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
* fmt
* Update community_block.rs
* Update instance_block.rs
* Update person_block.rs
* Update person_block.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-11-13 08:14:07 -05:00
SleeplessOne1917
1dc6c60760
Make import and export settings endpoints reachable ( #4143 )
...
* Make import and export settings endpoints reachable
* Preserve original routes
2023-11-13 08:08:07 -05:00
Felix Ableitner
6257469e51
Merge branch 'main' into markdown-link-rule
2023-11-07 12:01:27 +01:00
Nutomic
cb01427dcf
Only keep sent and received activities for 7 days ( fixes #4113 , fixes #4110 ) ( #4131 )
2023-11-06 16:17:53 -05:00
Nutomic
8c85f35b19
Support signed fetch for federation ( fixes #868 ) ( #4125 )
...
* Support signed fetch for federation (fixes #868 )
* taplo
2023-11-06 16:02:01 -05:00
Felix Ableitner
95025adaca
testing
2023-10-26 13:25:47 +02:00
Felix Ableitner
9b40d74cce
Merge branch 'main' into markdown-link-rule
2023-10-26 12:48:57 +02:00
Felix Ableitner
45f5448ece
proxy images through pictrs
2023-10-26 12:39:00 +02:00
Felix Ableitner
986913d250
add config option
2023-10-26 10:52:24 +02:00
Nutomic
08739e2925
Move usage of env::var to lemmy_utils, simplify db init (ref #4095 ) ( #4108 )
2023-10-25 11:34:38 -04:00
Dessalines
1b751a8cac
Adding cors_origin to settings. Fixes #3665 ( #4095 )
...
* Adding cors_origin to settings. Fixes #3665
* Fix result to option.
* Forgot to update config defaults.
* Setting a cors origin doku default.
* Adding comments for CORS.
2023-10-25 16:46:34 +02:00
Felix Ableitner
f057abff71
Merge branch 'main' into markdown-link-rule
2023-10-25 12:57:24 +02:00
Nutomic
45bed71c36
Include prometheus in default build, remove build feature ( fixes #3558 ) ( #4071 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-25 06:54:58 -04:00
Dessalines
c38dfdcd64
Disable ansi coloring in logs. Fixes #3975 ( #4101 )
2023-10-25 10:58:55 +02:00
Felix Ableitner
650e3a71d7
Merge branch 'main' into markdown-link-rule
2023-10-23 15:40:04 +02:00
Nutomic
ec0a707110
Avoid using proxy for pictrs requests ( fixes #3489 ) ( #4072 )
...
* Avoid using proxy for pictrs requests (fixes #3489 )
* fmt
2023-10-20 11:09:34 -04:00
Dessalines
cae25486e4
Adding ts-rs directives for login_token. ( #4063 )
...
* Adding ts-rs directives for login_token.
* Fixing ts-rs derive.
2023-10-19 20:16:12 -04:00
dullbananas
a14657d124
Refactor rate limiter and improve rate limit bucket cleanup ( #3937 )
...
* Update rate_limiter.rs
* Update mod.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update mod.rs
* Update scheduled_tasks.rs
* Shrink `RateLimitBucket`
* Update rate_limiter.rs
* Update mod.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update mod.rs
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* rerun ci
* Update rate_limiter.rs
* Undo changes to fields
* Manually undo changes to RateLimitBucket fields
* fmt
* Bucket cleanup loop in rate_limit/mod.rs
* Remove rate limit bucket cleanup from scheduled_tasks.rs
* Remove ;
* Remove UNINITIALIZED_TOKEN_AMOUNT
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* stuff
* MapLevel trait
* fix merge
* Prevent negative numbers in buckets
* Clean up MapLevel::check
* MapLevel::remove_full_buckets
* stuff
* Use remove_full_buckets to avoid allocations
* stuff
* remove tx
* Remove RateLimitConfig
* Rename settings_updated_channel to rate_limit_cell
* Remove global rate limit cell
* impl Default for RateLimitCell
* bucket_configs doc comment to explain EnumMap
* improve test_rate_limiter
* rename default to with_test_config
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
2023-10-19 15:31:51 +02:00
Nutomic
3f62135083
Add validate_auth api endpoint ( fixes #3702 ) ( #4049 )
...
* Add validate_auth api endpoint (fixes #3702 )
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-17 11:25:48 -04:00
Nutomic
9e099726e6
Cleanup checks for community actions ( fixes #2858 , fixes #2868 ) ( #4028 )
...
* Cleanup checks for community actions (fixes #2858 , fixes #2868 )
* allow restoring deleted community
* review changes
* remove unneeded sql
* remove joins
* change mod log check
2023-10-13 09:48:18 -04:00
Nutomic
6d7b38f4de
Implement user data import/export ( #3976 )
...
* Implement endpoints for user data import/export
* add test
* exclude avatar/banner
* increase import url count, add rate limit
* also export/import saved posts
* rate limit
* rename
* saved posts also exist
* rename routes
* fix test
* error handling
* clippy
* limit parallelism
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-11 16:47:22 +02:00
Felix Ableitner
3be2a55dd0
Add markdown image rule to add local image proxy ( fixes #1036 )
2023-10-11 12:10:14 +02:00
Nutomic
dc327652a5
Add db table for login tokens which allows for invalidation ( #3818 )
...
* wip
* stuff
* fmt
* fmt 2
* fmt 3
* fix default feature
* use Authorization header
* store ip and user agent for each login
* add list_logins endpoint
* serde(skip) for token
* fix api tests
* A few suggestions for login_token (#3991 )
* A few suggestions.
* Fixing SQL format.
* review
* review
* rename cookie
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-09 12:46:12 +02:00
Nutomic
4bf9947153
Add comment to explain startup server (ref #4005 ) ( #4022 )
...
* Add comment to explain startup server (ref #4005 )
* ci
2023-10-05 07:41:05 -04:00
Nutomic
6950dd90e5
Return HTTP status 503 to all requests during startup ( fixes #3780 ) ( #4005 )
...
* Return HTTP status 503 to all requests during startup (fixes #3780 )
* add message
* fmt
* remove err
* dont run startup server if http disabled
* ci
2023-10-04 18:19:58 -04:00
SleeplessOne1917
ed8dae99f1
Merge branch 'main' into bearer-token
2023-09-24 17:47:17 -04:00
SleeplessOne1917
6387ac07b3
Merge branch 'bearer-token' of https://github.com/SleeplessOne1917/lemmy into bearer-token
2023-09-22 21:48:47 -04:00
SleeplessOne1917
3a76a10931
chore: Run rust format
2023-09-22 21:48:27 -04:00
SleeplessOne1917
37655f0f18
chore: Run rust format
2023-09-22 21:39:03 -04:00
SleeplessOne1917
519e800b33
feat: Replace ad hoc auth header with internet standard bearer token
...
auth header
2023-09-22 21:26:27 -04:00
phiresky
5941dc2924
Merge remote-tracking branch 'origin/main' into add_federation_worker_index
2023-09-21 11:57:13 +00:00
Nutomic
f858d8cbce
Remove explicit auth params ( #3946 )
...
* Remove explicit auth params (ref #3725 )
Only take auth via header or cookie. This requires a new version
of lemmy-js-client for api tests to pass.
* rework api_crud
* remove remaining auth params, move logic to session middleware
* fmt, fix test
* update js client
* remove auth param from api tests
* Pass auth as header
* add !
* url vars, setHeader
* cleanup
* fmt
* update
* Updating for new lemmy-js-client.
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-21 06:42:28 -04:00
phiresky
2dbaf67b7c
Merge branch 'main' into add_federation_worker_index
2023-09-20 18:06:44 +02:00
Nutomic
22608ae983
Rework the way 2FA is enabled/disabled ( fixes #3309 ) ( #3959 )
...
* Rework the way 2FA is enabled/disabled (fixes #3309 )
* postgres format
* change algo to sha1 for better compat
* review comments
* review
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-20 10:49:54 -04:00
Nutomic
50f81cf157
User can block instances ( fixes #2397 ) ( #3869 )
...
* User can block instances (fixes #2397 )
* update comments
* review comments
* use route
* update
* add api test
* update tests
* fix
* fix test
* ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-20 11:56:13 +02:00
phiresky
08401fc85f
Revert "remove synchronous federation"
...
This reverts commit 2767ab4a6f
.
2023-09-18 14:25:35 +00:00
Alex Roman
6735a98d35
Async scheduler ( #3949 )
...
* fix: switch to async scheduler
* fix: pass context to scheduled tasks
* Merge remote-tracking branch 'upstream/main' into async-scheduler
* retrigger ci
* retrigger ci
2023-09-11 11:12:16 +02:00