Commit graph

109 commits

Author SHA1 Message Date
Paolo Barbolini
559e43075a
Simplify building plain/html emails (#2251) 2022-05-08 17:00:12 +00:00
3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2022-05-03 17:44:13 +00:00
56b7030901
Fix link metadata unit test (#2237) 2022-04-27 15:42:10 +00:00
00b0b26dfa
Add default post listing type (fixes #2195) (#2209)
* Add default post listing type (fixes #2195)

* review fixes

* change column type
2022-04-19 19:05:08 +00:00
Dessalines
24be9f2cd5
Show deny reason to users after a failed login. Fixes #2191 (#2206)
* Show deny reason to users after a failed login. Fixes #2191

* Updating translations.

* Adding registration_denied translated string.
2022-04-19 10:48:59 +00:00
Dessalines
0a36b16e29
Fix allowlist / blocklist description location. Fixes #2214 (#2215)
* Fix allowlist / blocklist description location. Fixes #2214

* Fix allowlist check
2022-04-13 18:27:56 +00:00
c7f5337099
Run cargo upgrade (#2176)
* Run cargo upgrade and cargo update

* Fixing validation (#2179)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-04-01 18:37:51 +00:00
4cf0da7b60 Clippy fixes. 2022-03-30 10:58:03 -04:00
Dessalines
e16821116e
Lowering search rate limit. Fixes #2153 (#2154)
* Lowering search rate limit. Fixes #2153

* Adding a search rate limit.

* Forgot to add the websocket search rate limit

* Fix wrong op
2022-03-29 15:46:03 +00:00
Dessalines
f2a0841586
Rate limit websocket joins. (#2165)
* Rate limit websocket joins.

* Removing async on mutex lock fn.

* Removing redundant ip

* Return early if check fails.
2022-03-27 00:29:05 +00:00
a5ff629b24
Dont log errors when rate limit is hit (fixes #2157) (#2161)
* Dont log errors when rate limit is hit (fixes #2157)

* Clone service rather than http request

* some cleanup/refactoring

Co-authored-by: Aode (Lion) <asonix@asonix.dog>
2022-03-25 16:41:38 +01:00
2da0684e95 Removing check_only 2022-03-24 16:29:08 -04:00
ed9f70276d Fix rate limit check for register. Fixes #2159 2022-03-24 16:13:58 -04:00
Dessalines
1e9f609cdb
Consolidate and lower reqwest timeouts. Fixes #2150 (#2151) 2022-03-24 16:33:23 +00:00
83e996111e
Check that config is valid before saving (#2152) 2022-03-24 16:23:12 +00:00
cb44b14717
WIP: Email localization (fixes #500) (#2053)
* Allow email localization (fixes #500)

* add PersonAggregates::default()

* add lemmy-translations submodule

* fix gitmodules
2022-03-24 15:25:51 +00:00
4e6d901649 Show rate limit algorithm. Fixes #2136 2022-03-22 18:45:14 +00:00
166ec196b0
Rework error handling (fixes #1714) (#2135) 2022-03-16 20:11:49 +00:00
3c5275638f
Increase default worker count (#2120) 2022-03-07 22:28:50 +00:00
ef1e164cc5
Make activity queue worker count configurable, log stats (#2113) 2022-03-03 18:54:33 +00:00
fa29ffade1
Add timeout for sending activities (#2112)
* Add timeout for sending activities

* Also set request timeouts in utils/src/request.rs
2022-03-03 13:40:10 -05:00
RedLobster999
348077c3de
send plain-text in email along with html (#2107)
* send plain text in email along with html

* format the code using "cargo +nightly fmt"

Co-authored-by: kittiphat-kang <kittiphat.nu@easysunday.com>
2022-03-01 14:28:18 +00:00
9f5183fe98
Add site option for default theme (#2104) 2022-02-23 11:40:36 -05:00
f1aef63149
Use doku(skip) for opentelemetry_url config value (ref #2085) (#2091) 2022-02-07 10:39:37 -05:00
1546e5fd0d Merge remote-tracking branch 'lemmynet/fix_sitemetadata_test' into asonix/document-opentelemetry-url 2022-02-04 20:37:38 -06:00
609d2b99f7 Fix site metadata test. 2022-02-04 18:22:43 -05:00
6058b11f6e Add comment about opentelemetry_url 2022-02-03 17:24:19 -06:00
Dessalines
1372827b41
Adding starttls support. Fixes #1997 (#2051)
* Adding starttls support. Fixes #1997

* Change name to tls_type, make a string
2022-01-26 16:42:43 +00:00
Dessalines
16271b0a4c
Empty post bodies (#2050)
* Cleaning optional post bodies. Fixes #2039

* Only trim once.

* Using .map() instead.

* Revert "Using .map() instead."

This reverts commit a2f4907209.
2022-01-21 13:38:01 +00:00
Dessalines
19ccaf767c
Cleaning optional post bodies. Fixes #2039 (#2043)
* Cleaning optional post bodies. Fixes #2039

* Only trim once.

* Using .map() instead.
2022-01-20 14:04:54 +00:00
3032a2745b
Opentelemetry (#1992)
* Add otlp export

* Add jaeger to dev docker

* More instrument

* Update deps

* Merge from main.

* Add comment about viewing traces

* Fixing reqwest-tracing dep.

* Update pre-commit regex

* Move imports to top

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-01-06 19:10:20 +00:00
Rens Groothuijsen
661f97a073
Use correct encoding when fetching non-UTF-8 site metadata (#2015)
* Use correct encoding when fetching non-UTF-8 site metadata

* Style fixes
2022-01-06 13:13:17 +00:00
Dessalines
3065154f4e
Merge pull request #2007 from LemmyNet/another_tokenizer_fix
Trying another tokenizer fix. #1964
2021-12-21 17:24:44 -05:00
Kradyz
9f64872d5a
Case-insensitive webfinger response. Fixes #1955 & #1986 (#2005)
* Make webfinger case insensitive

* Make webfinger case insensitive

* Case insensitive domain name

* Case-insensitive webfinger

* formatting

Co-authored-by: Kradyz <k@radiz.nl>
2021-12-20 17:23:06 -05:00
ad4715c2a3 Trying another tokenizer fix. #1964 2021-12-20 16:57:36 -05:00
Dessalines
c883a49a40
First pass at invite-only migration. (#1949)
* First pass at invite-only migration.

* Implement email verification (fixes #219)

* remove unwrap

* Adding views and functionality to registration application. #209

* Add private instance site column, and back end checks.

* Adding some message fields to LoginResponse

* Adding private instance to site setup.

* A few additions:

- Add a DeleteAccount response.
- RegistrationApplicationView now has the safe LocalUserSettings.
- Adding VerifyEmail to websocket API, added a proper response type.

* Adding and reorganizing some email helpers.

* A few fixes for private sites:

- Added a check_registration_application function.
- Only send a verification email if its been changed.
- VerifyEmail now returns LoginResponse.
- Deleting the old tokens after a successful email verify.
- If port is missing on email config, display a better error message.

* Version 0.15.0-rc.3

* Adding published to email_verification table.

* Adding fixes from comments.

* Version 0.15.0-rc.4

* Adding modlog private site check.

* Version 0.15.0-rc.6

Co-authored-by: Felix Ableitner <me@nutomic.com>
2021-12-15 14:49:59 -05:00
Dessalines
161d41999d
Adding min setup password length to the docs. Fixes #1989 (#1990) 2021-12-12 16:42:24 +00:00
97ebf2f6f3 Consolidate reqwest clients, use reqwest-middleware for tracing 2021-12-06 16:54:34 -06:00
35cbae61bc
Don't drop error context when adding a message to errors (#1958)
* Respond directly with LemmyError

Instrument Perform implementations for more precise traces
Use ApiError to format JSON errors when messages are present
Keep SpanTrace output in LemmyError Display impl

* Hide SpanTrace debug output from LemmyError

* Don't log when entering spans, only when leaving

* Update actix-web

* Update actix-rt

* Add newline after error info in LemmyError Display impl

* Propogate span information to blocking operations

* Instrument apub functions

* Use skip_all for more instrument attributes, don't skip 'self' in some api actions

* Make message a static string

* Send proper JSON over websocket

* Add 'message' to LemmyError display if present

* Use a quieter root span builder, don't pretty-print logs

* Keep passwords and emails out of logs

* Re-enable logging Login

* Instrument feeds

* Emit our own errors

* Move error log after status code recording

* Make Sensitive generic over the inner type

* Remove line that logged secrets
2021-12-06 09:54:47 -05:00
Dessalines
040770d7ba
Fix retry infinite loops. Fixes #1964 (#1967)
* Fix retry infinite loops. Fixes #1964

* Moving retry_limit to settings
2021-12-05 10:03:13 -05:00
Dessalines
451818749b
Fix min title char count for post titles. Fixes #1854 (#1940)
* Fix min title char count for post titles. Fixes #1854

* Adding more newline checks for actors.

* Adding helper function
2021-11-23 15:52:58 +00:00
3fea5645f8
Add tracing (#1942) 2021-11-23 12:16:47 +00:00
e88106cef4 Use once_cell instead of lazy_static 2021-11-22 19:58:31 +01:00
layla
7fe7062c47 Implement rate limits on comments 2021-11-18 13:40:16 +00:00
579ca37ddf Make webfinger standard compliant 2021-11-16 18:03:09 +01:00
Dessalines
b18ea3e0cc
Renaming to slur_filter. Fixes #1773 (#1801)
* Renaming to slur_filter. Fixes #1773

* Fixing config

* Updating doku for slur filter.

* Updating doku for slur filter again.

* Remove comment.
2021-10-28 20:47:25 +00:00
f24999027e Merge crates db_schema and db_queries 2021-10-20 12:28:08 +02:00
8067244765
Dont swallow API errors (fixes #1834) (#1837)
Dont swallow API errors (fixes #1834)
2021-10-13 15:50:21 -04:00
Dessalines
35d0aba9e6
Adding a message_id to emails. Fixes #1807 (#1826) 2021-10-12 11:38:55 +00:00
454d3987a5
Generate config docs from code (#1786)
* Generate config docs from code

* update library

* move settings comments from config.hjson to code

* updte doku to 0.10

* update doku
2021-10-08 11:07:24 -04:00