mirror of https://akkoma.dev/AkkomaGang/akkoma.git
Compare commits
6 Commits
0ed8cd77d9
...
9506bea142
Author | SHA1 | Date |
---|---|---|
Weblate | 9506bea142 | |
Weblate | 54d9f915c8 | |
Weblate | 34577d6198 | |
floatingghost | e97d08ee98 | |
Oneric | 3cd882528e | |
Oneric | e47c50666d |
|
@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Documentation issue in which a non-existing nginx file was referenced
|
||||
- Issue where a bad inbox URL could break federation
|
||||
- Issue where hashtag rel values would be scrubbed
|
||||
- Issue where short domains listed in `transparency_obfuscate_domains` were not actually obfuscated
|
||||
|
||||
## 2023.08
|
||||
|
||||
|
|
|
@ -61,6 +61,32 @@ config :pleroma, :mrf_simple,
|
|||
|
||||
The effects of MRF policies can be very drastic. It is important to use this functionality carefully. Always try to talk to an admin before writing an MRF policy concerning their instance.
|
||||
|
||||
## Hiding or Obfuscating Policies
|
||||
|
||||
You can opt out of publicly displaying all MRF policies or only hide or obfuscate selected domains.
|
||||
|
||||
To just hide everything set:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :mrf,
|
||||
...
|
||||
transparency: false,
|
||||
```
|
||||
|
||||
To hide or obfuscate only select entries, use:
|
||||
|
||||
```elixir
|
||||
config :pleroma, :mrf,
|
||||
...
|
||||
transparency_obfuscate_domains: ["handholdi.ng", "badword.com"],
|
||||
transparency_exclusions: [{"ghost.club", "even a fragment is too spoopy for humans"}]
|
||||
```
|
||||
|
||||
## More MRF Policies
|
||||
|
||||
See the [documentation cheatsheet](cheatsheet.md)
|
||||
for all available MRF policies and their options.
|
||||
|
||||
## Writing your own MRF Policy
|
||||
|
||||
As discussed above, the MRF system is a modular system that supports pluggable policies. This means that an admin may write a custom MRF policy in Elixir or any other language that runs on the Erlang VM, by specifying the module name in the `policies` config setting.
|
||||
|
|
|
@ -314,6 +314,20 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
|
|||
def filter(object), do: {:ok, object}
|
||||
|
||||
defp obfuscate(string) when is_binary(string) do
|
||||
# Want to strip at least two neighbouring chars
|
||||
# to ensure at least one non-dot char is in the obfuscation area
|
||||
stripped = String.length(string) - 6
|
||||
|
||||
{keepstart, keepend} =
|
||||
if stripped > 1 do
|
||||
{3, 3}
|
||||
else
|
||||
{
|
||||
2 - div(1 - stripped, 2),
|
||||
2 + div(stripped, 2)
|
||||
}
|
||||
end
|
||||
|
||||
string
|
||||
|> to_charlist()
|
||||
|> Enum.with_index()
|
||||
|
@ -322,7 +336,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
|
|||
?.
|
||||
|
||||
{char, index} ->
|
||||
if 3 <= index && index < String.length(string) - 3, do: ?*, else: char
|
||||
if keepstart <= index && index < String.length(string) - keepend, do: ?*, else: char
|
||||
end)
|
||||
|> to_string()
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,146 +8,154 @@
|
|||
### to merge POT files into PO files.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2023-10-09 18:53+0000\n"
|
||||
"Last-Translator: subtype <subtype@hollow.capital>\n"
|
||||
"Language-Team: Polish <http://translate.akkoma.dev/projects/akkoma/"
|
||||
"akkoma-backend-posix-errors/pl/>\n"
|
||||
"Language: pl\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10||n%100>=20) ? 1 : 2);\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||
"|| n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Weblate 4.18.2\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "eperm"
|
||||
msgstr ""
|
||||
msgstr "Operacja niedozwolona"
|
||||
|
||||
msgid "eacces"
|
||||
msgstr ""
|
||||
msgstr "Brak dostępu"
|
||||
|
||||
msgid "eagain"
|
||||
msgstr ""
|
||||
msgstr "Zasoby chwilowo niedostępne"
|
||||
|
||||
msgid "ebadf"
|
||||
msgstr ""
|
||||
msgstr "Błędny deskryptor pliku"
|
||||
|
||||
msgid "ebadmsg"
|
||||
msgstr ""
|
||||
msgstr "Błędny komunikat"
|
||||
|
||||
msgid "ebusy"
|
||||
msgstr ""
|
||||
msgstr "Urządzenie lub zasoby zajęte"
|
||||
|
||||
msgid "edeadlk"
|
||||
msgstr ""
|
||||
msgstr "Uniknięto zakleszczenia zasobów"
|
||||
|
||||
msgid "edeadlock"
|
||||
msgstr ""
|
||||
msgstr "Uniknięto zakleszczenia zasobów"
|
||||
|
||||
msgid "edquot"
|
||||
msgstr ""
|
||||
msgstr "Przekroczony limit dyskowy"
|
||||
|
||||
msgid "eexist"
|
||||
msgstr ""
|
||||
msgstr "Plik istnieje"
|
||||
|
||||
msgid "efault"
|
||||
msgstr ""
|
||||
msgstr "Błędny adres"
|
||||
|
||||
msgid "efbig"
|
||||
msgstr ""
|
||||
msgstr "Plik zbyt duży"
|
||||
|
||||
msgid "eftype"
|
||||
msgstr ""
|
||||
msgstr "Niewłaściwy typ pliku"
|
||||
|
||||
msgid "eintr"
|
||||
msgstr ""
|
||||
msgstr "Przerwane wywołanie systemowe"
|
||||
|
||||
msgid "einval"
|
||||
msgstr ""
|
||||
msgstr "Zły argument"
|
||||
|
||||
msgid "eio"
|
||||
msgstr ""
|
||||
msgstr "Błąd wejścia/wyjścia"
|
||||
|
||||
msgid "eisdir"
|
||||
msgstr ""
|
||||
msgstr "Jest katalogiem"
|
||||
|
||||
msgid "eloop"
|
||||
msgstr ""
|
||||
msgstr "Za duże zagnieżdżenie dowiązań symbolicznych"
|
||||
|
||||
msgid "emfile"
|
||||
msgstr ""
|
||||
msgstr "Za dużo otwartych plików"
|
||||
|
||||
msgid "emlink"
|
||||
msgstr ""
|
||||
msgstr "Za dużo dowiązań"
|
||||
|
||||
msgid "emultihop"
|
||||
msgstr ""
|
||||
msgstr "Multihop attempted"
|
||||
|
||||
msgid "enametoolong"
|
||||
msgstr ""
|
||||
msgstr "Za długa nazwa pliku"
|
||||
|
||||
msgid "enfile"
|
||||
msgstr ""
|
||||
msgstr "Za dużo otwartych plików w systemie"
|
||||
|
||||
msgid "enobufs"
|
||||
msgstr ""
|
||||
msgstr "Brak miejsca w buforze"
|
||||
|
||||
msgid "enodev"
|
||||
msgstr ""
|
||||
msgstr "Nie ma takiego urządzenia"
|
||||
|
||||
msgid "enolck"
|
||||
msgstr ""
|
||||
msgstr "Brak dostępnych blokad"
|
||||
|
||||
msgid "enolink"
|
||||
msgstr ""
|
||||
msgstr "Połączenie zostało przerwane"
|
||||
|
||||
msgid "enoent"
|
||||
msgstr ""
|
||||
msgstr "Nie ma takiego pliku ani katalogu"
|
||||
|
||||
msgid "enomem"
|
||||
msgstr ""
|
||||
msgstr "Nie można przydzielić pamięci"
|
||||
|
||||
msgid "enospc"
|
||||
msgstr ""
|
||||
msgstr "Brak miejsca na urządzeniu"
|
||||
|
||||
msgid "enosr"
|
||||
msgstr ""
|
||||
msgstr "Brak dodatkowych strumieni"
|
||||
|
||||
msgid "enostr"
|
||||
msgstr ""
|
||||
msgstr "Nie jest strumieniem"
|
||||
|
||||
msgid "enosys"
|
||||
msgstr ""
|
||||
msgstr "Niezaimplementowana funkcja"
|
||||
|
||||
msgid "enotblk"
|
||||
msgstr ""
|
||||
msgstr "Wymagane urządzenie blokowe"
|
||||
|
||||
msgid "enotdir"
|
||||
msgstr ""
|
||||
msgstr "Nie jest katalogiem"
|
||||
|
||||
msgid "enotsup"
|
||||
msgstr ""
|
||||
msgstr "Operacja nieobsługiwana"
|
||||
|
||||
msgid "enxio"
|
||||
msgstr ""
|
||||
msgstr "Nie ma takiego urządzenia ani adresu"
|
||||
|
||||
msgid "eopnotsupp"
|
||||
msgstr ""
|
||||
msgstr "Operacja na gnieździe nieobsługiwana"
|
||||
|
||||
msgid "eoverflow"
|
||||
msgstr ""
|
||||
msgstr "Wartość za duża dla zdefiniowanego typu danych"
|
||||
|
||||
msgid "epipe"
|
||||
msgstr ""
|
||||
msgstr "Przerwany potok"
|
||||
|
||||
msgid "erange"
|
||||
msgstr ""
|
||||
msgstr "Za duży wynik"
|
||||
|
||||
msgid "erofs"
|
||||
msgstr ""
|
||||
msgstr "System plików wyłącznie do odczytu"
|
||||
|
||||
msgid "espipe"
|
||||
msgstr ""
|
||||
msgstr "Błędne przesunięcie"
|
||||
|
||||
msgid "esrch"
|
||||
msgstr ""
|
||||
msgstr "Nie ma takiego procesu"
|
||||
|
||||
msgid "estale"
|
||||
msgstr ""
|
||||
msgstr "Nieaktualny uchwyt pliku"
|
||||
|
||||
msgid "etxtbsy"
|
||||
msgstr ""
|
||||
msgstr "Plik tekstowy zajęty"
|
||||
|
||||
msgid "exdev"
|
||||
msgstr ""
|
||||
msgstr "Niepoprawne dowiązanie"
|
||||
|
|
|
@ -3,16 +3,16 @@ msgstr ""
|
|||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-09-06 11:13+0000\n"
|
||||
"PO-Revision-Date: 2021-09-07 16:42+0000\n"
|
||||
"Last-Translator: Hồ Nhất Duy <kantcer@gmail.com>\n"
|
||||
"Language-Team: Vietnamese <https://translate.pleroma.social/projects/pleroma/"
|
||||
"pleroma/vi/>\n"
|
||||
"PO-Revision-Date: 2023-09-08 05:53+0000\n"
|
||||
"Last-Translator: Nguyễn Gia Phong <cnx@loang.net>\n"
|
||||
"Language-Team: Vietnamese <http://translate.akkoma.dev/projects/akkoma/"
|
||||
"akkoma-backend-errors/vi/>\n"
|
||||
"Language: vi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 4.6.2\n"
|
||||
"X-Generator: Weblate 4.18.2\n"
|
||||
|
||||
## This file is a PO Template file.
|
||||
##
|
||||
|
@ -577,37 +577,37 @@ msgstr "Người này không phải quản trị viên."
|
|||
#, elixir-format
|
||||
msgid "Last export was less than a day ago"
|
||||
msgid_plural "Last export was less than %{days} days ago"
|
||||
msgstr[0] ""
|
||||
msgstr[0] "Vừa sao lưu lần cuối %{days} ngày trước"
|
||||
|
||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:399
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Character limit (%{limit} characters) exceeded, contains %{length} characters"
|
||||
msgstr ""
|
||||
msgstr "Quá dài: %{length} kí tự (tối đa %{limit})"
|
||||
|
||||
#: lib/pleroma/web/plugs/ensure_staff_privileged_plug.ex:33
|
||||
#: lib/pleroma/web/plugs/user_is_staff_plug.ex:20
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "User is not a staff member."
|
||||
msgstr "Người này không phải quản trị viên."
|
||||
msgstr "Người dùng không phải quản trị viên."
|
||||
|
||||
#: lib/pleroma/web/o_auth/o_auth_controller.ex:391
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your account is awaiting approval."
|
||||
msgstr ""
|
||||
msgstr "Tài khoản của bạn đang chờ được duyệt."
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:256
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:259
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:262
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "File is too large"
|
||||
msgstr ""
|
||||
msgstr "Tệp quá lớn"
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/tag_controller.ex:37
|
||||
#: lib/pleroma/web/mastodon_api/controllers/tag_controller.ex:48
|
||||
#: lib/pleroma/web/mastodon_api/controllers/tag_controller.ex:59
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Hashtag not found"
|
||||
msgstr "Không tìm thấy danh sách"
|
||||
msgstr "Không tìm thấy hashtag"
|
||||
|
||||
#: lib/pleroma/web/common_api/activity_draft.ex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
|
@ -627,7 +627,7 @@ msgstr ""
|
|||
#: lib/pleroma/web/common_api/activity_draft.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "You can't quote a status that doesn't exist"
|
||||
msgstr ""
|
||||
msgstr "Bạn không thể trích dẫn bàn viết không tồn tại"
|
||||
|
||||
#: lib/pleroma/web/embed_controller.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
|
@ -637,9 +637,9 @@ msgstr ""
|
|||
#: lib/pleroma/web/embed_controller.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Not authorized to view this post"
|
||||
msgstr ""
|
||||
msgstr "Không có quyền xem bài viết này"
|
||||
|
||||
#: lib/pleroma/web/embed_controller.ex:32
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Post not found"
|
||||
msgstr "Không tìm thấy danh sách"
|
||||
msgstr "Không tìm thấy bài viết"
|
||||
|
|
|
@ -283,7 +283,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicyTest do
|
|||
|
||||
assert {:ok,
|
||||
%{
|
||||
mrf_simple: %{reject: ["rem***.*****nce", "a.b"]},
|
||||
mrf_simple: %{reject: ["rem***.*****nce", "*.b"]},
|
||||
mrf_simple_info: %{reject: %{"rem***.*****nce" => %{}}}
|
||||
}} = SimplePolicy.describe()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue