Compare commits
144 commits
customizab
...
develop
Author | SHA1 | Date | |
---|---|---|---|
c0a99df06a | |||
0cb4c35ee4 | |||
c9b3fcc1d3 | |||
11c5838947 | |||
180dc8b472 | |||
d330c57cda | |||
bd64d07082 | |||
9d2c558f64 | |||
ac25b051ae | |||
c5a44a59db | |||
58d5d9d7bf | |||
b6e8fde4dd | |||
bee10eab5e | |||
13215f5f06 | |||
430b376ded | |||
ccf1007883 | |||
6da783b84d | |||
8f322456a0 | |||
9c876cea21 | |||
9728e2f8f7 | |||
b0f7da9ce0 | |||
fc99c694e6 | |||
fbb13fde76 | |||
cbd236aeb5 | |||
71d3bbd7be | |||
98a3dab10a | |||
|
661b7fedb6 | ||
|
8b5aca9619 | ||
f101886709 | |||
09fa7227f6 | |||
d5b0720596 | |||
940792f8ba | |||
3c72b48a05 | |||
6475cf127e | |||
a8a231c5b2 | |||
2901fda29c | |||
bd14440386 | |||
|
b312edac4c | ||
3bb31117e6 | |||
2c5c531c35 | |||
a3101a435b | |||
d488cf476e | |||
ca182a0ae7 | |||
495a1a71e8 | |||
cf19d4901f | |||
07539f7825 | |||
0ab2f2ab45 | |||
95ed4931f8 | |||
7cd3954152 | |||
80a4e30be7 | |||
3ff0f46b9f | |||
4ff5293093 | |||
4f0cb61782 | |||
5fdb5d69d2 | |||
f66135ed08 | |||
dc34328f15 | |||
13e2a811ec | |||
1a4238bf98 | |||
c3069b9478 | |||
51f09531c4 | |||
962847fdc3 | |||
83aab0859a | |||
|
eb2b0d26e4 | ||
|
91870590ec | ||
|
c442877c25 | ||
|
16af0bad55 | ||
|
16ee6ed500 | ||
|
babf5df0e7 | ||
|
5767f59294 | ||
|
72ce0b7759 | ||
|
0cf9b44179 | ||
|
3cf335c4d0 | ||
|
1556e2be8e | ||
|
629077dce4 | ||
|
50256af6f6 | ||
|
c5d36d9679 | ||
|
fb4c5b97c7 | ||
|
a715cf4b3c | ||
|
693a6486da | ||
|
4e353f0335 | ||
5992e8bb16 | |||
57273754b7 | |||
59bfdf2ca4 | |||
a9e2e31e3b | |||
bf8f493ffd | |||
3b197503d2 | |||
c0b2bba55e | |||
4b765b1886 | |||
cba2c5725f | |||
2b96c3b224 | |||
b03edb4ff4 | |||
5b75fb2a2f | |||
4d6fb43cbd | |||
ad52135bf5 | |||
28d357f52c | |||
9c5feb81aa | |||
a360836ce3 | |||
840c70c4fa | |||
c65379afea | |||
16bed0562d | |||
a801dd7b07 | |||
1e86da43f5 | |||
411831458c | |||
56463b2121 | |||
2f5eb79473 | |||
f4daa90bd8 | |||
688748b531 | |||
2e5aa71176 | |||
7ca655a999 | |||
4746f98851 | |||
765c7e98d2 | |||
ddbe989461 | |||
4a3dd5f65e | |||
bfe4152385 | |||
5da9cbd8a5 | |||
a924e117fd | |||
d1c4b97613 | |||
2180d068ae | |||
a3840e7d1f | |||
b17d3dc6d8 | |||
f8f364d36d | |||
329d8fcba8 | |||
e2860e5292 | |||
df27567d99 | |||
be5440c5e8 | |||
68fe0a9633 | |||
0f65dd3ebe | |||
38d09cb0ce | |||
c9a03af7c1 | |||
0f7ae0fa21 | |||
30e13a8785 | |||
bed7ff8e89 | |||
70cd5f91d8 | |||
aeaebb566c | |||
5751637926 | |||
24bab63cd8 | |||
1d4c212441 | |||
6e7cbf1885 | |||
225f87ad62 | |||
e64f031167 | |||
fa52093bac | |||
3126d15ffc | |||
|
3947012691 | ||
|
d61b7d4b49 |
168 changed files with 34272 additions and 22349 deletions
|
@ -87,5 +87,5 @@ steps:
|
||||||
- mix ecto.create
|
- mix ecto.create
|
||||||
- mix ecto.migrate
|
- mix ecto.migrate
|
||||||
- mkdir -p test/tmp
|
- mkdir -p test/tmp
|
||||||
- mix test --preload-modules --exclude erratic --exclude federated --exclude mocked
|
- mix test --preload-modules --exclude erratic --exclude federated --exclude mocked || mix test --failed
|
||||||
- mix test --preload-modules --only mocked
|
- mix test --preload-modules --only mocked || mix test --failed
|
||||||
|
|
32
CHANGELOG.md
32
CHANGELOG.md
|
@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
|
## UNRELEASED
|
||||||
|
|
||||||
|
## BREAKING
|
||||||
|
- Minimum PostgreSQL version is raised to 12
|
||||||
|
- Swagger UI moved from `/akkoma/swaggerui/` to `/pleroma/swaggerui/`
|
||||||
|
|
||||||
|
## Added
|
||||||
|
- Implement [FEP-67ff](https://codeberg.org/fediverse/fep/src/branch/main/fep/67ff/fep-67ff.md) (federation documentation)
|
||||||
|
- Meilisearch: it is now possible to use separate keys for search and admin actions
|
||||||
|
- New standalone `prune_orphaned_activities` mix task with configurable batch limit
|
||||||
|
- The `prune_objects` mix task now accepts a `--limit` parameter for initial object pruning
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
- Meilisearch: order of results returned from our REST API now actually matches how Meilisearch ranks results
|
||||||
|
- Emoji are now federated as anonymous objects, fixing issues with
|
||||||
|
some strict servers e.g. rejecting e.g. remote emoji reactions
|
||||||
|
- AP objects with additional JSON-LD profiles beyond ActivityStreams can now be fetched
|
||||||
|
- Single-selection polls no longer expose the voter_count; MastoAPI demands it be null
|
||||||
|
and this confused some clients leading to vote distributions >100%
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
- Refactored Rich Media to cache the content in the database. Fetching operations that could block status rendering have been eliminated.
|
||||||
|
|
||||||
## 2024.04.1 (Security)
|
## 2024.04.1 (Security)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
@ -11,15 +34,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Issue allowing use of non-media objects as attachments and crashing timeline rendering
|
- Issue allowing use of non-media objects as attachments and crashing timeline rendering
|
||||||
- Issue allowing webfinger spoofing in certain situations
|
- Issue allowing webfinger spoofing in certain situations
|
||||||
|
|
||||||
## Added
|
|
||||||
- Implement [FEP-67ff](https://codeberg.org/fediverse/fep/src/branch/main/fep/67ff/fep-67ff.md) (federation documentation)
|
|
||||||
|
|
||||||
## Added
|
|
||||||
- Meilisearch: it is now possible to use separate keys for search and admin actions
|
|
||||||
|
|
||||||
## Fixed
|
|
||||||
- Meilisearch: order of results returned from our REST API now actually matches how Meilisearch ranks results
|
|
||||||
|
|
||||||
## 2024.04
|
## 2024.04
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
|
@ -63,7 +63,6 @@
|
||||||
uploader: Pleroma.Uploaders.Local,
|
uploader: Pleroma.Uploaders.Local,
|
||||||
filters: [],
|
filters: [],
|
||||||
link_name: false,
|
link_name: false,
|
||||||
proxy_remote: false,
|
|
||||||
filename_display_max_length: 30,
|
filename_display_max_length: 30,
|
||||||
base_url: nil,
|
base_url: nil,
|
||||||
allowed_mime_types: ["image", "audio", "video"]
|
allowed_mime_types: ["image", "audio", "video"]
|
||||||
|
@ -189,8 +188,10 @@
|
||||||
receive_timeout: :timer.seconds(15),
|
receive_timeout: :timer.seconds(15),
|
||||||
proxy_url: nil,
|
proxy_url: nil,
|
||||||
user_agent: :default,
|
user_agent: :default,
|
||||||
pool_size: 50,
|
pool_size: 10,
|
||||||
adapter: []
|
adapter: [],
|
||||||
|
# see: https://hexdocs.pm/finch/Finch.html#start_link/1
|
||||||
|
pool_max_idle_time: :timer.seconds(30)
|
||||||
|
|
||||||
config :pleroma, :instance,
|
config :pleroma, :instance,
|
||||||
name: "Akkoma",
|
name: "Akkoma",
|
||||||
|
@ -437,8 +438,12 @@
|
||||||
Pleroma.Web.RichMedia.Parsers.TwitterCard,
|
Pleroma.Web.RichMedia.Parsers.TwitterCard,
|
||||||
Pleroma.Web.RichMedia.Parsers.OEmbed
|
Pleroma.Web.RichMedia.Parsers.OEmbed
|
||||||
],
|
],
|
||||||
failure_backoff: :timer.minutes(20),
|
failure_backoff: 60_000,
|
||||||
ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
|
ttl_setters: [
|
||||||
|
Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl,
|
||||||
|
Pleroma.Web.RichMedia.Parser.TTL.Opengraph
|
||||||
|
],
|
||||||
|
max_body: 5_000_000
|
||||||
|
|
||||||
config :pleroma, :media_proxy,
|
config :pleroma, :media_proxy,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
@ -576,7 +581,9 @@
|
||||||
mute_expire: 5,
|
mute_expire: 5,
|
||||||
search_indexing: 10,
|
search_indexing: 10,
|
||||||
nodeinfo_fetcher: 1,
|
nodeinfo_fetcher: 1,
|
||||||
database_prune: 1
|
database_prune: 1,
|
||||||
|
rich_media_backfill: 2,
|
||||||
|
rich_media_expiration: 2
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
Oban.Plugins.Pruner,
|
Oban.Plugins.Pruner,
|
||||||
|
@ -592,7 +599,8 @@
|
||||||
retries: [
|
retries: [
|
||||||
federator_incoming: 5,
|
federator_incoming: 5,
|
||||||
federator_outgoing: 5,
|
federator_outgoing: 5,
|
||||||
search_indexing: 2
|
search_indexing: 2,
|
||||||
|
rich_media_backfill: 3
|
||||||
],
|
],
|
||||||
timeout: [
|
timeout: [
|
||||||
activity_expiration: :timer.seconds(5),
|
activity_expiration: :timer.seconds(5),
|
||||||
|
@ -614,7 +622,8 @@
|
||||||
mute_expire: :timer.seconds(5),
|
mute_expire: :timer.seconds(5),
|
||||||
search_indexing: :timer.seconds(5),
|
search_indexing: :timer.seconds(5),
|
||||||
nodeinfo_fetcher: :timer.seconds(10),
|
nodeinfo_fetcher: :timer.seconds(10),
|
||||||
database_prune: :timer.minutes(10)
|
database_prune: :timer.minutes(10),
|
||||||
|
rich_media_backfill: :timer.seconds(30)
|
||||||
]
|
]
|
||||||
|
|
||||||
config :pleroma, Pleroma.Formatter,
|
config :pleroma, Pleroma.Formatter,
|
||||||
|
@ -813,8 +822,10 @@
|
||||||
config :pleroma, configurable_from_database: false
|
config :pleroma, configurable_from_database: false
|
||||||
|
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
parameters: [gin_fuzzy_search_limit: "500"],
|
parameters: [
|
||||||
prepare: :unnamed
|
gin_fuzzy_search_limit: "500",
|
||||||
|
plan_cache_mode: "force_custom_plan"
|
||||||
|
]
|
||||||
|
|
||||||
config :pleroma, :majic_pool, size: 2
|
config :pleroma, :majic_pool, size: 2
|
||||||
|
|
||||||
|
|
|
@ -118,14 +118,6 @@
|
||||||
"font"
|
"font"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
key: :proxy_remote,
|
|
||||||
type: :boolean,
|
|
||||||
description: """
|
|
||||||
Proxy requests to the remote uploader.\n
|
|
||||||
Useful if media upload endpoint is not internet accessible.
|
|
||||||
"""
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
key: :filename_display_max_length,
|
key: :filename_display_max_length,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
|
@ -2717,8 +2709,8 @@
|
||||||
%{
|
%{
|
||||||
key: :pool_size,
|
key: :pool_size,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
description: "Number of concurrent outbound HTTP requests to allow. Default 50.",
|
description: "Number of concurrent outbound HTTP requests to allow PER HOST. Default 10.",
|
||||||
suggestions: [50]
|
suggestions: [10]
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
key: :adapter,
|
key: :adapter,
|
||||||
|
@ -2741,6 +2733,13 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :pool_max_idle_time,
|
||||||
|
type: :integer,
|
||||||
|
description:
|
||||||
|
"Number of seconds to retain an HTTP pool; pool will remain if actively in use. Default 30 seconds (in ms).",
|
||||||
|
suggestions: [30_000]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -51,7 +51,8 @@
|
||||||
hostname: System.get_env("DB_HOST") || "localhost",
|
hostname: System.get_env("DB_HOST") || "localhost",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox,
|
pool: Ecto.Adapters.SQL.Sandbox,
|
||||||
pool_size: 50,
|
pool_size: 50,
|
||||||
queue_target: 5000
|
queue_target: 5000,
|
||||||
|
log: false
|
||||||
|
|
||||||
config :pleroma, :dangerzone, override_repo_pool_size: true
|
config :pleroma, :dangerzone, override_repo_pool_size: true
|
||||||
|
|
||||||
|
@ -63,7 +64,8 @@
|
||||||
config :pleroma, :rich_media,
|
config :pleroma, :rich_media,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
ignore_hosts: [],
|
ignore_hosts: [],
|
||||||
ignore_tld: ["local", "localdomain", "lan"]
|
ignore_tld: ["local", "localdomain", "lan"],
|
||||||
|
max_body: 2_000_000
|
||||||
|
|
||||||
config :pleroma, :instance,
|
config :pleroma, :instance,
|
||||||
multi_factor_authentication: [
|
multi_factor_authentication: [
|
||||||
|
@ -141,6 +143,8 @@
|
||||||
config :pleroma, :instances_favicons, enabled: false
|
config :pleroma, :instances_favicons, enabled: false
|
||||||
config :pleroma, :instances_nodeinfo, enabled: false
|
config :pleroma, :instances_nodeinfo, enabled: false
|
||||||
|
|
||||||
|
config :pleroma, Pleroma.Web.RichMedia.Backfill, provider: Pleroma.Web.RichMedia.Backfill
|
||||||
|
|
||||||
if File.exists?("./config/test.secret.exs") do
|
if File.exists?("./config/test.secret.exs") do
|
||||||
import_config "test.secret.exs"
|
import_config "test.secret.exs"
|
||||||
else
|
else
|
||||||
|
|
10
diagnostic-tools/binary-leak-checker.sh
Executable file
10
diagnostic-tools/binary-leak-checker.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
if [ "$#" -ne 2 ]; then
|
||||||
|
echo "Usage: binary-leak-checker.sh <nodename> <erlang cookie>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "The command you want to run is:
|
||||||
|
:recon.bin_leak(10)
|
||||||
|
"
|
||||||
|
|
||||||
|
iex --sname debug --remsh $1 --erl "-setcookie $2"
|
|
@ -11,4 +11,4 @@ echo "-- Running migrations..."
|
||||||
mix ecto.migrate
|
mix ecto.migrate
|
||||||
|
|
||||||
echo "-- Starting!"
|
echo "-- Starting!"
|
||||||
mix phx.server
|
elixir --erl "+sbwt none +sbwtdcpu none +sbwtdio none" -S mix phx.server
|
||||||
|
|
|
@ -50,9 +50,39 @@ This will prune remote posts older than 90 days (configurable with [`config :ple
|
||||||
|
|
||||||
- `--keep-threads` - Don't prune posts when they are part of a thread where at least one post has seen local interaction (e.g. one of the posts is a local post, or is favourited by a local user, or has been repeated by a local user...). It also wont delete posts when at least one of the posts in that thread is kept (e.g. because one of the posts has seen recent activity).
|
- `--keep-threads` - Don't prune posts when they are part of a thread where at least one post has seen local interaction (e.g. one of the posts is a local post, or is favourited by a local user, or has been repeated by a local user...). It also wont delete posts when at least one of the posts in that thread is kept (e.g. because one of the posts has seen recent activity).
|
||||||
- `--keep-non-public` - Keep non-public posts like DM's and followers-only, even if they are remote.
|
- `--keep-non-public` - Keep non-public posts like DM's and followers-only, even if they are remote.
|
||||||
|
- `--limit` - limits how many remote posts get pruned. This limit does **not** apply to any of the follow up jobs. If wanting to keep the database load in check it is thus advisable to run the standalone `prune_orphaned_activities` task with a limit afterwards instead of passing `--prune-orphaned-activities` to this task.
|
||||||
- `--prune-orphaned-activities` - Also prune orphaned activities afterwards. Activities are things like Like, Create, Announce, Flag (aka reports)... They can significantly help reduce the database size.
|
- `--prune-orphaned-activities` - Also prune orphaned activities afterwards. Activities are things like Like, Create, Announce, Flag (aka reports)... They can significantly help reduce the database size.
|
||||||
- `--vacuum` - Run `VACUUM FULL` after the objects are pruned. This should not be used on a regular basis, but is useful if your instance has been running for a long time before pruning.
|
- `--vacuum` - Run `VACUUM FULL` after the objects are pruned. This should not be used on a regular basis, but is useful if your instance has been running for a long time before pruning.
|
||||||
|
|
||||||
|
## Prune orphaned activities from the database
|
||||||
|
|
||||||
|
This will prune activities which are no longer referenced by anything.
|
||||||
|
Such activities might be the result of running `prune_objects` without `--prune-orphaned-activities`.
|
||||||
|
The same notes and warnings apply as for `prune_objects`.
|
||||||
|
|
||||||
|
The task will print out how many rows were freed in total in its last
|
||||||
|
line of output in the form `Deleted 345 rows`.
|
||||||
|
When running the job in limited batches this can be used to determine
|
||||||
|
when all orphaned activities have been deleted.
|
||||||
|
|
||||||
|
=== "OTP"
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./bin/pleroma_ctl database prune_orphaned_activities [option ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "From Source"
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mix pleroma.database prune_orphaned_activities [option ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
- `--limit n` - Only delete up to `n` activities in each query making up this job, i.e. if this job runs two queries at most `2n` activities will be deleted. Running this task repeatedly in limited batches can help maintain the instance’s responsiveness while still freeing up some space.
|
||||||
|
- `--no-singles` - Do not delete activites referencing single objects
|
||||||
|
- `--no-arrays` - Do not delete activites referencing an array of objects
|
||||||
|
|
||||||
## Create a conversation for all existing DMs
|
## Create a conversation for all existing DMs
|
||||||
|
|
||||||
Can be safely re-run
|
Can be safely re-run
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
|
|
||||||
1. Stop the Akkoma service.
|
1. Stop the Akkoma service.
|
||||||
2. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
2. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||||
3. Run[¹] `sudo -Hu postgres pg_dump -d akkoma --format=custom -f </path/to/backup_location/akkoma.pgdump>` (make sure the postgres user has write access to the destination file)
|
3. Run `sudo -Hu postgres pg_dump -d akkoma --format=custom -f </path/to/backup_location/akkoma.pgdump>`[¹] (make sure the postgres user has write access to the destination file)
|
||||||
4. Copy `akkoma.pgdump`, `config/prod.secret.exs`[²], `config/setup_db.psql` (if still available) and the `uploads` folder to your backup destination. If you have other modifications, copy those changes too.
|
4. Copy `akkoma.pgdump`, `config/config.exs`[²], `uploads` folder, and [static directory](../configuration/static_dir.md) to your backup destination. If you have other modifications, copy those changes too.
|
||||||
5. Restart the Akkoma service.
|
5. Restart the Akkoma service.
|
||||||
|
|
||||||
[¹]: We assume the database name is "akkoma". If not, you can find the correct name in your config files.
|
[¹]: We assume the database name is "akkoma". If not, you can find the correct name in your configuration files.
|
||||||
[²]: If you've installed using OTP, you need `config/config.exs` instead of `config/prod.secret.exs`.
|
[²]: If you have a from source installation, you need `config/prod.secret.exs` instead of `config/config.exs`. The `config/config.exs` file also exists, but in case of from source installations, it only contains the default values and it is tracked by Git, so you don't need to back it up.
|
||||||
|
|
||||||
## Restore/Move
|
## Restore/Move
|
||||||
|
|
||||||
|
@ -17,19 +17,16 @@
|
||||||
2. Stop the Akkoma service.
|
2. Stop the Akkoma service.
|
||||||
3. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
3. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
||||||
4. Copy the above mentioned files back to their original position.
|
4. Copy the above mentioned files back to their original position.
|
||||||
5. Drop the existing database and user if restoring in-place[¹]. `sudo -Hu postgres psql -c 'DROP DATABASE akkoma;';` `sudo -Hu postgres psql -c 'DROP USER akkoma;'`
|
5. Drop the existing database and user[¹]. `sudo -Hu postgres psql -c 'DROP DATABASE akkoma;';` `sudo -Hu postgres psql -c 'DROP USER akkoma;'`
|
||||||
6. Restore the database schema and akkoma role using either of the following options
|
6. Restore the database schema and akkoma role[¹] (replace the password with the one you find in the configuration file), `sudo -Hu postgres psql -c "CREATE USER akkoma WITH ENCRYPTED PASSWORD '<database-password-wich-you-can-find-in-your-configuration-file>';"` `sudo -Hu postgres psql -c "CREATE DATABASE akkoma OWNER akkoma;"`.
|
||||||
* You can use the original `setup_db.psql` if you have it[²]: `sudo -Hu postgres psql -f config/setup_db.psql`.
|
|
||||||
* Or recreate the database and user yourself (replace the password with the one you find in the config file) `sudo -Hu postgres psql -c "CREATE USER akkoma WITH ENCRYPTED PASSWORD '<database-password-wich-you-can-find-in-your-config-file>'; CREATE DATABASE akkoma OWNER akkoma;"`.
|
|
||||||
7. Now restore the Akkoma instance's data into the empty database schema[¹]: `sudo -Hu postgres pg_restore -d akkoma -v -1 </path/to/backup_location/akkoma.pgdump>`
|
7. Now restore the Akkoma instance's data into the empty database schema[¹]: `sudo -Hu postgres pg_restore -d akkoma -v -1 </path/to/backup_location/akkoma.pgdump>`
|
||||||
8. If you installed a newer Akkoma version, you should run `MIX_ENV=prod mix ecto.migrate`[³]. This task performs database migrations, if there were any.
|
8. If you installed a newer Akkoma version, you should run the database migrations `./bin/pleroma_ctl migrate`[²].
|
||||||
9. Restart the Akkoma service.
|
9. Restart the Akkoma service.
|
||||||
10. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
|
10. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
|
||||||
11. If setting up on a new server configure Nginx by using the `installation/akkoma.nginx` config sample or reference the Akkoma installation guide for your OS which contains the Nginx configuration instructions.
|
11. If setting up on a new server, configure Nginx by using the `installation/nginx/akkoma.nginx` configuration sample or reference the Akkoma installation guide which contains the Nginx configuration instructions.
|
||||||
|
|
||||||
[¹]: We assume the database name and user are both "akkoma". If not, you can find the correct name in your config files.
|
[¹]: We assume the database name and user are both "akkoma". If not, you can find the correct name in your configuration files.
|
||||||
[²]: You can recreate the `config/setup_db.psql` by running the `mix pleroma.instance gen` task again. You can ignore most of the questions, but make the database user, name, and password the same as found in your backed up config file. This will also create a new `config/generated_config.exs` file which you may delete as it is not needed.
|
[²]: If you have a from source installation, the command is `MIX_ENV=prod mix ecto.migrate`. Note that we prefix with `MIX_ENV=prod` to use the `config/prod.secret.exs` configuration file.
|
||||||
[³]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
|
||||||
|
|
||||||
## Remove
|
## Remove
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,7 @@ config :pleroma, :frontends,
|
||||||
|
|
||||||
* `:primary` - The frontend that will be served at `/`
|
* `:primary` - The frontend that will be served at `/`
|
||||||
* `:admin` - The frontend that will be served at `/pleroma/admin`
|
* `:admin` - The frontend that will be served at `/pleroma/admin`
|
||||||
* `:swagger` - Config for developers to act as an API reference to be served at `/akkoma/swaggerui/` (trailing slash _needed_). Disabled by default.
|
* `:swagger` - Config for developers to act as an API reference to be served at `/pleroma/swaggerui/` (trailing slash _needed_). Disabled by default.
|
||||||
* `:mastodon` - The mastodon-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed.
|
* `:mastodon` - The mastodon-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed.
|
||||||
|
|
||||||
### :static\_fe
|
### :static\_fe
|
||||||
|
@ -605,7 +605,6 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
|
||||||
* `link_name`: When enabled Akkoma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers
|
* `link_name`: When enabled Akkoma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers
|
||||||
* `base_url`: The base URL to access a user-uploaded file; MUST be configured explicitly.
|
* `base_url`: The base URL to access a user-uploaded file; MUST be configured explicitly.
|
||||||
Using a (sub)domain distinct from the instance endpoint is **strongly** recommended. A good value might be `https://media.myakkoma.instance/media/`.
|
Using a (sub)domain distinct from the instance endpoint is **strongly** recommended. A good value might be `https://media.myakkoma.instance/media/`.
|
||||||
* `proxy_remote`: If you're using a remote uploader, Akkoma will proxy media requests instead of redirecting to it.
|
|
||||||
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
|
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
|
||||||
* `filename_display_max_length`: Set max length of a filename to display. 0 = no limit. Default: 30.
|
* `filename_display_max_length`: Set max length of a filename to display. 0 = no limit. Default: 30.
|
||||||
|
|
||||||
|
|
|
@ -60,4 +60,4 @@ config :pleroma, :frontends,
|
||||||
|
|
||||||
Then run the [pleroma.frontend cli task](../../administration/CLI_tasks/frontend) with the name of `swagger-ui` to install the distribution files.
|
Then run the [pleroma.frontend cli task](../../administration/CLI_tasks/frontend) with the name of `swagger-ui` to install the distribution files.
|
||||||
|
|
||||||
You will now be able to view documentation at `/akkoma/swaggerui`
|
You will now be able to view documentation at `/pleroma/swaggerui`
|
||||||
|
|
|
@ -4,47 +4,10 @@ Akkoma performance is largely dependent on performance of the underlying databas
|
||||||
|
|
||||||
## PGTune
|
## PGTune
|
||||||
|
|
||||||
[PgTune](https://pgtune.leopard.in.ua) can be used to get recommended settings. Be sure to set "Number of Connections" to 20, otherwise it might produce settings hurtful to database performance. It is also recommended to not use "Network Storage" option.
|
[PgTune](https://pgtune.leopard.in.ua) can be used to get recommended settings. Make sure to set the DB type to "Online transaction processing system" for optimal performance. Also set the number of connections to between 25 and 30. This will allow each connection to have access to more resources while still leaving some room for running maintenance tasks while the instance is still running.
|
||||||
|
|
||||||
If your server runs other services, you may want to take that into account. E.g. if you have 4G ram, but 1G of it is already used for other services, it may be better to tell PGTune you only have 3G. In the end, PGTune only provides recomended settings, you can always try to finetune further.
|
It is also recommended to not use "Network Storage" option.
|
||||||
|
|
||||||
### Example configurations
|
If your server runs other services, you may want to take that into account. E.g. if you have 4G ram, but 1G of it is already used for other services, it may be better to tell PGTune you only have 3G.
|
||||||
|
|
||||||
Here are some configuration suggestions for PostgreSQL 10+.
|
In the end, PGTune only provides recomended settings, you can always try to finetune further.
|
||||||
|
|
||||||
#### 1GB RAM, 1 CPU
|
|
||||||
```
|
|
||||||
shared_buffers = 256MB
|
|
||||||
effective_cache_size = 768MB
|
|
||||||
maintenance_work_mem = 64MB
|
|
||||||
work_mem = 13107kB
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 2GB RAM, 2 CPU
|
|
||||||
```
|
|
||||||
shared_buffers = 512MB
|
|
||||||
effective_cache_size = 1536MB
|
|
||||||
maintenance_work_mem = 128MB
|
|
||||||
work_mem = 26214kB
|
|
||||||
max_worker_processes = 2
|
|
||||||
max_parallel_workers_per_gather = 1
|
|
||||||
max_parallel_workers = 2
|
|
||||||
```
|
|
||||||
|
|
||||||
## Disable generic query plans
|
|
||||||
|
|
||||||
When PostgreSQL receives a query, it decides on a strategy for searching the requested data, this is called a query plan. The query planner has two modes: generic and custom. Generic makes a plan for all queries of the same shape, ignoring the parameters, which is then cached and reused. Custom, on the contrary, generates a unique query plan based on query parameters.
|
|
||||||
|
|
||||||
By default PostgreSQL has an algorithm to decide which mode is more efficient for particular query, however this algorithm has been observed to be wrong on some of the queries Akkoma sends, leading to serious performance loss. Therefore, it is recommended to disable generic mode.
|
|
||||||
|
|
||||||
|
|
||||||
Akkoma already avoids generic query plans by default, however the method it uses is not the most efficient because it needs to be compatible with all supported PostgreSQL versions. For PostgreSQL 12 and higher additional performance can be gained by adding the following to Akkoma configuration:
|
|
||||||
```elixir
|
|
||||||
config :pleroma, Pleroma.Repo,
|
|
||||||
prepare: :named,
|
|
||||||
parameters: [
|
|
||||||
plan_cache_mode: "force_custom_plan"
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
A more detailed explaination of the issue can be found at <https://blog.soykaf.com/post/postgresql-elixir-troubles/>.
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ as soon as the post is received by your instance.
|
||||||
|
|
||||||
## Nginx
|
## Nginx
|
||||||
|
|
||||||
The following are excerpts from the [suggested nginx config](../../../installation/nginx/akkoma.nginx) that demonstrates the necessary config for the media proxy to work.
|
The following are excerpts from the [suggested nginx config](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/installation/nginx/akkoma.nginx) that demonstrates the necessary config for the media proxy to work.
|
||||||
|
|
||||||
A `proxy_cache_path` must be defined, for example:
|
A `proxy_cache_path` must be defined, for example:
|
||||||
|
|
||||||
|
|
|
@ -1033,7 +1033,6 @@ Most of the settings will be applied in `runtime`, this means that you don't nee
|
||||||
- `:pools`
|
- `:pools`
|
||||||
- partially settings inside these keys:
|
- partially settings inside these keys:
|
||||||
- `:seconds_valid` in `Pleroma.Captcha`
|
- `:seconds_valid` in `Pleroma.Captcha`
|
||||||
- `:proxy_remote` in `Pleroma.Upload`
|
|
||||||
- `:upload_limit` in `:instance`
|
- `:upload_limit` in `:instance`
|
||||||
|
|
||||||
- Params:
|
- Params:
|
||||||
|
@ -1094,7 +1093,6 @@ List of settings which support only full update by subkey:
|
||||||
{"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
|
{"tuple": [":uploader", "Pleroma.Uploaders.Local"]},
|
||||||
{"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
|
{"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
|
||||||
{"tuple": [":link_name", true]},
|
{"tuple": [":link_name", true]},
|
||||||
{"tuple": [":proxy_remote", false]},
|
|
||||||
{"tuple": [":proxy_opts", [
|
{"tuple": [":proxy_opts", [
|
||||||
{"tuple": [":redirect_on_failure", false]},
|
{"tuple": [":redirect_on_failure", false]},
|
||||||
{"tuple": [":max_body_length", 1048576]},
|
{"tuple": [":max_body_length", 1048576]},
|
||||||
|
|
|
@ -6,7 +6,9 @@ probably install frontends.
|
||||||
These are no longer bundled with the distribution and need an extra
|
These are no longer bundled with the distribution and need an extra
|
||||||
command to install.
|
command to install.
|
||||||
|
|
||||||
For most installations, the following will suffice:
|
You **must** run frontend management tasks as the akkoma user,
|
||||||
|
the same way you downloaded the build or cloned the git repo before.
|
||||||
|
But otherwise, for most installations, the following will suffice:
|
||||||
|
|
||||||
=== "OTP"
|
=== "OTP"
|
||||||
```sh
|
```sh
|
||||||
|
@ -28,4 +30,3 @@ For most installations, the following will suffice:
|
||||||
```
|
```
|
||||||
|
|
||||||
For more customised installations, refer to [Frontend Management](../../configuration/frontend_management)
|
For more customised installations, refer to [Frontend Management](../../configuration/frontend_management)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
## Required dependencies
|
## Required dependencies
|
||||||
|
|
||||||
* PostgreSQL 9.6+
|
* PostgreSQL 12+
|
||||||
* Elixir 1.14+ (currently tested up to 1.16)
|
* Elixir 1.14+ (currently tested up to 1.16)
|
||||||
* Erlang OTP 25+ (currently tested up to OTP26)
|
* Erlang OTP 25+ (currently tested up to OTP26)
|
||||||
* git
|
* git
|
||||||
|
|
|
@ -19,6 +19,9 @@ Environment="MIX_ENV=prod"
|
||||||
; Don't listen epmd on 0.0.0.0
|
; Don't listen epmd on 0.0.0.0
|
||||||
Environment="ERL_EPMD_ADDRESS=127.0.0.1"
|
Environment="ERL_EPMD_ADDRESS=127.0.0.1"
|
||||||
|
|
||||||
|
; Don't busy wait
|
||||||
|
Environment="ERL_AFLAGS=+sbwt none +sbwtdcpu none +sbwtdio none"
|
||||||
|
|
||||||
; Make sure that all paths fit your installation.
|
; Make sure that all paths fit your installation.
|
||||||
; Path to the home directory of the user running the Akkoma service.
|
; Path to the home directory of the user running the Akkoma service.
|
||||||
Environment="HOME=/var/lib/akkoma"
|
Environment="HOME=/var/lib/akkoma"
|
||||||
|
|
|
@ -12,26 +12,22 @@ example.tld {
|
||||||
output file /var/log/caddy/akkoma.log
|
output file /var/log/caddy/akkoma.log
|
||||||
}
|
}
|
||||||
|
|
||||||
encode gzip
|
|
||||||
|
|
||||||
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
||||||
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
||||||
reverse_proxy 127.0.0.1:4000
|
reverse_proxy 127.0.0.1:4000
|
||||||
|
|
||||||
# Uncomment if using a separate media subdomain
|
@mediaproxy path /media/* /proxy/*
|
||||||
#@mediaproxy path /media/* /proxy/*
|
handle @mediaproxy {
|
||||||
#handle @mediaproxy {
|
redir https://media.example.tld{uri} permanent
|
||||||
# redir https://media.example.tld{uri} permanent
|
}
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Uncomment if using a separate media subdomain
|
media.example.tld {
|
||||||
#media.example.tld {
|
@mediaproxy path /media/* /proxy/*
|
||||||
# @mediaproxy path /media/* /proxy/*
|
reverse_proxy @mediaproxy 127.0.0.1:4000 {
|
||||||
# reverse_proxy @mediaproxy 127.0.0.1:4000 {
|
transport http {
|
||||||
# transport http {
|
response_header_timeout 10s
|
||||||
# response_header_timeout 10s
|
read_timeout 15s
|
||||||
# read_timeout 15s
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
#}
|
|
||||||
|
|
|
@ -1,23 +1,43 @@
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
supervisor=supervise-daemon
|
supervisor=supervise-daemon
|
||||||
command_user=akkoma:akkoma
|
|
||||||
command_background=1
|
|
||||||
# Ask process to terminate within 30 seconds, otherwise kill it
|
|
||||||
retry="SIGTERM/30/SIGKILL/5"
|
|
||||||
pidfile="/var/run/akkoma.pid"
|
|
||||||
directory=/opt/akkoma
|
|
||||||
healthcheck_delay=60
|
|
||||||
healthcheck_timer=30
|
|
||||||
no_new_privs="yes"
|
no_new_privs="yes"
|
||||||
|
pidfile="/var/run/akkoma.pid"
|
||||||
|
|
||||||
: ${akkoma_port:-4000}
|
# Ask process first to terminate itself within 60s, otherwise kill it
|
||||||
|
retry="SIGTERM/60/SIGKILL/5"
|
||||||
|
|
||||||
# Needs OpenRC >= 0.42
|
# if you really want to use start-stop-daemon instead,
|
||||||
#respawn_max=0
|
# also put the following in the config:
|
||||||
#respawn_delay=5
|
# command_background=1
|
||||||
|
|
||||||
|
# Adjust defaults as needed in /etc/conf.d/akkoma;
|
||||||
|
# no need to directly edit the service file
|
||||||
|
command_user="${command_user:-akkoma:akkoma}"
|
||||||
|
directory="${directory:-/var/lib/akkoma/akkoma}"
|
||||||
|
akkoma_port="${akkoma_port:-4000}"
|
||||||
|
# whether to allow connecting a remote exlixir shell to the running Akkoma instance
|
||||||
|
akkoma_console=${akkoma_console:-NO}
|
||||||
|
|
||||||
|
output_log="${output_log:-/var/log/akkoma}"
|
||||||
|
error_log="${error_log:-/var/log/akkoma}"
|
||||||
|
|
||||||
|
# 0 means unlimited restarts
|
||||||
|
respawn_max="${respawn_max:-0}"
|
||||||
|
respawn_delay="${respawn_delay:-5}"
|
||||||
|
# define respawn period to only count crashes within a
|
||||||
|
# sliding time window towards respawn_max, e.g.:
|
||||||
|
# respawn_period=2850
|
||||||
|
|
||||||
|
healthcheck_delay="${healthcheck_delay:-60}"
|
||||||
|
healthcheck_timer="${healthcheck_timer:-30}"
|
||||||
|
|
||||||
|
MIX_ENV=prod
|
||||||
|
ERL_EPMD_ADDRESS="${ERL_EPMD_ADDRESS:-127.0.0.1}"
|
||||||
|
ERL_AFLAGS="${ERL_AFLAGS:-+sbwt none +sbwtdcpu none +sbwtdio none}"
|
||||||
|
supervise_daemon_args="${supervise_daemon_args} --env MIX_ENV=${MIX_ENV}"
|
||||||
|
supervise_daemon_args="${supervise_daemon_args} --env ERL_EPMD_ADDRESS=${ERL_EPMD_ADDRESS}"
|
||||||
|
supervise_daemon_args="${supervise_daemon_args} --env ERL_AFLAGS='${ERL_AFLAGS}'"
|
||||||
|
|
||||||
# put akkoma_console=YES in /etc/conf.d/akkoma if you want to be able to
|
|
||||||
# connect to akkoma via an elixir console
|
|
||||||
if yesno "${akkoma_console}"; then
|
if yesno "${akkoma_console}"; then
|
||||||
command=elixir
|
command=elixir
|
||||||
command_args="--name akkoma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
command_args="--name akkoma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
||||||
|
@ -31,13 +51,24 @@ else
|
||||||
command_args="phx.server"
|
command_args="phx.server"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export MIX_ENV=prod
|
|
||||||
export ERL_EPMD_ADDRESS=127.0.0.1
|
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need nginx postgresql
|
need nginx postgresql
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
# Ensure logfile ownership and perms are alright
|
||||||
|
checkpath --file --owner "$command_user" "$output_log" "$error_log" \
|
||||||
|
|| eerror "Logfile(s) not owned by $command_user, or not a file!"
|
||||||
|
checkpath --writable "$output_log" "$error_log" \
|
||||||
|
|| eerror "Logfile(s) not writable!"
|
||||||
|
|
||||||
|
# If a recompile is needed perform it with lowest prio
|
||||||
|
# (delaying the actual start) to avoid hogging too much
|
||||||
|
# CPU from other services
|
||||||
|
cd "$directory"
|
||||||
|
doas -u "${command_user%%:*}" env MIX_ENV="$MIX_ENV" nice -n 19 "$command" compile
|
||||||
|
}
|
||||||
|
|
||||||
healthcheck() {
|
healthcheck() {
|
||||||
# put akkoma_health=YES in /etc/conf.d/akkoma if you want healthchecking
|
# put akkoma_health=YES in /etc/conf.d/akkoma if you want healthchecking
|
||||||
# and make sure you have curl installed
|
# and make sure you have curl installed
|
||||||
|
|
|
@ -112,18 +112,26 @@ def shell_prompt(prompt, defval \\ nil, defname \\ nil) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def shell_info(message) do
|
def shell_info(message) when is_binary(message) or is_list(message) do
|
||||||
if mix_shell?(),
|
if mix_shell?(),
|
||||||
do: Mix.shell().info(message),
|
do: Mix.shell().info(message),
|
||||||
else: IO.puts(message)
|
else: IO.puts(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def shell_error(message) do
|
def shell_info(message) do
|
||||||
|
shell_info("#{inspect(message)}")
|
||||||
|
end
|
||||||
|
|
||||||
|
def shell_error(message) when is_binary(message) or is_list(message) do
|
||||||
if mix_shell?(),
|
if mix_shell?(),
|
||||||
do: Mix.shell().error(message),
|
do: Mix.shell().error(message),
|
||||||
else: IO.puts(:stderr, message)
|
else: IO.puts(:stderr, message)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def shell_error(message) do
|
||||||
|
shell_error("#{inspect(message)}")
|
||||||
|
end
|
||||||
|
|
||||||
@doc "Performs a safe check whether `Mix.shell/0` is available (does not raise if Mix is not loaded)"
|
@doc "Performs a safe check whether `Mix.shell/0` is available (does not raise if Mix is not loaded)"
|
||||||
def mix_shell?, do: :erlang.function_exported(Mix, :shell, 0)
|
def mix_shell?, do: :erlang.function_exported(Mix, :shell, 0)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ defmodule Mix.Tasks.Pleroma.Activity do
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
alias Pleroma.Pagination
|
alias Pleroma.Pagination
|
||||||
require Logger
|
|
||||||
import Mix.Pleroma
|
import Mix.Pleroma
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ def run(["get", id | _rest]) do
|
||||||
|
|
||||||
id
|
id
|
||||||
|> Activity.get_by_id()
|
|> Activity.get_by_id()
|
||||||
|> IO.inspect()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["delete_by_keyword", user, keyword | _rest]) do
|
def run(["delete_by_keyword", user, keyword | _rest]) do
|
||||||
|
@ -35,7 +34,7 @@ def run(["delete_by_keyword", user, keyword | _rest]) do
|
||||||
)
|
)
|
||||||
|> Enum.map(fn x -> CommonAPI.delete(x.id, u) end)
|
|> Enum.map(fn x -> CommonAPI.delete(x.id, u) end)
|
||||||
|> Enum.count()
|
|> Enum.count()
|
||||||
|> IO.puts()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp query_with(q, search_query) do
|
defp query_with(q, search_query) do
|
||||||
|
|
|
@ -20,6 +20,102 @@ defmodule Mix.Tasks.Pleroma.Database do
|
||||||
@shortdoc "A collection of database related tasks"
|
@shortdoc "A collection of database related tasks"
|
||||||
@moduledoc File.read!("docs/docs/administration/CLI_tasks/database.md")
|
@moduledoc File.read!("docs/docs/administration/CLI_tasks/database.md")
|
||||||
|
|
||||||
|
defp maybe_limit(query, limit_cnt) do
|
||||||
|
if is_number(limit_cnt) and limit_cnt > 0 do
|
||||||
|
limit(query, [], ^limit_cnt)
|
||||||
|
else
|
||||||
|
query
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp limit_statement(limit) when is_number(limit) do
|
||||||
|
if limit > 0 do
|
||||||
|
"LIMIT #{limit}"
|
||||||
|
else
|
||||||
|
""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp prune_orphaned_activities_singles(limit) do
|
||||||
|
%{:num_rows => del_single} =
|
||||||
|
"""
|
||||||
|
delete from public.activities
|
||||||
|
where id in (
|
||||||
|
select a.id from public.activities a
|
||||||
|
left join public.objects o on a.data ->> 'object' = o.data ->> 'id'
|
||||||
|
left join public.activities a2 on a.data ->> 'object' = a2.data ->> 'id'
|
||||||
|
left join public.users u on a.data ->> 'object' = u.ap_id
|
||||||
|
where not a.local
|
||||||
|
and jsonb_typeof(a."data" -> 'object') = 'string'
|
||||||
|
and o.id is null
|
||||||
|
and a2.id is null
|
||||||
|
and u.id is null
|
||||||
|
#{limit_statement(limit)}
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
|> Repo.query!([], timeout: :infinity)
|
||||||
|
|
||||||
|
Logger.info("Prune activity singles: deleted #{del_single} rows...")
|
||||||
|
del_single
|
||||||
|
end
|
||||||
|
|
||||||
|
defp prune_orphaned_activities_array(limit) do
|
||||||
|
%{:num_rows => del_array} =
|
||||||
|
"""
|
||||||
|
delete from public.activities
|
||||||
|
where id in (
|
||||||
|
select a.id from public.activities a
|
||||||
|
join json_array_elements_text((a."data" -> 'object')::json) as j
|
||||||
|
on a.data->>'type' = 'Flag'
|
||||||
|
left join public.objects o on j.value = o.data ->> 'id'
|
||||||
|
left join public.activities a2 on j.value = a2.data ->> 'id'
|
||||||
|
left join public.users u on j.value = u.ap_id
|
||||||
|
group by a.id
|
||||||
|
having max(o.data ->> 'id') is null
|
||||||
|
and max(a2.data ->> 'id') is null
|
||||||
|
and max(u.ap_id) is null
|
||||||
|
#{limit_statement(limit)}
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
|> Repo.query!([], timeout: :infinity)
|
||||||
|
|
||||||
|
Logger.info("Prune activity arrays: deleted #{del_array} rows...")
|
||||||
|
del_array
|
||||||
|
end
|
||||||
|
|
||||||
|
def prune_orphaned_activities(limit \\ 0, opts \\ []) when is_number(limit) do
|
||||||
|
# Activities can either refer to a single object id, and array of object ids
|
||||||
|
# or contain an inlined object (at least after going through our normalisation)
|
||||||
|
#
|
||||||
|
# Flag is the only type we support with an array (and always has arrays).
|
||||||
|
# Update the only one with inlined objects.
|
||||||
|
#
|
||||||
|
# We already regularly purge old Delete, Undo, Update and Remove and if
|
||||||
|
# rejected Follow requests anyway; no need to explicitly deal with those here.
|
||||||
|
#
|
||||||
|
# Since there’s an index on types and there are typically only few Flag
|
||||||
|
# activites, it’s _much_ faster to utilise the index. To avoid accidentally
|
||||||
|
# deleting useful activities should more types be added, keep typeof for singles.
|
||||||
|
|
||||||
|
# Prune activities who link to an array of objects
|
||||||
|
del_array =
|
||||||
|
if Keyword.get(opts, :arrays, true) do
|
||||||
|
prune_orphaned_activities_array(limit)
|
||||||
|
else
|
||||||
|
0
|
||||||
|
end
|
||||||
|
|
||||||
|
# Prune activities who link to a single object
|
||||||
|
del_single =
|
||||||
|
if Keyword.get(opts, :singles, true) do
|
||||||
|
prune_orphaned_activities_singles(limit)
|
||||||
|
else
|
||||||
|
0
|
||||||
|
end
|
||||||
|
|
||||||
|
del_single + del_array
|
||||||
|
end
|
||||||
|
|
||||||
def run(["remove_embedded_objects" | args]) do
|
def run(["remove_embedded_objects" | args]) do
|
||||||
{options, [], []} =
|
{options, [], []} =
|
||||||
OptionParser.parse(
|
OptionParser.parse(
|
||||||
|
@ -62,6 +158,37 @@ def run(["update_users_following_followers_counts"]) do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def run(["prune_orphaned_activities" | args]) do
|
||||||
|
{options, [], []} =
|
||||||
|
OptionParser.parse(
|
||||||
|
args,
|
||||||
|
strict: [
|
||||||
|
limit: :integer,
|
||||||
|
singles: :boolean,
|
||||||
|
arrays: :boolean
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
start_pleroma()
|
||||||
|
|
||||||
|
{limit, options} = Keyword.pop(options, :limit, 0)
|
||||||
|
|
||||||
|
log_message = "Pruning orphaned activities"
|
||||||
|
|
||||||
|
log_message =
|
||||||
|
if limit > 0 do
|
||||||
|
log_message <> ", limiting deletion to #{limit} rows"
|
||||||
|
else
|
||||||
|
log_message
|
||||||
|
end
|
||||||
|
|
||||||
|
Logger.info(log_message)
|
||||||
|
|
||||||
|
deleted = prune_orphaned_activities(limit, options)
|
||||||
|
|
||||||
|
Logger.info("Deleted #{deleted} rows")
|
||||||
|
end
|
||||||
|
|
||||||
def run(["prune_objects" | args]) do
|
def run(["prune_objects" | args]) do
|
||||||
{options, [], []} =
|
{options, [], []} =
|
||||||
OptionParser.parse(
|
OptionParser.parse(
|
||||||
|
@ -70,7 +197,8 @@ def run(["prune_objects" | args]) do
|
||||||
vacuum: :boolean,
|
vacuum: :boolean,
|
||||||
keep_threads: :boolean,
|
keep_threads: :boolean,
|
||||||
keep_non_public: :boolean,
|
keep_non_public: :boolean,
|
||||||
prune_orphaned_activities: :boolean
|
prune_orphaned_activities: :boolean,
|
||||||
|
limit: :integer
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -79,6 +207,8 @@ def run(["prune_objects" | args]) do
|
||||||
deadline = Pleroma.Config.get([:instance, :remote_post_retention_days])
|
deadline = Pleroma.Config.get([:instance, :remote_post_retention_days])
|
||||||
time_deadline = NaiveDateTime.utc_now() |> NaiveDateTime.add(-(deadline * 86_400))
|
time_deadline = NaiveDateTime.utc_now() |> NaiveDateTime.add(-(deadline * 86_400))
|
||||||
|
|
||||||
|
limit_cnt = Keyword.get(options, :limit, 0)
|
||||||
|
|
||||||
log_message = "Pruning objects older than #{deadline} days"
|
log_message = "Pruning objects older than #{deadline} days"
|
||||||
|
|
||||||
log_message =
|
log_message =
|
||||||
|
@ -110,8 +240,16 @@ def run(["prune_objects" | args]) do
|
||||||
log_message
|
log_message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
log_message =
|
||||||
|
if limit_cnt > 0 do
|
||||||
|
log_message <> ", limiting to #{limit_cnt} rows"
|
||||||
|
else
|
||||||
|
log_message
|
||||||
|
end
|
||||||
|
|
||||||
Logger.info(log_message)
|
Logger.info(log_message)
|
||||||
|
|
||||||
|
{del_obj, _} =
|
||||||
if Keyword.get(options, :keep_threads) do
|
if Keyword.get(options, :keep_threads) do
|
||||||
# We want to delete objects from threads where
|
# We want to delete objects from threads where
|
||||||
# 1. the newest post is still old
|
# 1. the newest post is still old
|
||||||
|
@ -143,11 +281,13 @@ def run(["prune_objects" | args]) do
|
||||||
|> having([a], max(a.updated_at) < ^time_deadline)
|
|> having([a], max(a.updated_at) < ^time_deadline)
|
||||||
|> having([a], not fragment("bool_or(?)", a.local))
|
|> having([a], not fragment("bool_or(?)", a.local))
|
||||||
|> having([_, b], fragment("max(?::text) is null", b.id))
|
|> having([_, b], fragment("max(?::text) is null", b.id))
|
||||||
|
|> maybe_limit(limit_cnt)
|
||||||
|> select([a], fragment("? ->> 'context'::text", a.data))
|
|> select([a], fragment("? ->> 'context'::text", a.data))
|
||||||
|
|
||||||
Pleroma.Object
|
Pleroma.Object
|
||||||
|> where([o], fragment("? ->> 'context'::text", o.data) in subquery(deletable_context))
|
|> where([o], fragment("? ->> 'context'::text", o.data) in subquery(deletable_context))
|
||||||
else
|
else
|
||||||
|
deletable =
|
||||||
if Keyword.get(options, :keep_non_public) do
|
if Keyword.get(options, :keep_non_public) do
|
||||||
Pleroma.Object
|
Pleroma.Object
|
||||||
|> where(
|
|> where(
|
||||||
|
@ -168,12 +308,20 @@ def run(["prune_objects" | args]) do
|
||||||
[o],
|
[o],
|
||||||
fragment("split_part(?->>'actor', '/', 3) != ?", o.data, ^Pleroma.Web.Endpoint.host())
|
fragment("split_part(?->>'actor', '/', 3) != ?", o.data, ^Pleroma.Web.Endpoint.host())
|
||||||
)
|
)
|
||||||
|
|> maybe_limit(limit_cnt)
|
||||||
|
|> select([o], o.id)
|
||||||
|
|
||||||
|
Pleroma.Object
|
||||||
|
|> where([o], o.id in subquery(deletable))
|
||||||
end
|
end
|
||||||
|> Repo.delete_all(timeout: :infinity)
|
|> Repo.delete_all(timeout: :infinity)
|
||||||
|
|
||||||
|
Logger.info("Deleted #{del_obj} objects...")
|
||||||
|
|
||||||
if !Keyword.get(options, :keep_threads) do
|
if !Keyword.get(options, :keep_threads) do
|
||||||
# Without the --keep-threads option, it's possible that bookmarked
|
# Without the --keep-threads option, it's possible that bookmarked
|
||||||
# objects have been deleted. We remove the corresponding bookmarks.
|
# objects have been deleted. We remove the corresponding bookmarks.
|
||||||
|
%{:num_rows => del_bookmarks} =
|
||||||
"""
|
"""
|
||||||
delete from public.bookmarks
|
delete from public.bookmarks
|
||||||
where id in (
|
where id in (
|
||||||
|
@ -183,56 +331,33 @@ def run(["prune_objects" | args]) do
|
||||||
where o.id is null
|
where o.id is null
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
|> Repo.query([], timeout: :infinity)
|
|> Repo.query!([], timeout: :infinity)
|
||||||
|
|
||||||
|
Logger.info("Deleted #{del_bookmarks} orphaned bookmarks...")
|
||||||
end
|
end
|
||||||
|
|
||||||
if Keyword.get(options, :prune_orphaned_activities) do
|
if Keyword.get(options, :prune_orphaned_activities) do
|
||||||
# Prune activities who link to a single object
|
del_activities = prune_orphaned_activities()
|
||||||
"""
|
Logger.info("Deleted #{del_activities} orphaned activities...")
|
||||||
delete from public.activities
|
|
||||||
where id in (
|
|
||||||
select a.id from public.activities a
|
|
||||||
left join public.objects o on a.data ->> 'object' = o.data ->> 'id'
|
|
||||||
left join public.activities a2 on a.data ->> 'object' = a2.data ->> 'id'
|
|
||||||
left join public.users u on a.data ->> 'object' = u.ap_id
|
|
||||||
where not a.local
|
|
||||||
and jsonb_typeof(a."data" -> 'object') = 'string'
|
|
||||||
and o.id is null
|
|
||||||
and a2.id is null
|
|
||||||
and u.id is null
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
|> Repo.query([], timeout: :infinity)
|
|
||||||
|
|
||||||
# Prune activities who link to an array of objects
|
|
||||||
"""
|
|
||||||
delete from public.activities
|
|
||||||
where id in (
|
|
||||||
select a.id from public.activities a
|
|
||||||
join json_array_elements_text((a."data" -> 'object')::json) as j on jsonb_typeof(a."data" -> 'object') = 'array'
|
|
||||||
left join public.objects o on j.value = o.data ->> 'id'
|
|
||||||
left join public.activities a2 on j.value = a2.data ->> 'id'
|
|
||||||
left join public.users u on j.value = u.ap_id
|
|
||||||
group by a.id
|
|
||||||
having max(o.data ->> 'id') is null
|
|
||||||
and max(a2.data ->> 'id') is null
|
|
||||||
and max(u.ap_id) is null
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
|> Repo.query([], timeout: :infinity)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
%{:num_rows => del_hashtags} =
|
||||||
"""
|
"""
|
||||||
DELETE FROM hashtags AS ht
|
DELETE FROM hashtags AS ht
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
SELECT 1 FROM hashtags_objects hto
|
SELECT 1 FROM hashtags_objects hto
|
||||||
WHERE ht.id = hto.hashtag_id)
|
WHERE ht.id = hto.hashtag_id)
|
||||||
"""
|
"""
|
||||||
|> Repo.query()
|
|> Repo.query!()
|
||||||
|
|
||||||
|
Logger.info("Deleted #{del_hashtags} no longer used hashtags...")
|
||||||
|
|
||||||
if Keyword.get(options, :vacuum) do
|
if Keyword.get(options, :vacuum) do
|
||||||
|
Logger.info("Starting vacuum...")
|
||||||
Maintenance.vacuum("full")
|
Maintenance.vacuum("full")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Logger.info("All done!")
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["prune_task"]) do
|
def run(["prune_task"]) do
|
||||||
|
|
|
@ -3,7 +3,6 @@ defmodule Mix.Tasks.Pleroma.Diagnostics do
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
||||||
require Logger
|
|
||||||
require Pleroma.Constants
|
require Pleroma.Constants
|
||||||
|
|
||||||
import Mix.Pleroma
|
import Mix.Pleroma
|
||||||
|
@ -14,7 +13,7 @@ def run(["http", url]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
|
|
||||||
Pleroma.HTTP.get(url)
|
Pleroma.HTTP.get(url)
|
||||||
|> IO.inspect()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["fetch_object", url]) do
|
def run(["fetch_object", url]) do
|
||||||
|
@ -27,7 +26,7 @@ def run(["fetch_object", url]) do
|
||||||
def run(["home_timeline", nickname]) do
|
def run(["home_timeline", nickname]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
user = Repo.get_by!(User, nickname: nickname)
|
user = Repo.get_by!(User, nickname: nickname)
|
||||||
Logger.info("Home timeline query #{user.nickname}")
|
shell_info("Home timeline query #{user.nickname}")
|
||||||
|
|
||||||
followed_hashtags =
|
followed_hashtags =
|
||||||
user
|
user
|
||||||
|
@ -56,14 +55,14 @@ def run(["home_timeline", nickname]) do
|
||||||
|> limit(20)
|
|> limit(20)
|
||||||
|
|
||||||
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
||||||
|> IO.puts()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["user_timeline", nickname, reading_nickname]) do
|
def run(["user_timeline", nickname, reading_nickname]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
user = Repo.get_by!(User, nickname: nickname)
|
user = Repo.get_by!(User, nickname: nickname)
|
||||||
reading_user = Repo.get_by!(User, nickname: reading_nickname)
|
reading_user = Repo.get_by!(User, nickname: reading_nickname)
|
||||||
Logger.info("User timeline query #{user.nickname}")
|
shell_info("User timeline query #{user.nickname}")
|
||||||
|
|
||||||
params =
|
params =
|
||||||
%{limit: 20}
|
%{limit: 20}
|
||||||
|
@ -87,7 +86,7 @@ def run(["user_timeline", nickname, reading_nickname]) do
|
||||||
|> limit(20)
|
|> limit(20)
|
||||||
|
|
||||||
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
||||||
|> IO.puts()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["notifications", nickname]) do
|
def run(["notifications", nickname]) do
|
||||||
|
@ -103,7 +102,7 @@ def run(["notifications", nickname]) do
|
||||||
|> limit(20)
|
|> limit(20)
|
||||||
|
|
||||||
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
||||||
|> IO.puts()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["known_network", nickname]) do
|
def run(["known_network", nickname]) do
|
||||||
|
@ -129,6 +128,6 @@ def run(["known_network", nickname]) do
|
||||||
|> limit(20)
|
|> limit(20)
|
||||||
|
|
||||||
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|
||||||
|> IO.puts()
|
|> shell_info()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,11 +27,11 @@ def run(["ls-packs" | args]) do
|
||||||
]
|
]
|
||||||
|
|
||||||
for {param, value} <- to_print do
|
for {param, value} <- to_print do
|
||||||
IO.puts(IO.ANSI.format([:bright, param, :normal, ": ", value]))
|
shell_info(IO.ANSI.format([:bright, param, :normal, ": ", value]))
|
||||||
end
|
end
|
||||||
|
|
||||||
# A newline
|
# A newline
|
||||||
IO.puts("")
|
shell_info("")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ def run(["get-packs" | args]) do
|
||||||
pack = manifest[pack_name]
|
pack = manifest[pack_name]
|
||||||
src = pack["src"]
|
src = pack["src"]
|
||||||
|
|
||||||
IO.puts(
|
shell_info(
|
||||||
IO.ANSI.format([
|
IO.ANSI.format([
|
||||||
"Downloading ",
|
"Downloading ",
|
||||||
:bright,
|
:bright,
|
||||||
|
@ -67,9 +67,9 @@ def run(["get-packs" | args]) do
|
||||||
sha_status_text = ["SHA256 of ", :bright, pack_name, :normal, " source file is ", :bright]
|
sha_status_text = ["SHA256 of ", :bright, pack_name, :normal, " source file is ", :bright]
|
||||||
|
|
||||||
if archive_sha == String.upcase(pack["src_sha256"]) do
|
if archive_sha == String.upcase(pack["src_sha256"]) do
|
||||||
IO.puts(IO.ANSI.format(sha_status_text ++ [:green, "OK"]))
|
shell_info(IO.ANSI.format(sha_status_text ++ [:green, "OK"]))
|
||||||
else
|
else
|
||||||
IO.puts(IO.ANSI.format(sha_status_text ++ [:red, "BAD"]))
|
shell_info(IO.ANSI.format(sha_status_text ++ [:red, "BAD"]))
|
||||||
|
|
||||||
raise "Bad SHA256 for #{pack_name}"
|
raise "Bad SHA256 for #{pack_name}"
|
||||||
end
|
end
|
||||||
|
@ -80,7 +80,7 @@ def run(["get-packs" | args]) do
|
||||||
|> Path.dirname()
|
|> Path.dirname()
|
||||||
|> Path.join(pack["files"])
|
|> Path.join(pack["files"])
|
||||||
|
|
||||||
IO.puts(
|
shell_info(
|
||||||
IO.ANSI.format([
|
IO.ANSI.format([
|
||||||
"Fetching the file list for ",
|
"Fetching the file list for ",
|
||||||
:bright,
|
:bright,
|
||||||
|
@ -94,7 +94,7 @@ def run(["get-packs" | args]) do
|
||||||
|
|
||||||
files = fetch_and_decode!(files_loc)
|
files = fetch_and_decode!(files_loc)
|
||||||
|
|
||||||
IO.puts(IO.ANSI.format(["Unpacking ", :bright, pack_name]))
|
shell_info(IO.ANSI.format(["Unpacking ", :bright, pack_name]))
|
||||||
|
|
||||||
pack_path =
|
pack_path =
|
||||||
Path.join([
|
Path.join([
|
||||||
|
@ -111,11 +111,11 @@ def run(["get-packs" | args]) do
|
||||||
|
|
||||||
{:ok, _} =
|
{:ok, _} =
|
||||||
:zip.unzip(binary_archive,
|
:zip.unzip(binary_archive,
|
||||||
cwd: pack_path,
|
cwd: to_charlist(pack_path),
|
||||||
file_list: files_to_unzip
|
file_list: files_to_unzip
|
||||||
)
|
)
|
||||||
|
|
||||||
IO.puts(IO.ANSI.format(["Writing pack.json for ", :bright, pack_name]))
|
shell_info(IO.ANSI.format(["Writing pack.json for ", :bright, pack_name]))
|
||||||
|
|
||||||
pack_json = %{
|
pack_json = %{
|
||||||
pack: %{
|
pack: %{
|
||||||
|
@ -132,7 +132,7 @@ def run(["get-packs" | args]) do
|
||||||
File.write!(Path.join(pack_path, "pack.json"), Jason.encode!(pack_json, pretty: true))
|
File.write!(Path.join(pack_path, "pack.json"), Jason.encode!(pack_json, pretty: true))
|
||||||
Pleroma.Emoji.reload()
|
Pleroma.Emoji.reload()
|
||||||
else
|
else
|
||||||
IO.puts(IO.ANSI.format([:bright, :red, "No pack named \"#{pack_name}\" found"]))
|
shell_info(IO.ANSI.format([:bright, :red, "No pack named \"#{pack_name}\" found"]))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -180,14 +180,14 @@ def run(["gen-pack" | args]) do
|
||||||
custom_exts
|
custom_exts
|
||||||
end
|
end
|
||||||
|
|
||||||
IO.puts("Using #{Enum.join(exts, " ")} extensions")
|
shell_info("Using #{Enum.join(exts, " ")} extensions")
|
||||||
|
|
||||||
IO.puts("Downloading the pack and generating SHA256")
|
shell_info("Downloading the pack and generating SHA256")
|
||||||
|
|
||||||
{:ok, %{body: binary_archive}} = Pleroma.HTTP.get(src)
|
{:ok, %{body: binary_archive}} = Pleroma.HTTP.get(src)
|
||||||
archive_sha = :crypto.hash(:sha256, binary_archive) |> Base.encode16()
|
archive_sha = :crypto.hash(:sha256, binary_archive) |> Base.encode16()
|
||||||
|
|
||||||
IO.puts("SHA256 is #{archive_sha}")
|
shell_info("SHA256 is #{archive_sha}")
|
||||||
|
|
||||||
pack_json = %{
|
pack_json = %{
|
||||||
name => %{
|
name => %{
|
||||||
|
@ -208,7 +208,7 @@ def run(["gen-pack" | args]) do
|
||||||
|
|
||||||
File.write!(files_name, Jason.encode!(emoji_map, pretty: true))
|
File.write!(files_name, Jason.encode!(emoji_map, pretty: true))
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
|
|
||||||
#{files_name} has been created and contains the list of all found emojis in the pack.
|
#{files_name} has been created and contains the list of all found emojis in the pack.
|
||||||
Please review the files in the pack and remove those not needed.
|
Please review the files in the pack and remove those not needed.
|
||||||
|
@ -230,11 +230,11 @@ def run(["gen-pack" | args]) do
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
IO.puts("#{pack_file} has been updated with the #{name} pack")
|
shell_info("#{pack_file} has been updated with the #{name} pack")
|
||||||
else
|
else
|
||||||
File.write!(pack_file, Jason.encode!(pack_json, pretty: true))
|
File.write!(pack_file, Jason.encode!(pack_json, pretty: true))
|
||||||
|
|
||||||
IO.puts("#{pack_file} has been created with the #{name} pack")
|
shell_info("#{pack_file} has been created with the #{name} pack")
|
||||||
end
|
end
|
||||||
|
|
||||||
Pleroma.Emoji.reload()
|
Pleroma.Emoji.reload()
|
||||||
|
@ -243,7 +243,7 @@ def run(["gen-pack" | args]) do
|
||||||
def run(["reload"]) do
|
def run(["reload"]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
Pleroma.Emoji.reload()
|
Pleroma.Emoji.reload()
|
||||||
IO.puts("Emoji packs have been reloaded.")
|
shell_info("Emoji packs have been reloaded.")
|
||||||
end
|
end
|
||||||
|
|
||||||
defp fetch_and_decode!(from) do
|
defp fetch_and_decode!(from) do
|
||||||
|
|
|
@ -11,7 +11,6 @@ defmodule Mix.Tasks.Pleroma.RefreshCounterCache do
|
||||||
alias Pleroma.CounterCache
|
alias Pleroma.CounterCache
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
|
|
||||||
require Logger
|
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
|
||||||
def run([]) do
|
def run([]) do
|
||||||
|
|
|
@ -48,7 +48,7 @@ def run(["index"]) do
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
IO.puts("Created indices. Starting to insert posts.")
|
shell_info("Created indices. Starting to insert posts.")
|
||||||
|
|
||||||
chunk_size = Pleroma.Config.get([Pleroma.Search.Meilisearch, :initial_indexing_chunk_size])
|
chunk_size = Pleroma.Config.get([Pleroma.Search.Meilisearch, :initial_indexing_chunk_size])
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ def run(["index"]) do
|
||||||
)
|
)
|
||||||
|
|
||||||
count = query |> Pleroma.Repo.aggregate(:count, :data)
|
count = query |> Pleroma.Repo.aggregate(:count, :data)
|
||||||
IO.puts("Entries to index: #{count}")
|
shell_info("Entries to index: #{count}")
|
||||||
|
|
||||||
Pleroma.Repo.stream(
|
Pleroma.Repo.stream(
|
||||||
query,
|
query,
|
||||||
|
@ -92,10 +92,10 @@ def run(["index"]) do
|
||||||
|
|
||||||
with {:ok, res} <- result do
|
with {:ok, res} <- result do
|
||||||
if not Map.has_key?(res, "indexUid") do
|
if not Map.has_key?(res, "indexUid") do
|
||||||
IO.puts("\nFailed to index: #{inspect(result)}")
|
shell_info("\nFailed to index: #{inspect(result)}")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
e -> IO.puts("\nFailed to index due to network error: #{inspect(e)}")
|
e -> shell_error("\nFailed to index due to network error: #{inspect(e)}")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|> Stream.run()
|
|> Stream.run()
|
||||||
|
@ -128,13 +128,13 @@ def run(["show-keys", master_key]) do
|
||||||
if decoded["results"] do
|
if decoded["results"] do
|
||||||
Enum.each(decoded["results"], fn
|
Enum.each(decoded["results"], fn
|
||||||
%{"name" => name, "key" => key} ->
|
%{"name" => name, "key" => key} ->
|
||||||
IO.puts("#{name}: #{key}")
|
shell_info("#{name}: #{key}")
|
||||||
|
|
||||||
%{"description" => desc, "key" => key} ->
|
%{"description" => desc, "key" => key} ->
|
||||||
IO.puts("#{desc}: #{key}")
|
shell_info("#{desc}: #{key}")
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
IO.puts("Error fetching the keys, check the master key is correct: #{inspect(decoded)}")
|
shell_error("Error fetching the keys, check the master key is correct: #{inspect(decoded)}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ def run(["stats"]) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
|
|
||||||
{:ok, result} = meili_get("/indexes/objects/stats")
|
{:ok, result} = meili_get("/indexes/objects/stats")
|
||||||
IO.puts("Number of entries: #{result["numberOfDocuments"]}")
|
shell_info("Number of entries: #{result["numberOfDocuments"]}")
|
||||||
IO.puts("Indexing? #{result["isIndexing"]}")
|
shell_info("Indexing? #{result["isIndexing"]}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -38,7 +38,7 @@ def run(["spoof-uploaded"]) do
|
||||||
Logger.put_process_level(self(), :notice)
|
Logger.put_process_level(self(), :notice)
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
+------------------------+
|
+------------------------+
|
||||||
| SPOOF SEARCH UPLOADS |
|
| SPOOF SEARCH UPLOADS |
|
||||||
+------------------------+
|
+------------------------+
|
||||||
|
@ -55,7 +55,7 @@ def run(["spoof-inserted"]) do
|
||||||
Logger.put_process_level(self(), :notice)
|
Logger.put_process_level(self(), :notice)
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
+----------------------+
|
+----------------------+
|
||||||
| SPOOF SEARCH NOTES |
|
| SPOOF SEARCH NOTES |
|
||||||
+----------------------+
|
+----------------------+
|
||||||
|
@ -77,7 +77,7 @@ defp do_spoof_uploaded() do
|
||||||
uploads_search_spoofs_local_dir(Config.get!([Pleroma.Uploaders.Local, :uploads]))
|
uploads_search_spoofs_local_dir(Config.get!([Pleroma.Uploaders.Local, :uploads]))
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
NOTE:
|
NOTE:
|
||||||
Not using local uploader; thus not affected by this exploit.
|
Not using local uploader; thus not affected by this exploit.
|
||||||
It's impossible to check for files, but in case local uploader was used before
|
It's impossible to check for files, but in case local uploader was used before
|
||||||
|
@ -98,13 +98,13 @@ defp do_spoof_uploaded() do
|
||||||
|
|
||||||
orphaned_attachs = upload_search_orphaned_attachments(not_orphaned_urls)
|
orphaned_attachs = upload_search_orphaned_attachments(not_orphaned_urls)
|
||||||
|
|
||||||
IO.puts("\nSearch concluded; here are the results:")
|
shell_info("\nSearch concluded; here are the results:")
|
||||||
pretty_print_list_with_title(emoji, "Emoji")
|
pretty_print_list_with_title(emoji, "Emoji")
|
||||||
pretty_print_list_with_title(files, "Uploaded Files")
|
pretty_print_list_with_title(files, "Uploaded Files")
|
||||||
pretty_print_list_with_title(post_attachs, "(Not Deleted) Post Attachments")
|
pretty_print_list_with_title(post_attachs, "(Not Deleted) Post Attachments")
|
||||||
pretty_print_list_with_title(orphaned_attachs, "Orphaned Uploads")
|
pretty_print_list_with_title(orphaned_attachs, "Orphaned Uploads")
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
In total found
|
In total found
|
||||||
#{length(emoji)} emoji
|
#{length(emoji)} emoji
|
||||||
#{length(files)} uploads
|
#{length(files)} uploads
|
||||||
|
@ -116,7 +116,7 @@ defp do_spoof_uploaded() do
|
||||||
defp uploads_search_spoofs_local_dir(dir) do
|
defp uploads_search_spoofs_local_dir(dir) do
|
||||||
local_dir = String.replace_suffix(dir, "/", "")
|
local_dir = String.replace_suffix(dir, "/", "")
|
||||||
|
|
||||||
IO.puts("Searching for suspicious files in #{local_dir}...")
|
shell_info("Searching for suspicious files in #{local_dir}...")
|
||||||
|
|
||||||
glob_ext = "{" <> Enum.join(@activity_exts, ",") <> "}"
|
glob_ext = "{" <> Enum.join(@activity_exts, ",") <> "}"
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ defp uploads_search_spoofs_local_dir(dir) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp uploads_search_spoofs_notes() do
|
defp uploads_search_spoofs_notes() do
|
||||||
IO.puts("Now querying DB for posts with spoofing attachments. This might take a while...")
|
shell_info("Now querying DB for posts with spoofing attachments. This might take a while...")
|
||||||
|
|
||||||
patterns = [local_id_pattern() | activity_ext_url_patterns()]
|
patterns = [local_id_pattern() | activity_ext_url_patterns()]
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ defp uploads_search_spoofs_notes() do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp upload_search_orphaned_attachments(not_orphaned_urls) do
|
defp upload_search_orphaned_attachments(not_orphaned_urls) do
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
Now querying DB for orphaned spoofing attachment (i.e. their post was deleted,
|
Now querying DB for orphaned spoofing attachment (i.e. their post was deleted,
|
||||||
but if :cleanup_attachments was not enabled traces remain in the database)
|
but if :cleanup_attachments was not enabled traces remain in the database)
|
||||||
This might take a bit...
|
This might take a bit...
|
||||||
|
@ -184,7 +184,7 @@ defp upload_search_orphaned_attachments(not_orphaned_urls) do
|
||||||
# | S P O O F - I N S E R T E D |
|
# | S P O O F - I N S E R T E D |
|
||||||
# +-----------------------------+
|
# +-----------------------------+
|
||||||
defp do_spoof_inserted() do
|
defp do_spoof_inserted() do
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
Searching for local posts whose Create activity has no ActivityPub id...
|
Searching for local posts whose Create activity has no ActivityPub id...
|
||||||
This is a pretty good indicator, but only for spoofs of local actors
|
This is a pretty good indicator, but only for spoofs of local actors
|
||||||
and only if the spoofing happened after around late 2021.
|
and only if the spoofing happened after around late 2021.
|
||||||
|
@ -194,9 +194,9 @@ defp do_spoof_inserted() do
|
||||||
search_local_notes_without_create_id()
|
search_local_notes_without_create_id()
|
||||||
|> Enum.sort()
|
|> Enum.sort()
|
||||||
|
|
||||||
IO.puts("Done.\n")
|
shell_info("Done.\n")
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
Now trying to weed out other poorly hidden spoofs.
|
Now trying to weed out other poorly hidden spoofs.
|
||||||
This can't detect all and may have some false positives.
|
This can't detect all and may have some false positives.
|
||||||
""")
|
""")
|
||||||
|
@ -207,9 +207,9 @@ defp do_spoof_inserted() do
|
||||||
search_sus_notes_by_id_patterns()
|
search_sus_notes_by_id_patterns()
|
||||||
|> Enum.filter(fn r -> !(r in likely_spoofed_posts_set) end)
|
|> Enum.filter(fn r -> !(r in likely_spoofed_posts_set) end)
|
||||||
|
|
||||||
IO.puts("Done.\n")
|
shell_info("Done.\n")
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
Finally, searching for spoofed, local user accounts.
|
Finally, searching for spoofed, local user accounts.
|
||||||
(It's impossible to detect spoofed remote users)
|
(It's impossible to detect spoofed remote users)
|
||||||
""")
|
""")
|
||||||
|
@ -220,7 +220,7 @@ defp do_spoof_inserted() do
|
||||||
pretty_print_list_with_title(idless_create, "Likely Spoofed Posts")
|
pretty_print_list_with_title(idless_create, "Likely Spoofed Posts")
|
||||||
pretty_print_list_with_title(spoofed_users, "Spoofed local user accounts")
|
pretty_print_list_with_title(spoofed_users, "Spoofed local user accounts")
|
||||||
|
|
||||||
IO.puts("""
|
shell_info("""
|
||||||
In total found:
|
In total found:
|
||||||
#{length(spoofed_users)} bogus users
|
#{length(spoofed_users)} bogus users
|
||||||
#{length(idless_create)} likely spoofed posts
|
#{length(idless_create)} likely spoofed posts
|
||||||
|
@ -289,27 +289,27 @@ defp search_bogus_local_users() do
|
||||||
defp pretty_print_list_with_title(list, title) do
|
defp pretty_print_list_with_title(list, title) do
|
||||||
title_len = String.length(title)
|
title_len = String.length(title)
|
||||||
title_underline = String.duplicate("=", title_len)
|
title_underline = String.duplicate("=", title_len)
|
||||||
IO.puts(title)
|
shell_info(title)
|
||||||
IO.puts(title_underline)
|
shell_info(title_underline)
|
||||||
pretty_print_list(list)
|
pretty_print_list(list)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp pretty_print_list([]), do: IO.puts("")
|
defp pretty_print_list([]), do: shell_info("")
|
||||||
|
|
||||||
defp pretty_print_list([{a, o} | rest])
|
defp pretty_print_list([{a, o} | rest])
|
||||||
when (is_binary(a) or is_number(a)) and is_binary(o) do
|
when (is_binary(a) or is_number(a)) and is_binary(o) do
|
||||||
IO.puts(" {#{a}, #{o}}")
|
shell_info(" {#{a}, #{o}}")
|
||||||
pretty_print_list(rest)
|
pretty_print_list(rest)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp pretty_print_list([{u, a, o} | rest])
|
defp pretty_print_list([{u, a, o} | rest])
|
||||||
when is_binary(a) and is_binary(u) and is_binary(o) do
|
when is_binary(a) and is_binary(u) and is_binary(o) do
|
||||||
IO.puts(" {#{u}, #{a}, #{o}}")
|
shell_info(" {#{u}, #{a}, #{o}}")
|
||||||
pretty_print_list(rest)
|
pretty_print_list(rest)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp pretty_print_list([e | rest]) when is_binary(e) do
|
defp pretty_print_list([e | rest]) when is_binary(e) do
|
||||||
IO.puts(" #{e}")
|
shell_info(" #{e}")
|
||||||
pretty_print_list(rest)
|
pretty_print_list(rest)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ def run(["reset_password", nickname]) do
|
||||||
{:ok, token} <- Pleroma.PasswordResetToken.create_token(user) do
|
{:ok, token} <- Pleroma.PasswordResetToken.create_token(user) do
|
||||||
shell_info("Generated password reset token for #{user.nickname}")
|
shell_info("Generated password reset token for #{user.nickname}")
|
||||||
|
|
||||||
IO.puts("URL: #{~p[/api/v1/pleroma/password_reset/#{token.token}]}")
|
shell_info("URL: #{~p[/api/v1/pleroma/password_reset/#{token.token}]}")
|
||||||
else
|
else
|
||||||
_ ->
|
_ ->
|
||||||
shell_error("No local user #{nickname}")
|
shell_error("No local user #{nickname}")
|
||||||
|
@ -301,7 +301,7 @@ def run(["invite" | rest]) do
|
||||||
shell_info("Generated user invite token " <> String.replace(invite.invite_type, "_", " "))
|
shell_info("Generated user invite token " <> String.replace(invite.invite_type, "_", " "))
|
||||||
|
|
||||||
url = url(~p[/registration/#{invite.token}])
|
url = url(~p[/registration/#{invite.token}])
|
||||||
IO.puts(url)
|
shell_info(url)
|
||||||
else
|
else
|
||||||
error ->
|
error ->
|
||||||
shell_error("Could not create invite token: #{inspect(error)}")
|
shell_error("Could not create invite token: #{inspect(error)}")
|
||||||
|
@ -373,7 +373,7 @@ def run(["show", nickname]) do
|
||||||
nickname
|
nickname
|
||||||
|> User.get_cached_by_nickname()
|
|> User.get_cached_by_nickname()
|
||||||
|
|
||||||
shell_info("#{inspect(user)}")
|
shell_info(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def run(["send_confirmation", nickname]) do
|
def run(["send_confirmation", nickname]) do
|
||||||
|
@ -457,7 +457,7 @@ def run(["blocking", nickname]) do
|
||||||
|
|
||||||
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
||||||
blocks = User.following_ap_ids(user)
|
blocks = User.following_ap_ids(user)
|
||||||
IO.puts("#{inspect(blocks)}")
|
shell_info(blocks)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -516,12 +516,12 @@ def run(["fix_follow_state", local_user, remote_user]) do
|
||||||
{:follow_data, Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(local, remote)} do
|
{:follow_data, Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(local, remote)} do
|
||||||
calculated_state = User.following?(local, remote)
|
calculated_state = User.following?(local, remote)
|
||||||
|
|
||||||
IO.puts(
|
shell_info(
|
||||||
"Request state is #{request_state}, vs calculated state of following=#{calculated_state}"
|
"Request state is #{request_state}, vs calculated state of following=#{calculated_state}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if calculated_state == false && request_state == "accept" do
|
if calculated_state == false && request_state == "accept" do
|
||||||
IO.puts("Discrepancy found, fixing")
|
shell_info("Discrepancy found, fixing")
|
||||||
Pleroma.Web.CommonAPI.reject_follow_request(local, remote)
|
Pleroma.Web.CommonAPI.reject_follow_request(local, remote)
|
||||||
shell_info("Relationship fixed")
|
shell_info("Relationship fixed")
|
||||||
else
|
else
|
||||||
|
@ -551,14 +551,14 @@ defp refetch_public_keys(query) do
|
||||||
|> Stream.each(fn users ->
|
|> Stream.each(fn users ->
|
||||||
users
|
users
|
||||||
|> Enum.each(fn user ->
|
|> Enum.each(fn user ->
|
||||||
IO.puts("Re-Resolving: #{user.ap_id}")
|
shell_info("Re-Resolving: #{user.ap_id}")
|
||||||
|
|
||||||
with {:ok, user} <- Pleroma.User.fetch_by_ap_id(user.ap_id),
|
with {:ok, user} <- Pleroma.User.fetch_by_ap_id(user.ap_id),
|
||||||
changeset <- Pleroma.User.update_changeset(user),
|
changeset <- Pleroma.User.update_changeset(user),
|
||||||
{:ok, _user} <- Pleroma.User.update_and_set_cache(changeset) do
|
{:ok, _user} <- Pleroma.User.update_and_set_cache(changeset) do
|
||||||
:ok
|
:ok
|
||||||
else
|
else
|
||||||
error -> IO.puts("Could not resolve: #{user.ap_id}, #{inspect(error)}")
|
error -> shell_info("Could not resolve: #{user.ap_id}, #{inspect(error)}")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -28,7 +28,7 @@ defp get_cache_keys_for(activity_id) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp add_cache_key_for(activity_id, additional_key) do
|
def add_cache_key_for(activity_id, additional_key) do
|
||||||
current = get_cache_keys_for(activity_id)
|
current = get_cache_keys_for(activity_id)
|
||||||
|
|
||||||
unless additional_key in current do
|
unless additional_key in current do
|
||||||
|
|
|
@ -95,34 +95,17 @@ def start(_type, _args) do
|
||||||
|
|
||||||
opts = [strategy: :one_for_one, name: Pleroma.Supervisor, max_restarts: max_restarts]
|
opts = [strategy: :one_for_one, name: Pleroma.Supervisor, max_restarts: max_restarts]
|
||||||
|
|
||||||
with {:ok, data} <- Supervisor.start_link(children, opts) do
|
case Supervisor.start_link(children, opts) do
|
||||||
set_postgres_server_version()
|
{:ok, data} ->
|
||||||
{:ok, data}
|
{:ok, data}
|
||||||
else
|
|
||||||
e ->
|
e ->
|
||||||
Logger.error("Failed to start!")
|
Logger.critical("Failed to start!")
|
||||||
Logger.error("#{inspect(e)}")
|
Logger.critical("#{inspect(e)}")
|
||||||
e
|
e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp set_postgres_server_version do
|
|
||||||
version =
|
|
||||||
with %{rows: [[version]]} <- Ecto.Adapters.SQL.query!(Pleroma.Repo, "show server_version"),
|
|
||||||
{num, _} <- Float.parse(version) do
|
|
||||||
num
|
|
||||||
else
|
|
||||||
e ->
|
|
||||||
Logger.warning(
|
|
||||||
"Could not get the postgres version: #{inspect(e)}.\nSetting the default value of 9.6"
|
|
||||||
)
|
|
||||||
|
|
||||||
9.6
|
|
||||||
end
|
|
||||||
|
|
||||||
:persistent_term.put({Pleroma.Repo, :postgres_version}, version)
|
|
||||||
end
|
|
||||||
|
|
||||||
def load_custom_modules do
|
def load_custom_modules do
|
||||||
dir = Config.get([:modules, :runtime_dir])
|
dir = Config.get([:modules, :runtime_dir])
|
||||||
|
|
||||||
|
@ -281,7 +264,9 @@ def limiters_setup do
|
||||||
defp http_children do
|
defp http_children do
|
||||||
proxy_url = Config.get([:http, :proxy_url])
|
proxy_url = Config.get([:http, :proxy_url])
|
||||||
proxy = Pleroma.HTTP.AdapterHelper.format_proxy(proxy_url)
|
proxy = Pleroma.HTTP.AdapterHelper.format_proxy(proxy_url)
|
||||||
pool_size = Config.get([:http, :pool_size])
|
pool_size = Config.get([:http, :pool_size], 10)
|
||||||
|
pool_timeout = Config.get([:http, :pool_timeout], 60_000)
|
||||||
|
connection_timeout = Config.get([:http, :conn_max_idle_time], 10_000)
|
||||||
|
|
||||||
:public_key.cacerts_load()
|
:public_key.cacerts_load()
|
||||||
|
|
||||||
|
@ -291,6 +276,8 @@ defp http_children do
|
||||||
|> Pleroma.HTTP.AdapterHelper.add_pool_size(pool_size)
|
|> Pleroma.HTTP.AdapterHelper.add_pool_size(pool_size)
|
||||||
|> Pleroma.HTTP.AdapterHelper.maybe_add_proxy_pool(proxy)
|
|> Pleroma.HTTP.AdapterHelper.maybe_add_proxy_pool(proxy)
|
||||||
|> Pleroma.HTTP.AdapterHelper.ensure_ipv6()
|
|> Pleroma.HTTP.AdapterHelper.ensure_ipv6()
|
||||||
|
|> Pleroma.HTTP.AdapterHelper.add_default_conn_max_idle_time(connection_timeout)
|
||||||
|
|> Pleroma.HTTP.AdapterHelper.add_default_pool_max_idle_time(pool_timeout)
|
||||||
|> Keyword.put(:name, MyFinch)
|
|> Keyword.put(:name, MyFinch)
|
||||||
|
|
||||||
[{Finch, config}]
|
[{Finch, config}]
|
||||||
|
|
|
@ -24,7 +24,6 @@ defp reboot_time_keys,
|
||||||
defp reboot_time_subkeys,
|
defp reboot_time_subkeys,
|
||||||
do: [
|
do: [
|
||||||
{:pleroma, Pleroma.Captcha, [:seconds_valid]},
|
{:pleroma, Pleroma.Captcha, [:seconds_valid]},
|
||||||
{:pleroma, Pleroma.Upload, [:proxy_remote]},
|
|
||||||
{:pleroma, :instance, [:upload_limit]},
|
{:pleroma, :instance, [:upload_limit]},
|
||||||
{:pleroma, :http, [:pool_size]},
|
{:pleroma, :http, [:pool_size]},
|
||||||
{:pleroma, :http, [:proxy_url]}
|
{:pleroma, :http, [:proxy_url]}
|
||||||
|
|
|
@ -125,7 +125,7 @@ def add_file(%Pack{} = pack, _, _, %Plug.Upload{content_type: "application/zip"}
|
||||||
{:ok, _emoji_files} =
|
{:ok, _emoji_files} =
|
||||||
:zip.unzip(
|
:zip.unzip(
|
||||||
to_charlist(file.path),
|
to_charlist(file.path),
|
||||||
[{:file_list, Enum.map(emojies, & &1[:path])}, {:cwd, tmp_dir}]
|
[{:file_list, Enum.map(emojies, & &1[:path])}, {:cwd, to_charlist(tmp_dir)}]
|
||||||
)
|
)
|
||||||
|
|
||||||
{_, updated_pack} =
|
{_, updated_pack} =
|
||||||
|
|
|
@ -79,6 +79,10 @@ def unzip(zip, dest) do
|
||||||
|
|
||||||
new_file_path = Path.join(dest, path)
|
new_file_path = Path.join(dest, path)
|
||||||
|
|
||||||
|
new_file_path
|
||||||
|
|> Path.dirname()
|
||||||
|
|> File.rm()
|
||||||
|
|
||||||
new_file_path
|
new_file_path
|
||||||
|> Path.dirname()
|
|> Path.dirname()
|
||||||
|> File.mkdir_p!()
|
|> File.mkdir_p!()
|
||||||
|
|
|
@ -6,8 +6,6 @@ defmodule Pleroma.HTML do
|
||||||
# Scrubbers are compiled on boot so they can be configured in OTP releases
|
# Scrubbers are compiled on boot so they can be configured in OTP releases
|
||||||
# @on_load :compile_scrubbers
|
# @on_load :compile_scrubbers
|
||||||
|
|
||||||
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
|
||||||
|
|
||||||
def compile_scrubbers do
|
def compile_scrubbers do
|
||||||
dir = Path.join(:code.priv_dir(:pleroma), "scrubbers")
|
dir = Path.join(:code.priv_dir(:pleroma), "scrubbers")
|
||||||
|
|
||||||
|
@ -67,22 +65,9 @@ def ensure_scrubbed_html(
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_first_external_url_from_object(%{data: %{"content" => content}} = object)
|
@spec extract_first_external_url_from_object(Pleroma.Object.t()) :: String.t() | nil
|
||||||
|
def extract_first_external_url_from_object(%{data: %{"content" => content}})
|
||||||
when is_binary(content) do
|
when is_binary(content) do
|
||||||
unless object.data["fake"] do
|
|
||||||
key = "URL|#{object.id}"
|
|
||||||
|
|
||||||
@cachex.fetch!(:scrubber_cache, key, fn _key ->
|
|
||||||
{:commit, {:ok, extract_first_external_url(content)}}
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
{:ok, extract_first_external_url(content)}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def extract_first_external_url_from_object(_), do: {:error, :no_content}
|
|
||||||
|
|
||||||
def extract_first_external_url(content) do
|
|
||||||
content
|
content
|
||||||
|> Floki.parse_fragment!()
|
|> Floki.parse_fragment!()
|
||||||
|> Floki.find("a:not(.mention,.hashtag,.attachment,[rel~=\"tag\"])")
|
|> Floki.find("a:not(.mention,.hashtag,.attachment,[rel~=\"tag\"])")
|
||||||
|
@ -90,4 +75,6 @@ def extract_first_external_url(content) do
|
||||||
|> Floki.attribute("href")
|
|> Floki.attribute("href")
|
||||||
|> Enum.at(0)
|
|> Enum.at(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def extract_first_external_url_from_object(_), do: nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,7 +74,12 @@ def request(method, url, body, headers, options) when is_binary(url) do
|
||||||
request = build_request(method, headers, options, url, body, params)
|
request = build_request(method, headers, options, url, body, params)
|
||||||
client = Tesla.client([Tesla.Middleware.FollowRedirects, Tesla.Middleware.Telemetry])
|
client = Tesla.client([Tesla.Middleware.FollowRedirects, Tesla.Middleware.Telemetry])
|
||||||
|
|
||||||
|
Logger.debug("Outbound: #{method} #{url}")
|
||||||
request(client, request)
|
request(client, request)
|
||||||
|
rescue
|
||||||
|
e ->
|
||||||
|
Logger.error("Failed to fetch #{url}: #{inspect(e)}")
|
||||||
|
{:error, :fetch_error}
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec request(Client.t(), keyword()) :: {:ok, Env.t()} | {:error, any()}
|
@spec request(Client.t(), keyword()) :: {:ok, Env.t()} | {:error, any()}
|
||||||
|
|
|
@ -116,6 +116,20 @@ defp maybe_add_transport_opts(opts) do
|
||||||
put_in(opts, [:pools, :default, :conn_opts, :transport_opts, :inet6], true)
|
put_in(opts, [:pools, :default, :conn_opts, :transport_opts, :inet6], true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def add_default_pool_max_idle_time(opts, pool_timeout) do
|
||||||
|
opts
|
||||||
|
|> maybe_add_pools()
|
||||||
|
|> maybe_add_default_pool()
|
||||||
|
|> put_in([:pools, :default, :pool_max_idle_time], pool_timeout)
|
||||||
|
end
|
||||||
|
|
||||||
|
def add_default_conn_max_idle_time(opts, connection_timeout) do
|
||||||
|
opts
|
||||||
|
|> maybe_add_pools()
|
||||||
|
|> maybe_add_default_pool()
|
||||||
|
|> put_in([:pools, :default, :conn_max_idle_time], connection_timeout)
|
||||||
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Merge default connection & adapter options with received ones.
|
Merge default connection & adapter options with received ones.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
# Pleroma: A lightweight social networking server
|
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
|
|
||||||
defmodule Pleroma.Keys do
|
|
||||||
# Native generation of RSA keys is only available since OTP 20+ and in default build conditions
|
|
||||||
# We try at compile time to generate natively an RSA key otherwise we fallback on the old way.
|
|
||||||
try do
|
|
||||||
_ = :public_key.generate_key({:rsa, 2048, 65_537})
|
|
||||||
|
|
||||||
def generate_rsa_pem do
|
|
||||||
key = :public_key.generate_key({:rsa, 2048, 65_537})
|
|
||||||
entry = :public_key.pem_entry_encode(:RSAPrivateKey, key)
|
|
||||||
pem = :public_key.pem_encode([entry]) |> String.trim_trailing()
|
|
||||||
{:ok, pem}
|
|
||||||
end
|
|
||||||
rescue
|
|
||||||
_ ->
|
|
||||||
def generate_rsa_pem do
|
|
||||||
port = Port.open({:spawn, "openssl genrsa"}, [:binary])
|
|
||||||
|
|
||||||
{:ok, pem} =
|
|
||||||
receive do
|
|
||||||
{^port, {:data, pem}} -> {:ok, pem}
|
|
||||||
end
|
|
||||||
|
|
||||||
Port.close(port)
|
|
||||||
|
|
||||||
if Regex.match?(~r/RSA PRIVATE KEY/, pem) do
|
|
||||||
{:ok, pem}
|
|
||||||
else
|
|
||||||
:error
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def keys_from_pem(pem) do
|
|
||||||
with [private_key_code] <- :public_key.pem_decode(pem),
|
|
||||||
private_key <- :public_key.pem_entry_decode(private_key_code),
|
|
||||||
{:RSAPrivateKey, _, modulus, exponent, _, _, _, _, _, _, _} <- private_key do
|
|
||||||
{:ok, private_key, {:RSAPublicKey, modulus, exponent}}
|
|
||||||
else
|
|
||||||
error -> {:error, error}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -12,8 +12,6 @@ defmodule Pleroma.Object.Containment do
|
||||||
spoofing, therefore removal of object containment functions is NOT recommended.
|
spoofing, therefore removal of object containment functions is NOT recommended.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Transmogrifier
|
|
||||||
|
|
||||||
def get_actor(%{"actor" => actor}) when is_binary(actor) do
|
def get_actor(%{"actor" => actor}) when is_binary(actor) do
|
||||||
actor
|
actor
|
||||||
end
|
end
|
||||||
|
@ -50,16 +48,39 @@ def get_object(_) do
|
||||||
defp compare_uris(%URI{host: host} = _id_uri, %URI{host: host} = _other_uri), do: :ok
|
defp compare_uris(%URI{host: host} = _id_uri, %URI{host: host} = _other_uri), do: :ok
|
||||||
defp compare_uris(_id_uri, _other_uri), do: :error
|
defp compare_uris(_id_uri, _other_uri), do: :error
|
||||||
|
|
||||||
defp compare_uris_exact(uri, uri), do: :ok
|
defp uri_strip_slash(%URI{path: path} = uri) when is_binary(path),
|
||||||
|
do: %{uri | path: String.replace_suffix(path, "/", "")}
|
||||||
|
|
||||||
defp compare_uris_exact(%URI{} = id, %URI{} = other),
|
defp uri_strip_slash(uri), do: uri
|
||||||
do: compare_uris_exact(URI.to_string(id), URI.to_string(other))
|
|
||||||
|
|
||||||
defp compare_uris_exact(id_uri, other_uri)
|
# domain names are case-insensitive per spec (other parts of URIs aren’t necessarily)
|
||||||
when is_binary(id_uri) and is_binary(other_uri) do
|
defp uri_normalise_host(%URI{host: host} = uri) when is_binary(host),
|
||||||
norm_id = String.replace_suffix(id_uri, "/", "")
|
do: %{uri | host: String.downcase(host, :ascii)}
|
||||||
norm_other = String.replace_suffix(other_uri, "/", "")
|
|
||||||
if norm_id == norm_other, do: :ok, else: :error
|
defp uri_normalise_host(uri), do: uri
|
||||||
|
|
||||||
|
defp compare_uri_identities(uri, uri), do: :ok
|
||||||
|
|
||||||
|
defp compare_uri_identities(id_uri, other_uri) when is_binary(id_uri) and is_binary(other_uri),
|
||||||
|
do: compare_uri_identities(URI.parse(id_uri), URI.parse(other_uri))
|
||||||
|
|
||||||
|
defp compare_uri_identities(%URI{} = id, %URI{} = other) do
|
||||||
|
normid =
|
||||||
|
%{id | fragment: nil}
|
||||||
|
|> uri_strip_slash()
|
||||||
|
|> uri_normalise_host()
|
||||||
|
|
||||||
|
normother =
|
||||||
|
%{other | fragment: nil}
|
||||||
|
|> uri_strip_slash()
|
||||||
|
|> uri_normalise_host()
|
||||||
|
|
||||||
|
# Conversion back to binary avoids issues from non-normalised deprecated authority field
|
||||||
|
if URI.to_string(normid) == URI.to_string(normother) do
|
||||||
|
:ok
|
||||||
|
else
|
||||||
|
:error
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
@ -93,21 +114,13 @@ def contain_origin(id, %{"attributedTo" => actor} = params),
|
||||||
def contain_origin(_id, _data), do: :ok
|
def contain_origin(_id, _data), do: :ok
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Check whether the fetch URL (after redirects) exactly (sans tralining slash) matches either
|
Check whether the fetch URL (after redirects) is the
|
||||||
the canonical ActivityPub id or the objects url field (for display URLs from *key and Mastodon)
|
same location the canonical ActivityPub id points to.
|
||||||
|
|
||||||
Since this is meant to be used for fetches, anonymous or transient objects are not accepted here.
|
Since this is meant to be used for fetches, anonymous or transient objects are not accepted here.
|
||||||
"""
|
"""
|
||||||
def contain_id_to_fetch(url, %{"id" => id} = data) when is_binary(id) do
|
def contain_id_to_fetch(url, %{"id" => id}) when is_binary(id) do
|
||||||
with {:id, :error} <- {:id, compare_uris_exact(id, url)},
|
compare_uri_identities(url, id)
|
||||||
# "url" can be a "Link" object and this is checked before full normalisation
|
|
||||||
display_url <- Transmogrifier.fix_url(data)["url"],
|
|
||||||
true <- display_url != nil do
|
|
||||||
compare_uris_exact(display_url, url)
|
|
||||||
else
|
|
||||||
{:id, :ok} -> :ok
|
|
||||||
_ -> :error
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def contain_id_to_fetch(_url, _data), do: :error
|
def contain_id_to_fetch(_url, _data), do: :error
|
||||||
|
|
|
@ -116,7 +116,7 @@ defp reinject_object(%Object{} = object, new_data) do
|
||||||
@doc "Assumes object already is in our database and refetches from remote to update (e.g. for polls)"
|
@doc "Assumes object already is in our database and refetches from remote to update (e.g. for polls)"
|
||||||
def refetch_object(%Object{data: %{"id" => id}} = object) do
|
def refetch_object(%Object{data: %{"id" => id}} = object) do
|
||||||
with {:local, false} <- {:local, Object.local?(object)},
|
with {:local, false} <- {:local, Object.local?(object)},
|
||||||
{:ok, new_data} <- fetch_and_contain_remote_object_from_id(id),
|
{:ok, new_data} <- fetch_and_contain_remote_object_from_id(id, true),
|
||||||
{:id, true} <- {:id, new_data["id"] == id},
|
{:id, true} <- {:id, new_data["id"] == id},
|
||||||
{:ok, object} <- reinject_object(object, new_data) do
|
{:ok, object} <- reinject_object(object, new_data) do
|
||||||
{:ok, object}
|
{:ok, object}
|
||||||
|
@ -253,14 +253,17 @@ defp maybe_date_fetch(headers, date) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc "Fetches arbitrary remote object and performs basic safety and authenticity checks"
|
@doc """
|
||||||
def fetch_and_contain_remote_object_from_id(id)
|
Fetches arbitrary remote object and performs basic safety and authenticity checks.
|
||||||
|
When the fetch URL is known to already be a canonical AP id, checks are stricter.
|
||||||
|
"""
|
||||||
|
def fetch_and_contain_remote_object_from_id(id, is_ap_id \\ false)
|
||||||
|
|
||||||
def fetch_and_contain_remote_object_from_id(%{"id" => id}),
|
def fetch_and_contain_remote_object_from_id(%{"id" => id}, is_ap_id),
|
||||||
do: fetch_and_contain_remote_object_from_id(id)
|
do: fetch_and_contain_remote_object_from_id(id, is_ap_id)
|
||||||
|
|
||||||
def fetch_and_contain_remote_object_from_id(id) when is_binary(id) do
|
def fetch_and_contain_remote_object_from_id(id, is_ap_id) when is_binary(id) do
|
||||||
Logger.debug("Fetching object #{id} via AP")
|
Logger.debug("Fetching object #{id} via AP [ap_id=#{is_ap_id}]")
|
||||||
|
|
||||||
with {:valid_uri_scheme, true} <- {:valid_uri_scheme, String.starts_with?(id, "http")},
|
with {:valid_uri_scheme, true} <- {:valid_uri_scheme, String.starts_with?(id, "http")},
|
||||||
%URI{} = uri <- URI.parse(id),
|
%URI{} = uri <- URI.parse(id),
|
||||||
|
@ -270,18 +273,31 @@ def fetch_and_contain_remote_object_from_id(id) when is_binary(id) do
|
||||||
{:mrf_accept_check, Pleroma.Web.ActivityPub.MRF.SimplePolicy.check_accept(uri)},
|
{:mrf_accept_check, Pleroma.Web.ActivityPub.MRF.SimplePolicy.check_accept(uri)},
|
||||||
{:local_fetch, :ok} <- {:local_fetch, Containment.contain_local_fetch(id)},
|
{:local_fetch, :ok} <- {:local_fetch, Containment.contain_local_fetch(id)},
|
||||||
{:ok, final_id, body} <- get_object(id),
|
{:ok, final_id, body} <- get_object(id),
|
||||||
|
# a canonical ID shouldn't be a redirect
|
||||||
|
true <- !is_ap_id || final_id == id,
|
||||||
{:ok, data} <- safe_json_decode(body),
|
{:ok, data} <- safe_json_decode(body),
|
||||||
{_, :ok} <- {:strict_id, Containment.contain_id_to_fetch(final_id, data)},
|
{_, :ok} <- {:containment, Containment.contain_origin(final_id, data)},
|
||||||
{_, :ok} <- {:containment, Containment.contain_origin(final_id, data)} do
|
{_, _, :ok} <- {:strict_id, data["id"], Containment.contain_id_to_fetch(final_id, data)} do
|
||||||
unless Instances.reachable?(final_id) do
|
unless Instances.reachable?(final_id) do
|
||||||
Instances.set_reachable(final_id)
|
Instances.set_reachable(final_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
{:ok, data}
|
{:ok, data}
|
||||||
else
|
else
|
||||||
{:strict_id, _} = e ->
|
# E.g. Mastodon and *key serve the AP object directly under their display URLs without
|
||||||
|
# redirecting to their canonical location first, thus ids will expectedly differ.
|
||||||
|
# Similarly keys, either use a fragment ID and are a subobjects or a distinct ID
|
||||||
|
# but for compatibility are still a subobject presenting their owning actors ID at the toplevel.
|
||||||
|
# Refetching _once_ from the listed id, should yield a strict match afterwards.
|
||||||
|
{:strict_id, ap_id, _} = e ->
|
||||||
|
case is_ap_id do
|
||||||
|
false ->
|
||||||
|
fetch_and_contain_remote_object_from_id(ap_id, true)
|
||||||
|
|
||||||
|
true ->
|
||||||
log_fetch_error(id, e)
|
log_fetch_error(id, e)
|
||||||
{:error, :id_mismatch}
|
{:error, :id_mismatch}
|
||||||
|
end
|
||||||
|
|
||||||
{:mrf_reject_check, _} = e ->
|
{:mrf_reject_check, _} = e ->
|
||||||
log_fetch_error(id, e)
|
log_fetch_error(id, e)
|
||||||
|
@ -301,7 +317,7 @@ def fetch_and_contain_remote_object_from_id(id) when is_binary(id) do
|
||||||
|
|
||||||
{:containment, reason} ->
|
{:containment, reason} ->
|
||||||
log_fetch_error(id, reason)
|
log_fetch_error(id, reason)
|
||||||
{:error, reason}
|
{:error, {:containment, reason}}
|
||||||
|
|
||||||
{:error, e} ->
|
{:error, e} ->
|
||||||
{:error, e}
|
{:error, e}
|
||||||
|
@ -311,25 +327,13 @@ def fetch_and_contain_remote_object_from_id(id) when is_binary(id) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_and_contain_remote_object_from_id(_id),
|
def fetch_and_contain_remote_object_from_id(_id, _is_ap_id),
|
||||||
do: {:error, :invalid_id}
|
do: {:error, :invalid_id}
|
||||||
|
|
||||||
defp check_crossdomain_redirect(final_host, original_url)
|
|
||||||
|
|
||||||
# HOPEFULLY TEMPORARY
|
# HOPEFULLY TEMPORARY
|
||||||
# Basically none of our Tesla mocks in tests set the (supposed to
|
# Basically none of our Tesla mocks in tests set the (supposed to
|
||||||
# exist for Tesla proper) url parameter for their responses
|
# exist for Tesla proper) url parameter for their responses
|
||||||
# causing almost every fetch in test to fail otherwise
|
# causing almost every fetch in test to fail otherwise
|
||||||
if @mix_env == :test do
|
|
||||||
defp check_crossdomain_redirect(nil, _) do
|
|
||||||
{:cross_domain_redirect, false}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp check_crossdomain_redirect(final_host, original_url) do
|
|
||||||
{:cross_domain_redirect, final_host != URI.parse(original_url).host}
|
|
||||||
end
|
|
||||||
|
|
||||||
if @mix_env == :test do
|
if @mix_env == :test do
|
||||||
defp get_final_id(nil, initial_url), do: initial_url
|
defp get_final_id(nil, initial_url), do: initial_url
|
||||||
defp get_final_id("", initial_url), do: initial_url
|
defp get_final_id("", initial_url), do: initial_url
|
||||||
|
@ -355,10 +359,6 @@ def get_object(id) do
|
||||||
with {:ok, %{body: body, status: code, headers: headers, url: final_url}}
|
with {:ok, %{body: body, status: code, headers: headers, url: final_url}}
|
||||||
when code in 200..299 <-
|
when code in 200..299 <-
|
||||||
HTTP.Backoff.get(id, headers),
|
HTTP.Backoff.get(id, headers),
|
||||||
remote_host <-
|
|
||||||
URI.parse(final_url).host,
|
|
||||||
{:cross_domain_redirect, false} <-
|
|
||||||
check_crossdomain_redirect(remote_host, id),
|
|
||||||
{:has_content_type, {_, content_type}} <-
|
{:has_content_type, {_, content_type}} <-
|
||||||
{:has_content_type, List.keyfind(headers, "content-type", 0)},
|
{:has_content_type, List.keyfind(headers, "content-type", 0)},
|
||||||
{:parse_content_type, {:ok, "application", subtype, type_params}} <-
|
{:parse_content_type, {:ok, "application", subtype, type_params}} <-
|
||||||
|
@ -369,8 +369,12 @@ def get_object(id) do
|
||||||
{"activity+json", _} ->
|
{"activity+json", _} ->
|
||||||
{:ok, final_id, body}
|
{:ok, final_id, body}
|
||||||
|
|
||||||
{"ld+json", %{"profile" => "https://www.w3.org/ns/activitystreams"}} ->
|
{"ld+json", %{"profile" => profiles}} ->
|
||||||
|
if "https://www.w3.org/ns/activitystreams" in String.split(profiles) do
|
||||||
{:ok, final_id, body}
|
{:ok, final_id, body}
|
||||||
|
else
|
||||||
|
{:error, {:content_type, content_type}}
|
||||||
|
end
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
{:error, {:content_type, content_type}}
|
{:error, {:content_type, content_type}}
|
||||||
|
|
|
@ -21,19 +21,12 @@ def search(user, search_query, options \\ []) do
|
||||||
offset = Keyword.get(options, :offset, 0)
|
offset = Keyword.get(options, :offset, 0)
|
||||||
author = Keyword.get(options, :author)
|
author = Keyword.get(options, :author)
|
||||||
|
|
||||||
search_function =
|
|
||||||
if :persistent_term.get({Pleroma.Repo, :postgres_version}) >= 11 do
|
|
||||||
:websearch
|
|
||||||
else
|
|
||||||
:plain
|
|
||||||
end
|
|
||||||
|
|
||||||
try do
|
try do
|
||||||
Activity
|
Activity
|
||||||
|> Activity.with_preloaded_object()
|
|> Activity.with_preloaded_object()
|
||||||
|> Activity.restrict_deactivated_users()
|
|> Activity.restrict_deactivated_users()
|
||||||
|> restrict_public()
|
|> restrict_public()
|
||||||
|> query_with(index_type, search_query, search_function)
|
|> query_with(index_type, search_query)
|
||||||
|> maybe_restrict_local(user)
|
|> maybe_restrict_local(user)
|
||||||
|> maybe_restrict_author(author)
|
|> maybe_restrict_author(author)
|
||||||
|> maybe_restrict_blocked(user)
|
|> maybe_restrict_blocked(user)
|
||||||
|
@ -72,25 +65,7 @@ def restrict_public(q) do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp query_with(q, :gin, search_query, :plain) do
|
defp query_with(q, :gin, search_query) do
|
||||||
%{rows: [[tsc]]} =
|
|
||||||
Ecto.Adapters.SQL.query!(
|
|
||||||
Pleroma.Repo,
|
|
||||||
"select current_setting('default_text_search_config')::regconfig::oid;"
|
|
||||||
)
|
|
||||||
|
|
||||||
from([a, o] in q,
|
|
||||||
where:
|
|
||||||
fragment(
|
|
||||||
"to_tsvector(?::oid::regconfig, ?->>'content') @@ plainto_tsquery(?)",
|
|
||||||
^tsc,
|
|
||||||
o.data,
|
|
||||||
^search_query
|
|
||||||
)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp query_with(q, :gin, search_query, :websearch) do
|
|
||||||
%{rows: [[tsc]]} =
|
%{rows: [[tsc]]} =
|
||||||
Ecto.Adapters.SQL.query!(
|
Ecto.Adapters.SQL.query!(
|
||||||
Pleroma.Repo,
|
Pleroma.Repo,
|
||||||
|
@ -108,19 +83,7 @@ defp query_with(q, :gin, search_query, :websearch) do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp query_with(q, :rum, search_query, :plain) do
|
defp query_with(q, :rum, search_query) do
|
||||||
from([a, o] in q,
|
|
||||||
where:
|
|
||||||
fragment(
|
|
||||||
"? @@ plainto_tsquery(?)",
|
|
||||||
o.fts_content,
|
|
||||||
^search_query
|
|
||||||
),
|
|
||||||
order_by: [fragment("? <=> now()::date", o.inserted_at)]
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp query_with(q, :rum, search_query, :websearch) do
|
|
||||||
from([a, o] in q,
|
from([a, o] in q,
|
||||||
where:
|
where:
|
||||||
fragment(
|
fragment(
|
||||||
|
|
|
@ -5,47 +5,25 @@
|
||||||
defmodule Pleroma.Signature do
|
defmodule Pleroma.Signature do
|
||||||
@behaviour HTTPSignatures.Adapter
|
@behaviour HTTPSignatures.Adapter
|
||||||
|
|
||||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators
|
|
||||||
alias Pleroma.Keys
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
alias Pleroma.User.SigningKey
|
||||||
|
require Logger
|
||||||
@known_suffixes ["/publickey", "/main-key", "#key"]
|
|
||||||
|
|
||||||
def key_id_to_actor_id(key_id) do
|
def key_id_to_actor_id(key_id) do
|
||||||
uri =
|
case SigningKey.key_id_to_ap_id(key_id) do
|
||||||
key_id
|
nil ->
|
||||||
|> URI.parse()
|
# hm, we SHOULD have gotten this in the pipeline before we hit here!
|
||||||
|> Map.put(:fragment, nil)
|
Logger.error("Could not figure out who owns the key #{key_id}")
|
||||||
|> Map.put(:query, nil)
|
{:error, :key_owner_not_found}
|
||||||
|> remove_suffix(@known_suffixes)
|
|
||||||
|
|
||||||
maybe_ap_id = URI.to_string(uri)
|
key ->
|
||||||
|
{:ok, key}
|
||||||
case ObjectValidators.ObjectID.cast(maybe_ap_id) do
|
|
||||||
{:ok, ap_id} ->
|
|
||||||
{:ok, ap_id}
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
case Pleroma.Web.WebFinger.finger(maybe_ap_id) do
|
|
||||||
{:ok, %{"ap_id" => ap_id}} -> {:ok, ap_id}
|
|
||||||
_ -> {:error, maybe_ap_id}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
defp remove_suffix(uri, [test | rest]) do
|
|
||||||
if not is_nil(uri.path) and String.ends_with?(uri.path, test) do
|
|
||||||
Map.put(uri, :path, String.replace(uri.path, test, ""))
|
|
||||||
else
|
|
||||||
remove_suffix(uri, rest)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp remove_suffix(uri, []), do: uri
|
|
||||||
|
|
||||||
def fetch_public_key(conn) do
|
def fetch_public_key(conn) do
|
||||||
with %{"keyId" => kid} <- HTTPSignatures.signature_for_conn(conn),
|
with %{"keyId" => kid} <- HTTPSignatures.signature_for_conn(conn),
|
||||||
|
{:ok, %SigningKey{}} <- SigningKey.get_or_fetch_by_key_id(kid),
|
||||||
{:ok, actor_id} <- key_id_to_actor_id(kid),
|
{:ok, actor_id} <- key_id_to_actor_id(kid),
|
||||||
{:ok, public_key} <- User.get_public_key_for_ap_id(actor_id) do
|
{:ok, public_key} <- User.get_public_key_for_ap_id(actor_id) do
|
||||||
{:ok, public_key}
|
{:ok, public_key}
|
||||||
|
@ -57,8 +35,8 @@ def fetch_public_key(conn) do
|
||||||
|
|
||||||
def refetch_public_key(conn) do
|
def refetch_public_key(conn) do
|
||||||
with %{"keyId" => kid} <- HTTPSignatures.signature_for_conn(conn),
|
with %{"keyId" => kid} <- HTTPSignatures.signature_for_conn(conn),
|
||||||
|
{:ok, %SigningKey{}} <- SigningKey.get_or_fetch_by_key_id(kid),
|
||||||
{:ok, actor_id} <- key_id_to_actor_id(kid),
|
{:ok, actor_id} <- key_id_to_actor_id(kid),
|
||||||
{:ok, _user} <- ActivityPub.make_user_from_ap_id(actor_id),
|
|
||||||
{:ok, public_key} <- User.get_public_key_for_ap_id(actor_id) do
|
{:ok, public_key} <- User.get_public_key_for_ap_id(actor_id) do
|
||||||
{:ok, public_key}
|
{:ok, public_key}
|
||||||
else
|
else
|
||||||
|
@ -67,9 +45,9 @@ def refetch_public_key(conn) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def sign(%User{keys: keys} = user, headers) do
|
def sign(%User{} = user, headers) do
|
||||||
with {:ok, private_key, _} <- Keys.keys_from_pem(keys) do
|
with {:ok, private_key} <- SigningKey.private_key(user) do
|
||||||
HTTPSignatures.sign(private_key, user.ap_id <> "#main-key", headers)
|
HTTPSignatures.sign(private_key, SigningKey.local_key_id(user.ap_id), headers)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripMetadata do
|
||||||
|
|
||||||
# Formats not compatible with exiftool at this time
|
# Formats not compatible with exiftool at this time
|
||||||
def filter(%Pleroma.Upload{content_type: "image/webp"}), do: {:ok, :noop}
|
def filter(%Pleroma.Upload{content_type: "image/webp"}), do: {:ok, :noop}
|
||||||
|
def filter(%Pleroma.Upload{content_type: "image/bmp"}), do: {:ok, :noop}
|
||||||
def filter(%Pleroma.Upload{content_type: "image/svg+xml"}), do: {:ok, :noop}
|
def filter(%Pleroma.Upload{content_type: "image/svg+xml"}), do: {:ok, :noop}
|
||||||
|
|
||||||
def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do
|
def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do
|
||||||
|
|
|
@ -25,7 +25,6 @@ defmodule Pleroma.User do
|
||||||
alias Pleroma.Hashtag
|
alias Pleroma.Hashtag
|
||||||
alias Pleroma.User.HashtagFollow
|
alias Pleroma.User.HashtagFollow
|
||||||
alias Pleroma.HTML
|
alias Pleroma.HTML
|
||||||
alias Pleroma.Keys
|
|
||||||
alias Pleroma.MFA
|
alias Pleroma.MFA
|
||||||
alias Pleroma.Notification
|
alias Pleroma.Notification
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
|
@ -43,6 +42,7 @@ defmodule Pleroma.User do
|
||||||
alias Pleroma.Web.OAuth
|
alias Pleroma.Web.OAuth
|
||||||
alias Pleroma.Web.RelMe
|
alias Pleroma.Web.RelMe
|
||||||
alias Pleroma.Workers.BackgroundWorker
|
alias Pleroma.Workers.BackgroundWorker
|
||||||
|
alias Pleroma.User.SigningKey
|
||||||
|
|
||||||
use Pleroma.Web, :verified_routes
|
use Pleroma.Web, :verified_routes
|
||||||
|
|
||||||
|
@ -101,7 +101,6 @@ defmodule Pleroma.User do
|
||||||
field(:password, :string, virtual: true)
|
field(:password, :string, virtual: true)
|
||||||
field(:password_confirmation, :string, virtual: true)
|
field(:password_confirmation, :string, virtual: true)
|
||||||
field(:keys, :string)
|
field(:keys, :string)
|
||||||
field(:public_key, :string)
|
|
||||||
field(:ap_id, :string)
|
field(:ap_id, :string)
|
||||||
field(:avatar, :map, default: %{})
|
field(:avatar, :map, default: %{})
|
||||||
field(:local, :boolean, default: true)
|
field(:local, :boolean, default: true)
|
||||||
|
@ -222,6 +221,10 @@ defmodule Pleroma.User do
|
||||||
on_replace: :delete
|
on_replace: :delete
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# FOR THE FUTURE: We might want to make this a one-to-many relationship
|
||||||
|
# it's entirely possible right now, but we don't have a use case for it
|
||||||
|
has_one(:signing_key, SigningKey, foreign_key: :user_id)
|
||||||
|
|
||||||
timestamps()
|
timestamps()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -457,6 +460,7 @@ def remote_user_changeset(struct \\ %User{local: false}, params) do
|
||||||
|> fix_follower_address()
|
|> fix_follower_address()
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
|> Repo.preload(:signing_key)
|
||||||
|> cast(
|
|> cast(
|
||||||
params,
|
params,
|
||||||
[
|
[
|
||||||
|
@ -466,7 +470,6 @@ def remote_user_changeset(struct \\ %User{local: false}, params) do
|
||||||
:inbox,
|
:inbox,
|
||||||
:shared_inbox,
|
:shared_inbox,
|
||||||
:nickname,
|
:nickname,
|
||||||
:public_key,
|
|
||||||
:avatar,
|
:avatar,
|
||||||
:ap_enabled,
|
:ap_enabled,
|
||||||
:banner,
|
:banner,
|
||||||
|
@ -495,6 +498,7 @@ def remote_user_changeset(struct \\ %User{local: false}, params) do
|
||||||
|> validate_required([:ap_id])
|
|> validate_required([:ap_id])
|
||||||
|> validate_required([:name], trim: false)
|
|> validate_required([:name], trim: false)
|
||||||
|> unique_constraint(:nickname)
|
|> unique_constraint(:nickname)
|
||||||
|
|> cast_assoc(:signing_key, with: &SigningKey.remote_changeset/2, required: false)
|
||||||
|> validate_format(:nickname, @email_regex)
|
|> validate_format(:nickname, @email_regex)
|
||||||
|> validate_length(:bio, max: bio_limit)
|
|> validate_length(:bio, max: bio_limit)
|
||||||
|> validate_length(:name, max: name_limit)
|
|> validate_length(:name, max: name_limit)
|
||||||
|
@ -526,7 +530,6 @@ def update_changeset(struct, params \\ %{}) do
|
||||||
:name,
|
:name,
|
||||||
:emoji,
|
:emoji,
|
||||||
:avatar,
|
:avatar,
|
||||||
:public_key,
|
|
||||||
:inbox,
|
:inbox,
|
||||||
:shared_inbox,
|
:shared_inbox,
|
||||||
:is_locked,
|
:is_locked,
|
||||||
|
@ -570,6 +573,7 @@ def update_changeset(struct, params \\ %{}) do
|
||||||
:pleroma_settings_store,
|
:pleroma_settings_store,
|
||||||
&{:ok, Map.merge(struct.pleroma_settings_store, &1)}
|
&{:ok, Map.merge(struct.pleroma_settings_store, &1)}
|
||||||
)
|
)
|
||||||
|
|> cast_assoc(:signing_key, with: &SigningKey.remote_changeset/2, requred: false)
|
||||||
|> validate_fields(false, struct)
|
|> validate_fields(false, struct)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -828,8 +832,10 @@ def put_following_and_follower_and_featured_address(changeset) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp put_private_key(changeset) do
|
defp put_private_key(changeset) do
|
||||||
{:ok, pem} = Keys.generate_rsa_pem()
|
ap_id = get_field(changeset, :ap_id)
|
||||||
put_change(changeset, :keys, pem)
|
|
||||||
|
changeset
|
||||||
|
|> put_assoc(:signing_key, SigningKey.generate_local_keys(ap_id))
|
||||||
end
|
end
|
||||||
|
|
||||||
defp autofollow_users(user) do
|
defp autofollow_users(user) do
|
||||||
|
@ -1146,7 +1152,8 @@ def update_and_set_cache(%{data: %Pleroma.User{} = user} = changeset) do
|
||||||
was_superuser_before_update = User.superuser?(user)
|
was_superuser_before_update = User.superuser?(user)
|
||||||
|
|
||||||
with {:ok, user} <- Repo.update(changeset, stale_error_field: :id) do
|
with {:ok, user} <- Repo.update(changeset, stale_error_field: :id) do
|
||||||
set_cache(user)
|
user
|
||||||
|
|> set_cache()
|
||||||
end
|
end
|
||||||
|> maybe_remove_report_notifications(was_superuser_before_update)
|
|> maybe_remove_report_notifications(was_superuser_before_update)
|
||||||
end
|
end
|
||||||
|
@ -1624,8 +1631,12 @@ def blocks_user?(%User{} = user, %User{} = target) do
|
||||||
|
|
||||||
def blocks_user?(_, _), do: false
|
def blocks_user?(_, _), do: false
|
||||||
|
|
||||||
def blocks_domain?(%User{} = user, %User{} = target) do
|
def blocks_domain?(%User{} = user, %User{ap_id: ap_id}) do
|
||||||
%{host: host} = URI.parse(target.ap_id)
|
blocks_domain?(user, ap_id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def blocks_domain?(%User{} = user, url) when is_binary(url) do
|
||||||
|
%{host: host} = URI.parse(url)
|
||||||
Enum.member?(user.domain_blocks, host)
|
Enum.member?(user.domain_blocks, host)
|
||||||
# TODO: functionality should probably be changed such that subdomains block as well,
|
# TODO: functionality should probably be changed such that subdomains block as well,
|
||||||
# but as it stands, this just hecks up the relationships endpoint
|
# but as it stands, this just hecks up the relationships endpoint
|
||||||
|
@ -2047,24 +2058,16 @@ defp create_service_actor(uri, nickname) do
|
||||||
|> set_cache()
|
|> set_cache()
|
||||||
end
|
end
|
||||||
|
|
||||||
def public_key(%{public_key: public_key_pem}) when is_binary(public_key_pem) do
|
defdelegate public_key(user), to: SigningKey
|
||||||
key =
|
|
||||||
public_key_pem
|
|
||||||
|> :public_key.pem_decode()
|
|
||||||
|> hd()
|
|
||||||
|> :public_key.pem_entry_decode()
|
|
||||||
|
|
||||||
{:ok, key}
|
|
||||||
end
|
|
||||||
|
|
||||||
def public_key(_), do: {:error, "key not found"}
|
|
||||||
|
|
||||||
def get_public_key_for_ap_id(ap_id) do
|
def get_public_key_for_ap_id(ap_id) do
|
||||||
with {:ok, %User{} = user} <- get_or_fetch_by_ap_id(ap_id),
|
with {:ok, %User{} = user} <- get_or_fetch_by_ap_id(ap_id),
|
||||||
{:ok, public_key} <- public_key(user) do
|
{:ok, public_key} <- SigningKey.public_key(user) do
|
||||||
{:ok, public_key}
|
{:ok, public_key}
|
||||||
else
|
else
|
||||||
_ -> :error
|
e ->
|
||||||
|
Logger.error("Could not get public key for #{ap_id}.\n#{inspect(e)}")
|
||||||
|
{:error, e}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
262
lib/pleroma/user/signing_key.ex
Normal file
262
lib/pleroma/user/signing_key.ex
Normal file
|
@ -0,0 +1,262 @@
|
||||||
|
defmodule Pleroma.User.SigningKey do
|
||||||
|
use Ecto.Schema
|
||||||
|
import Ecto.Query
|
||||||
|
import Ecto.Changeset
|
||||||
|
require Pleroma.Constants
|
||||||
|
alias Pleroma.User
|
||||||
|
alias Pleroma.Repo
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
|
@primary_key false
|
||||||
|
schema "signing_keys" do
|
||||||
|
belongs_to(:user, Pleroma.User, type: FlakeId.Ecto.CompatType)
|
||||||
|
field :public_key, :string
|
||||||
|
field :private_key, :string
|
||||||
|
# This is an arbitrary field given by the remote instance
|
||||||
|
field :key_id, :string, primary_key: true
|
||||||
|
timestamps()
|
||||||
|
end
|
||||||
|
|
||||||
|
def load_key(%User{} = user) do
|
||||||
|
user
|
||||||
|
|> Repo.preload(:signing_key)
|
||||||
|
end
|
||||||
|
|
||||||
|
def key_id_of_local_user(%User{local: true} = user) do
|
||||||
|
case Repo.preload(user, :signing_key) do
|
||||||
|
%User{signing_key: %__MODULE__{key_id: key_id}} -> key_id
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec remote_changeset(__MODULE__, map) :: Changeset.t()
|
||||||
|
def remote_changeset(%__MODULE__{} = signing_key, attrs) do
|
||||||
|
signing_key
|
||||||
|
|> cast(attrs, [:public_key, :key_id])
|
||||||
|
|> validate_required([:public_key, :key_id])
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec key_id_to_user_id(String.t()) :: String.t() | nil
|
||||||
|
@doc """
|
||||||
|
Given a key ID, return the user ID associated with that key.
|
||||||
|
Returns nil if the key ID is not found.
|
||||||
|
"""
|
||||||
|
def key_id_to_user_id(key_id) do
|
||||||
|
from(sk in __MODULE__, where: sk.key_id == ^key_id)
|
||||||
|
|> select([sk], sk.user_id)
|
||||||
|
|> Repo.one()
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec key_id_to_ap_id(String.t()) :: String.t() | nil
|
||||||
|
@doc """
|
||||||
|
Given a key ID, return the AP ID associated with that key.
|
||||||
|
Returns nil if the key ID is not found.
|
||||||
|
"""
|
||||||
|
def key_id_to_ap_id(key_id) do
|
||||||
|
Logger.debug("Looking up key ID: #{key_id}")
|
||||||
|
|
||||||
|
result =
|
||||||
|
from(sk in __MODULE__, where: sk.key_id == ^key_id)
|
||||||
|
|> join(:inner, [sk], u in User, on: sk.user_id == u.id)
|
||||||
|
|> select([sk, u], %{user: u})
|
||||||
|
|> Repo.one()
|
||||||
|
|
||||||
|
case result do
|
||||||
|
%{user: %User{ap_id: ap_id}} -> ap_id
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec generate_rsa_pem() :: {:ok, binary()}
|
||||||
|
@doc """
|
||||||
|
Generate a new RSA private key and return it as a PEM-encoded string.
|
||||||
|
"""
|
||||||
|
def generate_rsa_pem do
|
||||||
|
key = :public_key.generate_key({:rsa, 2048, 65_537})
|
||||||
|
entry = :public_key.pem_entry_encode(:RSAPrivateKey, key)
|
||||||
|
pem = :public_key.pem_encode([entry]) |> String.trim_trailing()
|
||||||
|
{:ok, pem}
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec generate_local_keys(String.t()) :: {:ok, Changeset.t()} | {:error, String.t()}
|
||||||
|
@doc """
|
||||||
|
Generate a new RSA key pair and create a changeset for it
|
||||||
|
"""
|
||||||
|
def generate_local_keys(ap_id) do
|
||||||
|
{:ok, private_pem} = generate_rsa_pem()
|
||||||
|
{:ok, local_pem} = private_pem_to_public_pem(private_pem)
|
||||||
|
|
||||||
|
%__MODULE__{}
|
||||||
|
|> change()
|
||||||
|
|> put_change(:public_key, local_pem)
|
||||||
|
|> put_change(:private_key, private_pem)
|
||||||
|
|> put_change(:key_id, local_key_id(ap_id))
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec local_key_id(String.t()) :: String.t()
|
||||||
|
@doc """
|
||||||
|
Given an AP ID, return the key ID for the local user.
|
||||||
|
"""
|
||||||
|
def local_key_id(ap_id) do
|
||||||
|
ap_id <> "#main-key"
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec private_pem_to_public_pem(binary) :: {:ok, binary()} | {:error, String.t()}
|
||||||
|
@doc """
|
||||||
|
Given a private key in PEM format, return the corresponding public key in PEM format.
|
||||||
|
"""
|
||||||
|
def private_pem_to_public_pem(private_pem) do
|
||||||
|
[private_key_code] = :public_key.pem_decode(private_pem)
|
||||||
|
private_key = :public_key.pem_entry_decode(private_key_code)
|
||||||
|
{:RSAPrivateKey, _, modulus, exponent, _, _, _, _, _, _, _} = private_key
|
||||||
|
public_key = {:RSAPublicKey, modulus, exponent}
|
||||||
|
public_key = :public_key.pem_entry_encode(:SubjectPublicKeyInfo, public_key)
|
||||||
|
{:ok, :public_key.pem_encode([public_key])}
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec public_key(User.t()) :: {:ok, binary()} | {:error, String.t()}
|
||||||
|
@doc """
|
||||||
|
Given a user, return the public key for that user in binary format.
|
||||||
|
"""
|
||||||
|
def public_key(%User{} = user) do
|
||||||
|
case Repo.preload(user, :signing_key) do
|
||||||
|
%User{signing_key: %__MODULE__{public_key: public_key_pem}} ->
|
||||||
|
key =
|
||||||
|
public_key_pem
|
||||||
|
|> :public_key.pem_decode()
|
||||||
|
|> hd()
|
||||||
|
|> :public_key.pem_entry_decode()
|
||||||
|
|
||||||
|
{:ok, key}
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
{:error, "key not found"}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def public_key(_), do: {:error, "key not found"}
|
||||||
|
|
||||||
|
def public_key_pem(%User{} = user) do
|
||||||
|
case Repo.preload(user, :signing_key) do
|
||||||
|
%User{signing_key: %__MODULE__{public_key: public_key_pem}} -> {:ok, public_key_pem}
|
||||||
|
_ -> {:error, "key not found"}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def public_key_pem(_e) do
|
||||||
|
{:error, "key not found"}
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec private_key(User.t()) :: {:ok, binary()} | {:error, String.t()}
|
||||||
|
@doc """
|
||||||
|
Given a user, return the private key for that user in binary format.
|
||||||
|
"""
|
||||||
|
def private_key(%User{} = user) do
|
||||||
|
case Repo.preload(user, :signing_key) do
|
||||||
|
%{signing_key: %__MODULE__{private_key: private_key_pem}} ->
|
||||||
|
key =
|
||||||
|
private_key_pem
|
||||||
|
|> :public_key.pem_decode()
|
||||||
|
|> hd()
|
||||||
|
|> :public_key.pem_entry_decode()
|
||||||
|
|
||||||
|
{:ok, key}
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
{:error, "key not found"}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec get_or_fetch_by_key_id(String.t()) :: {:ok, __MODULE__} | {:error, String.t()}
|
||||||
|
@doc """
|
||||||
|
Given a key ID, return the signing key associated with that key.
|
||||||
|
Will either return the key if it exists locally, or fetch it from the remote instance.
|
||||||
|
"""
|
||||||
|
def get_or_fetch_by_key_id(key_id) do
|
||||||
|
case key_id_to_user_id(key_id) do
|
||||||
|
nil ->
|
||||||
|
fetch_remote_key(key_id)
|
||||||
|
|
||||||
|
user_id ->
|
||||||
|
{:ok, Repo.get_by(__MODULE__, user_id: user_id)}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec fetch_remote_key(String.t()) :: {:ok, __MODULE__} | {:error, String.t()}
|
||||||
|
@doc """
|
||||||
|
Fetch a remote key by key ID.
|
||||||
|
Will send a request to the remote instance to get the key ID.
|
||||||
|
This request should, at the very least, return a user ID and a public key object.
|
||||||
|
Though bear in mind that some implementations (looking at you, pleroma) may require a signature for this request.
|
||||||
|
This has the potential to create an infinite loop if the remote instance requires a signature to fetch the key...
|
||||||
|
So if we're rejected, we should probably just give up.
|
||||||
|
"""
|
||||||
|
def fetch_remote_key(key_id) do
|
||||||
|
Logger.debug("Fetching remote key: #{key_id}")
|
||||||
|
resp = Pleroma.Object.Fetcher.fetch_and_contain_remote_object_from_id(key_id)
|
||||||
|
|
||||||
|
case resp do
|
||||||
|
{:ok, _body} ->
|
||||||
|
case handle_signature_response(resp) do
|
||||||
|
{:ok, ap_id, public_key_pem} ->
|
||||||
|
Logger.debug("Fetched remote key: #{ap_id}")
|
||||||
|
# fetch the user
|
||||||
|
{:ok, user} = User.get_or_fetch_by_ap_id(ap_id)
|
||||||
|
# store the key
|
||||||
|
key = %__MODULE__{
|
||||||
|
user_id: user.id,
|
||||||
|
public_key: public_key_pem,
|
||||||
|
key_id: key_id
|
||||||
|
}
|
||||||
|
|
||||||
|
Repo.insert(key, on_conflict: :replace_all, conflict_target: :key_id)
|
||||||
|
|
||||||
|
e ->
|
||||||
|
Logger.debug("Failed to fetch remote key: #{inspect(e)}")
|
||||||
|
{:error, "Could not fetch key"}
|
||||||
|
end
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
Logger.debug("Failed to fetch remote key: #{inspect(resp)}")
|
||||||
|
{:error, "Could not fetch key"}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Take the response from the remote instance and extract the key details
|
||||||
|
# will check if the key ID matches the owner of the key, if not, error
|
||||||
|
defp extract_key_details(%{"id" => ap_id, "publicKey" => public_key}) do
|
||||||
|
if ap_id !== public_key["owner"] do
|
||||||
|
{:error, "Key ID does not match owner"}
|
||||||
|
else
|
||||||
|
%{"publicKeyPem" => public_key_pem} = public_key
|
||||||
|
{:ok, ap_id, public_key_pem}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp handle_signature_response({:ok, body}) do
|
||||||
|
case body do
|
||||||
|
%{
|
||||||
|
"type" => "CryptographicKey",
|
||||||
|
"publicKeyPem" => public_key_pem,
|
||||||
|
"owner" => ap_id
|
||||||
|
} ->
|
||||||
|
{:ok, ap_id, public_key_pem}
|
||||||
|
|
||||||
|
# for when we get a subset of the user object
|
||||||
|
%{
|
||||||
|
"id" => _user_id,
|
||||||
|
"publicKey" => _public_key,
|
||||||
|
"type" => actor_type
|
||||||
|
}
|
||||||
|
when actor_type in Pleroma.Constants.actor_types() ->
|
||||||
|
extract_key_details(body)
|
||||||
|
|
||||||
|
%{"error" => error} ->
|
||||||
|
{:error, error}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp handle_signature_response({:error, e}), do: {:error, e}
|
||||||
|
defp handle_signature_response(other), do: {:error, "Could not fetch key: #{inspect(other)}"}
|
||||||
|
end
|
|
@ -155,9 +155,7 @@ def insert(map, local \\ true, fake \\ false, bypass_actor_check \\ false) when
|
||||||
# Splice in the child object if we have one.
|
# Splice in the child object if we have one.
|
||||||
activity = Maps.put_if_present(activity, :object, object)
|
activity = Maps.put_if_present(activity, :object, object)
|
||||||
|
|
||||||
ConcurrentLimiter.limit(Pleroma.Web.RichMedia.Helpers, fn ->
|
Pleroma.Web.RichMedia.Card.get_by_activity(activity)
|
||||||
Task.start(fn -> Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity) end)
|
|
||||||
end)
|
|
||||||
|
|
||||||
# Add local posts to search index
|
# Add local posts to search index
|
||||||
if local, do: Pleroma.Search.add_to_index(activity)
|
if local, do: Pleroma.Search.add_to_index(activity)
|
||||||
|
@ -185,7 +183,7 @@ def insert(map, local \\ true, fake \\ false, bypass_actor_check \\ false) when
|
||||||
id: "pleroma:fakeid"
|
id: "pleroma:fakeid"
|
||||||
}
|
}
|
||||||
|
|
||||||
Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
|
Pleroma.Web.RichMedia.Card.get_by_activity(activity)
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
|
|
||||||
{:remote_limit_pass, _} ->
|
{:remote_limit_pass, _} ->
|
||||||
|
@ -1549,6 +1547,17 @@ defp normalize_attachment(%{} = attachment), do: [attachment]
|
||||||
defp normalize_attachment(attachment) when is_list(attachment), do: attachment
|
defp normalize_attachment(attachment) when is_list(attachment), do: attachment
|
||||||
defp normalize_attachment(_), do: []
|
defp normalize_attachment(_), do: []
|
||||||
|
|
||||||
|
defp maybe_make_public_key_object(data) do
|
||||||
|
if is_map(data["publicKey"]) && is_binary(data["publicKey"]["publicKeyPem"]) do
|
||||||
|
%{
|
||||||
|
public_key: data["publicKey"]["publicKeyPem"],
|
||||||
|
key_id: data["publicKey"]["id"]
|
||||||
|
}
|
||||||
|
else
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp object_to_user_data(data, additional) do
|
defp object_to_user_data(data, additional) do
|
||||||
fields =
|
fields =
|
||||||
data
|
data
|
||||||
|
@ -1580,9 +1589,16 @@ defp object_to_user_data(data, additional) do
|
||||||
featured_address = data["featured"]
|
featured_address = data["featured"]
|
||||||
{:ok, pinned_objects} = fetch_and_prepare_featured_from_ap_id(featured_address)
|
{:ok, pinned_objects} = fetch_and_prepare_featured_from_ap_id(featured_address)
|
||||||
|
|
||||||
public_key =
|
# first, check that the owner is correct
|
||||||
if is_map(data["publicKey"]) && is_binary(data["publicKey"]["publicKeyPem"]) do
|
signing_key =
|
||||||
data["publicKey"]["publicKeyPem"]
|
if data["id"] !== data["publicKey"]["owner"] do
|
||||||
|
Logger.error(
|
||||||
|
"Owner of the public key is not the same as the actor - not saving the public key."
|
||||||
|
)
|
||||||
|
|
||||||
|
nil
|
||||||
|
else
|
||||||
|
maybe_make_public_key_object(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_inbox =
|
shared_inbox =
|
||||||
|
@ -1626,7 +1642,7 @@ defp object_to_user_data(data, additional) do
|
||||||
bio: data["summary"] || "",
|
bio: data["summary"] || "",
|
||||||
actor_type: actor_type,
|
actor_type: actor_type,
|
||||||
also_known_as: also_known_as,
|
also_known_as: also_known_as,
|
||||||
public_key: public_key,
|
signing_key: signing_key,
|
||||||
inbox: data["inbox"],
|
inbox: data["inbox"],
|
||||||
shared_inbox: shared_inbox,
|
shared_inbox: shared_inbox,
|
||||||
pinned_objects: pinned_objects,
|
pinned_objects: pinned_objects,
|
||||||
|
|
|
@ -60,7 +60,26 @@ defp relay_active?(conn, _) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def user(conn, %{"nickname" => nickname}) do
|
@doc """
|
||||||
|
Render the user's AP data
|
||||||
|
WARNING: we cannot actually check if the request has a fragment! so let's play defensively
|
||||||
|
- IF we have a valid signature, serve full user
|
||||||
|
- IF we do not, and authorized_fetch_mode is enabled, serve the key only
|
||||||
|
- OTHERWISE, serve the full actor (since we don't need to worry about the signature)
|
||||||
|
"""
|
||||||
|
def user(%{assigns: %{valid_signature: true}} = conn, params) do
|
||||||
|
render_full_user(conn, params)
|
||||||
|
end
|
||||||
|
|
||||||
|
def user(conn, params) do
|
||||||
|
if Pleroma.Config.get([:activitypub, :authorized_fetch_mode], false) do
|
||||||
|
render_key_only_user(conn, params)
|
||||||
|
else
|
||||||
|
render_full_user(conn, params)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp render_full_user(conn, %{"nickname" => nickname}) do
|
||||||
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
||||||
conn
|
conn
|
||||||
|> put_resp_content_type("application/activity+json")
|
|> put_resp_content_type("application/activity+json")
|
||||||
|
@ -72,6 +91,18 @@ def user(conn, %{"nickname" => nickname}) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def render_key_only_user(conn, %{"nickname" => nickname}) do
|
||||||
|
with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do
|
||||||
|
conn
|
||||||
|
|> put_resp_content_type("application/activity+json")
|
||||||
|
|> put_view(UserView)
|
||||||
|
|> render("keys.json", %{user: user})
|
||||||
|
else
|
||||||
|
nil -> {:error, :not_found}
|
||||||
|
%{local: false} -> {:error, :not_found}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def object(%{assigns: assigns} = conn, _) do
|
def object(%{assigns: assigns} = conn, _) do
|
||||||
with ap_id <- Endpoint.url() <> conn.request_path,
|
with ap_id <- Endpoint.url() <> conn.request_path,
|
||||||
%Object{} = object <- Object.get_cached_by_ap_id(ap_id),
|
%Object{} = object <- Object.get_cached_by_ap_id(ap_id),
|
||||||
|
|
|
@ -233,7 +233,7 @@ def config_descriptions(policies) do
|
||||||
if function_exported?(policy, :config_description, 0) do
|
if function_exported?(policy, :config_description, 0) do
|
||||||
description =
|
description =
|
||||||
@default_description
|
@default_description
|
||||||
|> Map.merge(policy.config_description)
|
|> Map.merge(policy.config_description())
|
||||||
|> Map.put(:group, :pleroma)
|
|> Map.put(:group, :pleroma)
|
||||||
|> Map.put(:tab, :mrf)
|
|> Map.put(:tab, :mrf)
|
||||||
|> Map.put(:type, :group)
|
|> Map.put(:type, :group)
|
||||||
|
|
|
@ -101,10 +101,19 @@ defp get_extension_if_safe(response) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp get_int_header(headers, header_name, default \\ nil) do
|
||||||
|
with rawval when rawval != :undefined <- :proplists.get_value(header_name, headers),
|
||||||
|
{int, ""} <- Integer.parse(rawval) do
|
||||||
|
int
|
||||||
|
else
|
||||||
|
_ -> default
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp is_remote_size_within_limit?(url) do
|
defp is_remote_size_within_limit?(url) do
|
||||||
with {:ok, %{status: status, headers: headers} = _response} when status in 200..299 <-
|
with {:ok, %{status: status, headers: headers} = _response} when status in 200..299 <-
|
||||||
Pleroma.HTTP.request(:head, url, nil, [], []) do
|
Pleroma.HTTP.request(:head, url, nil, [], []) do
|
||||||
content_length = :proplists.get_value("content-length", headers, nil)
|
content_length = get_int_header(headers, "content-length")
|
||||||
size_limit = Config.get([:mrf_steal_emoji, :size_limit], @size_limit)
|
size_limit = Config.get([:mrf_steal_emoji, :size_limit], @size_limit)
|
||||||
|
|
||||||
accept_unknown =
|
accept_unknown =
|
||||||
|
@ -172,7 +181,7 @@ def filter(message), do: {:ok, message}
|
||||||
description: <<_::272, _::_*256>>,
|
description: <<_::272, _::_*256>>,
|
||||||
key: :hosts | :rejected_shortcodes | :size_limit,
|
key: :hosts | :rejected_shortcodes | :size_limit,
|
||||||
suggestions: [any(), ...],
|
suggestions: [any(), ...],
|
||||||
type: {:list, :string} | {:list, :string} | :integer
|
type: {:list, :string} | {:list, :string} | :integer | :boolean
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
],
|
],
|
||||||
|
@ -209,6 +218,12 @@ def config_description do
|
||||||
type: :integer,
|
type: :integer,
|
||||||
description: "File size limit (in bytes), checked before an emoji is saved to the disk",
|
description: "File size limit (in bytes), checked before an emoji is saved to the disk",
|
||||||
suggestions: ["100000"]
|
suggestions: ["100000"]
|
||||||
|
},
|
||||||
|
%{
|
||||||
|
key: :download_unknown_size,
|
||||||
|
type: :boolean,
|
||||||
|
description: "Whether to download emoji if size can't be determined ahead of time",
|
||||||
|
suggestions: [false, true]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.UserValidator do
|
||||||
@behaviour Pleroma.Web.ActivityPub.ObjectValidator.Validating
|
@behaviour Pleroma.Web.ActivityPub.ObjectValidator.Validating
|
||||||
|
|
||||||
alias Pleroma.Object.Containment
|
alias Pleroma.Object.Containment
|
||||||
alias Pleroma.Signature
|
|
||||||
|
|
||||||
require Pleroma.Constants
|
require Pleroma.Constants
|
||||||
|
|
||||||
|
@ -23,8 +22,7 @@ def validate(object, meta)
|
||||||
|
|
||||||
def validate(%{"type" => type, "id" => _id} = data, meta)
|
def validate(%{"type" => type, "id" => _id} = data, meta)
|
||||||
when type in Pleroma.Constants.actor_types() do
|
when type in Pleroma.Constants.actor_types() do
|
||||||
with :ok <- validate_pubkey(data),
|
with :ok <- validate_inbox(data),
|
||||||
:ok <- validate_inbox(data),
|
|
||||||
:ok <- contain_collection_origin(data) do
|
:ok <- contain_collection_origin(data) do
|
||||||
{:ok, data, meta}
|
{:ok, data, meta}
|
||||||
else
|
else
|
||||||
|
@ -35,33 +33,6 @@ def validate(%{"type" => type, "id" => _id} = data, meta)
|
||||||
|
|
||||||
def validate(_, _), do: {:error, "Not a user object"}
|
def validate(_, _), do: {:error, "Not a user object"}
|
||||||
|
|
||||||
defp mabye_validate_owner(nil, _actor), do: :ok
|
|
||||||
defp mabye_validate_owner(actor, actor), do: :ok
|
|
||||||
defp mabye_validate_owner(_owner, _actor), do: :error
|
|
||||||
|
|
||||||
defp validate_pubkey(
|
|
||||||
%{"id" => id, "publicKey" => %{"id" => pk_id, "publicKeyPem" => _key}} = data
|
|
||||||
)
|
|
||||||
when id != nil do
|
|
||||||
with {_, {:ok, kactor}} <- {:key, Signature.key_id_to_actor_id(pk_id)},
|
|
||||||
true <- id == kactor,
|
|
||||||
:ok <- mabye_validate_owner(Map.get(data, "owner"), id) do
|
|
||||||
:ok
|
|
||||||
else
|
|
||||||
{:key, _} ->
|
|
||||||
{:error, "Unable to determine actor id from key id"}
|
|
||||||
|
|
||||||
false ->
|
|
||||||
{:error, "Key id does not relate to user id"}
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
{:error, "Actor does not own its public key"}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# pubkey is optional atm
|
|
||||||
defp validate_pubkey(_data), do: :ok
|
|
||||||
|
|
||||||
defp validate_inbox(%{"id" => id, "inbox" => inbox}) do
|
defp validate_inbox(%{"id" => id, "inbox" => inbox}) do
|
||||||
case Containment.same_origin(id, inbox) do
|
case Containment.same_origin(id, inbox) do
|
||||||
:ok -> :ok
|
:ok -> :ok
|
||||||
|
|
|
@ -225,9 +225,7 @@ def handle(%{data: %{"type" => "Create"}} = activity, meta) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ConcurrentLimiter.limit(Pleroma.Web.RichMedia.Helpers, fn ->
|
Pleroma.Web.RichMedia.Card.get_by_activity(activity)
|
||||||
Task.start(fn -> Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity) end)
|
|
||||||
end)
|
|
||||||
|
|
||||||
Pleroma.Search.add_to_index(Map.put(activity, :object, object))
|
Pleroma.Search.add_to_index(Map.put(activity, :object, object))
|
||||||
|
|
||||||
|
|
|
@ -951,7 +951,7 @@ defp build_emoji_tag({name, url}) do
|
||||||
"name" => ":" <> name <> ":",
|
"name" => ":" <> name <> ":",
|
||||||
"type" => "Emoji",
|
"type" => "Emoji",
|
||||||
"updated" => "1970-01-01T00:00:00Z",
|
"updated" => "1970-01-01T00:00:00Z",
|
||||||
"id" => url
|
"id" => nil
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
defmodule Pleroma.Web.ActivityPub.UserView do
|
defmodule Pleroma.Web.ActivityPub.UserView do
|
||||||
use Pleroma.Web, :view
|
use Pleroma.Web, :view
|
||||||
|
|
||||||
alias Pleroma.Keys
|
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
@ -33,9 +32,7 @@ def render("endpoints.json", %{user: %User{local: true} = _user}) do
|
||||||
def render("endpoints.json", _), do: %{}
|
def render("endpoints.json", _), do: %{}
|
||||||
|
|
||||||
def render("service.json", %{user: user}) do
|
def render("service.json", %{user: user}) do
|
||||||
{:ok, _, public_key} = Keys.keys_from_pem(user.keys)
|
{:ok, public_key} = User.SigningKey.public_key_pem(user)
|
||||||
public_key = :public_key.pem_entry_encode(:SubjectPublicKeyInfo, public_key)
|
|
||||||
public_key = :public_key.pem_encode([public_key])
|
|
||||||
|
|
||||||
endpoints = render("endpoints.json", %{user: user})
|
endpoints = render("endpoints.json", %{user: user})
|
||||||
|
|
||||||
|
@ -52,7 +49,7 @@ def render("service.json", %{user: user}) do
|
||||||
"url" => user.ap_id,
|
"url" => user.ap_id,
|
||||||
"manuallyApprovesFollowers" => false,
|
"manuallyApprovesFollowers" => false,
|
||||||
"publicKey" => %{
|
"publicKey" => %{
|
||||||
"id" => "#{user.ap_id}#main-key",
|
"id" => User.SigningKey.local_key_id(user.ap_id),
|
||||||
"owner" => user.ap_id,
|
"owner" => user.ap_id,
|
||||||
"publicKeyPem" => public_key
|
"publicKeyPem" => public_key
|
||||||
},
|
},
|
||||||
|
@ -70,9 +67,12 @@ def render("user.json", %{user: %User{nickname: "internal." <> _} = user}),
|
||||||
do: render("service.json", %{user: user}) |> Map.put("preferredUsername", user.nickname)
|
do: render("service.json", %{user: user}) |> Map.put("preferredUsername", user.nickname)
|
||||||
|
|
||||||
def render("user.json", %{user: user}) do
|
def render("user.json", %{user: user}) do
|
||||||
{:ok, _, public_key} = Keys.keys_from_pem(user.keys)
|
public_key =
|
||||||
public_key = :public_key.pem_entry_encode(:SubjectPublicKeyInfo, public_key)
|
case User.SigningKey.public_key_pem(user) do
|
||||||
public_key = :public_key.pem_encode([public_key])
|
{:ok, public_key} -> public_key
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
|
||||||
user = User.sanitize_html(user)
|
user = User.sanitize_html(user)
|
||||||
|
|
||||||
endpoints = render("endpoints.json", %{user: user})
|
endpoints = render("endpoints.json", %{user: user})
|
||||||
|
@ -97,7 +97,7 @@ def render("user.json", %{user: user}) do
|
||||||
"url" => user.ap_id,
|
"url" => user.ap_id,
|
||||||
"manuallyApprovesFollowers" => user.is_locked,
|
"manuallyApprovesFollowers" => user.is_locked,
|
||||||
"publicKey" => %{
|
"publicKey" => %{
|
||||||
"id" => "#{user.ap_id}#main-key",
|
"id" => User.SigningKey.local_key_id(user.ap_id),
|
||||||
"owner" => user.ap_id,
|
"owner" => user.ap_id,
|
||||||
"publicKeyPem" => public_key
|
"publicKeyPem" => public_key
|
||||||
},
|
},
|
||||||
|
@ -116,6 +116,20 @@ def render("user.json", %{user: user}) do
|
||||||
|> Map.merge(Utils.make_json_ld_header())
|
|> Map.merge(Utils.make_json_ld_header())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def render("keys.json", %{user: user}) do
|
||||||
|
{:ok, public_key} = User.SigningKey.public_key_pem(user)
|
||||||
|
|
||||||
|
%{
|
||||||
|
"id" => user.ap_id,
|
||||||
|
"publicKey" => %{
|
||||||
|
"id" => User.SigningKey.key_id_of_local_user(user),
|
||||||
|
"owner" => user.ap_id,
|
||||||
|
"publicKeyPem" => public_key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|> Map.merge(Utils.make_json_ld_header())
|
||||||
|
end
|
||||||
|
|
||||||
def render("following.json", %{user: user, page: page} = opts) do
|
def render("following.json", %{user: user, page: page} = opts) do
|
||||||
showing_items = (opts[:for] && opts[:for] == user) || !user.hide_follows
|
showing_items = (opts[:for] && opts[:for] == user) || !user.hide_follows
|
||||||
showing_count = showing_items || !user.hide_follows_count
|
showing_count = showing_items || !user.hide_follows_count
|
||||||
|
|
|
@ -32,7 +32,9 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Poll do
|
||||||
},
|
},
|
||||||
voters_count: %Schema{
|
voters_count: %Schema{
|
||||||
type: :integer,
|
type: :integer,
|
||||||
description: "How many unique accounts have voted. Number."
|
nullable: true,
|
||||||
|
description:
|
||||||
|
"How many unique accounts have voted for a multi-selection poll. Number, or null if single-selection poll."
|
||||||
},
|
},
|
||||||
voted: %Schema{
|
voted: %Schema{
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
|
|
|
@ -66,10 +66,10 @@ defmodule Pleroma.Web.Endpoint do
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
plug(Plug.Static.IndexHtml, at: "/akkoma/swaggerui")
|
plug(Plug.Static.IndexHtml, at: "/pleroma/swaggerui/")
|
||||||
|
|
||||||
plug(Pleroma.Web.Plugs.FrontendStatic,
|
plug(Pleroma.Web.Plugs.FrontendStatic,
|
||||||
at: "/akkoma/swaggerui",
|
at: "/pleroma/swaggerui",
|
||||||
frontend_type: :swagger,
|
frontend_type: :swagger,
|
||||||
gzip: true,
|
gzip: true,
|
||||||
if: &Pleroma.Web.Swagger.ui_enabled?/0,
|
if: &Pleroma.Web.Swagger.ui_enabled?/0,
|
||||||
|
|
|
@ -19,7 +19,7 @@ def render("show.json", %{object: object, multiple: multiple, options: options}
|
||||||
expired: expired,
|
expired: expired,
|
||||||
multiple: multiple,
|
multiple: multiple,
|
||||||
votes_count: votes_count,
|
votes_count: votes_count,
|
||||||
voters_count: voters_count(object),
|
voters_count: voters_count(multiple, object),
|
||||||
options: options,
|
options: options,
|
||||||
emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"])
|
emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"])
|
||||||
}
|
}
|
||||||
|
@ -68,11 +68,19 @@ defp options_and_votes_count(options) do
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp voters_count(%{data: %{"voters" => voters}}) when is_list(voters) do
|
defp voters_count(false, _poll_data) do
|
||||||
|
# Mastodon always sets voter count to "null" unless multiple options were selectable
|
||||||
|
# Some clients may rely on this to detect multiple selection polls and it can mess
|
||||||
|
# up percentages for some clients if we never got a correct remote voter count and
|
||||||
|
# only count local voters here; see https://akkoma.dev/AkkomaGang/akkoma/issues/190
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
|
defp voters_count(_multiple, %{data: %{"voters" => voters}}) when is_list(voters) do
|
||||||
length(voters)
|
length(voters)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp voters_count(_), do: 0
|
defp voters_count(_, _), do: 0
|
||||||
|
|
||||||
defp voted_and_own_votes(%{object: object} = params, options) do
|
defp voted_and_own_votes(%{object: object} = params, options) do
|
||||||
if params[:for] do
|
if params[:for] do
|
||||||
|
|
|
@ -22,17 +22,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
||||||
alias Pleroma.Web.MediaProxy
|
alias Pleroma.Web.MediaProxy
|
||||||
alias Pleroma.Web.PleromaAPI.EmojiReactionController
|
alias Pleroma.Web.PleromaAPI.EmojiReactionController
|
||||||
require Logger
|
require Logger
|
||||||
|
alias Pleroma.Web.RichMedia.Card
|
||||||
|
|
||||||
import Pleroma.Web.ActivityPub.Visibility, only: [get_visibility: 1, visible_for_user?: 2]
|
import Pleroma.Web.ActivityPub.Visibility, only: [get_visibility: 1, visible_for_user?: 2]
|
||||||
|
|
||||||
# This is a naive way to do this, just spawning a process per activity
|
|
||||||
# to fetch the preview. However it should be fine considering
|
|
||||||
# pagination is restricted to 40 activities at a time
|
|
||||||
defp fetch_rich_media_for_activities(activities) do
|
defp fetch_rich_media_for_activities(activities) do
|
||||||
Enum.each(activities, fn activity ->
|
Enum.each(activities, fn activity ->
|
||||||
spawn(fn ->
|
Card.get_by_activity(activity)
|
||||||
Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
|
|
||||||
end)
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -93,9 +89,7 @@ def render("index.json", opts) do
|
||||||
# To do: check AdminAPIControllerTest on the reasons behind nil activities in the list
|
# To do: check AdminAPIControllerTest on the reasons behind nil activities in the list
|
||||||
activities = Enum.filter(opts.activities, & &1)
|
activities = Enum.filter(opts.activities, & &1)
|
||||||
|
|
||||||
# Start fetching rich media before doing anything else, so that later calls to get the cards
|
# Start prefetching rich media before doing anything else
|
||||||
# only block for timeout in the worst case, as opposed to
|
|
||||||
# length(activities_with_links) * timeout
|
|
||||||
fetch_rich_media_for_activities(activities)
|
fetch_rich_media_for_activities(activities)
|
||||||
replied_to_activities = get_replied_to_activities(activities)
|
replied_to_activities = get_replied_to_activities(activities)
|
||||||
|
|
||||||
|
@ -309,6 +303,12 @@ def render("show.json", %{activity: %{id: id, data: %{"object" => _object}} = ac
|
||||||
"mastoapi:content:#{chrono_order}"
|
"mastoapi:content:#{chrono_order}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
card =
|
||||||
|
case Card.get_by_activity(activity) do
|
||||||
|
%Card{} = result -> render("card.json", result)
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
|
||||||
content_plaintext =
|
content_plaintext =
|
||||||
content
|
content
|
||||||
|> Activity.HTML.get_cached_stripped_html_for_activity(
|
|> Activity.HTML.get_cached_stripped_html_for_activity(
|
||||||
|
@ -318,8 +318,6 @@ def render("show.json", %{activity: %{id: id, data: %{"object" => _object}} = ac
|
||||||
|
|
||||||
summary = object.data["summary"] || ""
|
summary = object.data["summary"] || ""
|
||||||
|
|
||||||
card = render("card.json", Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity))
|
|
||||||
|
|
||||||
url =
|
url =
|
||||||
if user.local do
|
if user.local do
|
||||||
url(~p[/notice/#{activity}])
|
url(~p[/notice/#{activity}])
|
||||||
|
@ -528,37 +526,30 @@ def render("source.json", %{activity: %{data: %{"object" => _object}} = activity
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def render("card.json", %{rich_media: rich_media, page_url: page_url}) do
|
def render("card.json", %Card{fields: rich_media}) do
|
||||||
page_url_data = URI.parse(page_url)
|
page_url_data = URI.parse(rich_media["url"])
|
||||||
|
|
||||||
page_url_data =
|
|
||||||
if is_binary(rich_media["url"]) do
|
|
||||||
URI.merge(page_url_data, URI.parse(rich_media["url"]))
|
|
||||||
else
|
|
||||||
page_url_data
|
|
||||||
end
|
|
||||||
|
|
||||||
page_url = page_url_data |> to_string
|
page_url = page_url_data |> to_string
|
||||||
|
|
||||||
image_url_data =
|
image_url = proxied_url(rich_media["image"], page_url_data)
|
||||||
if is_binary(rich_media["image"]) do
|
audio_url = proxied_url(rich_media["audio"], page_url_data)
|
||||||
URI.parse(rich_media["image"])
|
video_url = proxied_url(rich_media["video"], page_url_data)
|
||||||
else
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
|
|
||||||
image_url = build_image_url(image_url_data, page_url_data)
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
type: "link",
|
type: "link",
|
||||||
provider_name: page_url_data.host,
|
provider_name: page_url_data.host,
|
||||||
provider_url: page_url_data.scheme <> "://" <> page_url_data.host,
|
provider_url: page_url_data.scheme <> "://" <> page_url_data.host,
|
||||||
url: page_url,
|
url: page_url,
|
||||||
image: image_url |> MediaProxy.url(),
|
image: image_url,
|
||||||
|
image_description: rich_media["image:alt"] || "",
|
||||||
title: rich_media["title"] || "",
|
title: rich_media["title"] || "",
|
||||||
description: rich_media["description"] || "",
|
description: rich_media["description"] || "",
|
||||||
pleroma: %{
|
pleroma: %{
|
||||||
opengraph: rich_media
|
opengraph:
|
||||||
|
rich_media
|
||||||
|
|> Maps.put_if_present("image", image_url)
|
||||||
|
|> Maps.put_if_present("audio", audio_url)
|
||||||
|
|> Maps.put_if_present("video", video_url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -636,6 +627,14 @@ def render("context.json", %{activity: activity, activities: activities, user: u
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp proxied_url(url, page_url_data) do
|
||||||
|
if is_binary(url) do
|
||||||
|
build_image_url(URI.parse(url), page_url_data) |> MediaProxy.url()
|
||||||
|
else
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def get_reply_to(activity, %{replied_to_activities: replied_to_activities}) do
|
def get_reply_to(activity, %{replied_to_activities: replied_to_activities}) do
|
||||||
object = Object.normalize(activity, fetch: false)
|
object = Object.normalize(activity, fetch: false)
|
||||||
|
|
||||||
|
@ -740,19 +739,7 @@ defp build_application(%{"type" => _type, "name" => name, "url" => url}),
|
||||||
|
|
||||||
defp build_application(_), do: nil
|
defp build_application(_), do: nil
|
||||||
|
|
||||||
# Workaround for Elixir issue #10771
|
|
||||||
# Avoid applying URI.merge unless necessary
|
|
||||||
# TODO: revert to always attempting URI.merge(image_url_data, page_url_data)
|
|
||||||
# when Elixir 1.12 is the minimum supported version
|
|
||||||
@spec build_image_url(struct() | nil, struct()) :: String.t() | nil
|
@spec build_image_url(struct() | nil, struct()) :: String.t() | nil
|
||||||
defp build_image_url(
|
|
||||||
%URI{scheme: image_scheme, host: image_host} = image_url_data,
|
|
||||||
%URI{} = _page_url_data
|
|
||||||
)
|
|
||||||
when not is_nil(image_scheme) and not is_nil(image_host) do
|
|
||||||
image_url_data |> to_string
|
|
||||||
end
|
|
||||||
|
|
||||||
defp build_image_url(%URI{} = image_url_data, %URI{} = page_url_data) do
|
defp build_image_url(%URI{} = image_url_data, %URI{} = page_url_data) do
|
||||||
URI.merge(page_url_data, image_url_data) |> to_string
|
URI.merge(page_url_data, image_url_data) |> to_string
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,8 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
|
||||||
@timeout :timer.seconds(60)
|
@timeout :timer.seconds(60)
|
||||||
# Hibernate every X messages
|
# Hibernate every X messages
|
||||||
@hibernate_every 100
|
@hibernate_every 100
|
||||||
|
# Tune garabge collect for long-lived websocket process
|
||||||
|
@fullsweep_after 20
|
||||||
|
|
||||||
def init(%{qs: qs} = req, state) do
|
def init(%{qs: qs} = req, state) do
|
||||||
with params <- Enum.into(:cow_qs.parse_qs(qs), %{}),
|
with params <- Enum.into(:cow_qs.parse_qs(qs), %{}),
|
||||||
|
@ -59,6 +61,10 @@ def websocket_init(state) do
|
||||||
"#{__MODULE__} accepted websocket connection for user #{(state.user || %{id: "anonymous"}).id}, topic #{state.topic}"
|
"#{__MODULE__} accepted websocket connection for user #{(state.user || %{id: "anonymous"}).id}, topic #{state.topic}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# process is long-lived and can sometimes accumulate stale data in such a way it's
|
||||||
|
# not freed by young garbage cycles, thus make full collection sweeps more frequent
|
||||||
|
:erlang.process_flag(:fullsweep_after, @fullsweep_after)
|
||||||
|
|
||||||
Streamer.add_socket(state.topic, state.oauth_token)
|
Streamer.add_socket(state.topic, state.oauth_token)
|
||||||
{:ok, %{state | timer: timer()}}
|
{:ok, %{state | timer: timer()}}
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,6 +52,14 @@ defp filter_allowed_user_by_ap_id(ap_ids, excluded_ap_ids) do
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp filter_allowed_users_by_domain(ap_ids, %User{} = for_user) do
|
||||||
|
Enum.reject(ap_ids, fn ap_id ->
|
||||||
|
User.blocks_domain?(for_user, ap_id)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp filter_allowed_users_by_domain(ap_ids, nil), do: ap_ids
|
||||||
|
|
||||||
def filter_allowed_users(reactions, user, with_muted) do
|
def filter_allowed_users(reactions, user, with_muted) do
|
||||||
exclude_ap_ids =
|
exclude_ap_ids =
|
||||||
if is_nil(user) do
|
if is_nil(user) do
|
||||||
|
@ -62,7 +70,10 @@ def filter_allowed_users(reactions, user, with_muted) do
|
||||||
end
|
end
|
||||||
|
|
||||||
filter_emoji = fn emoji, users, url ->
|
filter_emoji = fn emoji, users, url ->
|
||||||
case filter_allowed_user_by_ap_id(users, exclude_ap_ids) do
|
users
|
||||||
|
|> filter_allowed_user_by_ap_id(exclude_ap_ids)
|
||||||
|
|> filter_allowed_users_by_domain(user)
|
||||||
|
|> case do
|
||||||
[] -> nil
|
[] -> nil
|
||||||
users -> {emoji, users, url}
|
users -> {emoji, users, url}
|
||||||
end
|
end
|
||||||
|
|
32
lib/pleroma/web/plugs/ensure_user_public_key_plug.ex
Normal file
32
lib/pleroma/web/plugs/ensure_user_public_key_plug.ex
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
defmodule Pleroma.Web.Plugs.EnsureUserPublicKeyPlug do
|
||||||
|
@moduledoc """
|
||||||
|
This plug will attempt to pull in a user's public key if we do not have it.
|
||||||
|
We _should_ be able to request the URL from the key URL...
|
||||||
|
"""
|
||||||
|
|
||||||
|
alias Pleroma.User
|
||||||
|
|
||||||
|
def init(options), do: options
|
||||||
|
|
||||||
|
def call(conn, _opts) do
|
||||||
|
key_id = key_id_from_conn(conn)
|
||||||
|
|
||||||
|
unless is_nil(key_id) do
|
||||||
|
User.SigningKey.get_or_fetch_by_key_id(key_id)
|
||||||
|
# now we SHOULD have the user that owns the key locally. maybe.
|
||||||
|
# if we don't, we'll error out when we try to validate.
|
||||||
|
end
|
||||||
|
|
||||||
|
conn
|
||||||
|
end
|
||||||
|
|
||||||
|
defp key_id_from_conn(conn) do
|
||||||
|
case HTTPSignatures.signature_for_conn(conn) do
|
||||||
|
%{"keyId" => key_id} when is_binary(key_id) ->
|
||||||
|
key_id
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -44,6 +44,26 @@ def route_aliases(%{path_info: ["objects", id], query_string: query_string}) do
|
||||||
|
|
||||||
def route_aliases(_), do: []
|
def route_aliases(_), do: []
|
||||||
|
|
||||||
|
def maybe_put_created_psudoheader(conn) do
|
||||||
|
case HTTPSignatures.signature_for_conn(conn) do
|
||||||
|
%{"created" => created} ->
|
||||||
|
put_req_header(conn, "(created)", created)
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
conn
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def maybe_put_expires_psudoheader(conn) do
|
||||||
|
case HTTPSignatures.signature_for_conn(conn) do
|
||||||
|
%{"expires" => expires} ->
|
||||||
|
put_req_header(conn, "(expires)", expires)
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
conn
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp assign_valid_signature_on_route_aliases(conn, []), do: conn
|
defp assign_valid_signature_on_route_aliases(conn, []), do: conn
|
||||||
|
|
||||||
defp assign_valid_signature_on_route_aliases(%{assigns: %{valid_signature: true}} = conn, _),
|
defp assign_valid_signature_on_route_aliases(%{assigns: %{valid_signature: true}} = conn, _),
|
||||||
|
@ -55,6 +75,8 @@ defp assign_valid_signature_on_route_aliases(conn, [path | rest]) do
|
||||||
conn =
|
conn =
|
||||||
conn
|
conn
|
||||||
|> put_req_header("(request-target)", request_target)
|
|> put_req_header("(request-target)", request_target)
|
||||||
|
|> maybe_put_created_psudoheader()
|
||||||
|
|> maybe_put_expires_psudoheader()
|
||||||
|> case do
|
|> case do
|
||||||
%{assigns: %{digest: digest}} = conn -> put_req_header(conn, "digest", digest)
|
%{assigns: %{digest: digest}} = conn -> put_req_header(conn, "digest", digest)
|
||||||
conn -> conn
|
conn -> conn
|
||||||
|
@ -117,12 +139,17 @@ defp maybe_require_signature(
|
||||||
defp maybe_require_signature(conn), do: conn
|
defp maybe_require_signature(conn), do: conn
|
||||||
|
|
||||||
defp signature_host(conn) do
|
defp signature_host(conn) do
|
||||||
with %{"keyId" => kid} <- HTTPSignatures.signature_for_conn(conn),
|
with {:key_id, %{"keyId" => kid}} <- {:key_id, HTTPSignatures.signature_for_conn(conn)},
|
||||||
{:ok, actor_id} <- Signature.key_id_to_actor_id(kid) do
|
{:actor_id, {:ok, actor_id}} <- {:actor_id, Signature.key_id_to_actor_id(kid)} do
|
||||||
actor_id
|
actor_id
|
||||||
else
|
else
|
||||||
e ->
|
{:key_id, e} ->
|
||||||
{:error, e}
|
Logger.error("Failed to extract key_id from signature: #{inspect(e)}")
|
||||||
|
nil
|
||||||
|
|
||||||
|
{:actor_id, e} ->
|
||||||
|
Logger.error("Failed to extract actor_id from signature: #{inspect(e)}")
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
defmodule Pleroma.Web.Plugs.MappedSignatureToIdentityPlug do
|
defmodule Pleroma.Web.Plugs.MappedSignatureToIdentityPlug do
|
||||||
alias Pleroma.Helpers.AuthHelper
|
alias Pleroma.Helpers.AuthHelper
|
||||||
alias Pleroma.Signature
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.ActivityPub.Utils
|
alias Pleroma.Web.ActivityPub.Utils
|
||||||
|
|
||||||
|
@ -33,7 +32,7 @@ def call(%{assigns: %{valid_signature: true}, params: %{"actor" => actor}} = con
|
||||||
|> assign(:valid_signature, false)
|
|> assign(:valid_signature, false)
|
||||||
|
|
||||||
# remove me once testsuite uses mapped capabilities instead of what we do now
|
# remove me once testsuite uses mapped capabilities instead of what we do now
|
||||||
{:user, nil} ->
|
{:user, _} ->
|
||||||
Logger.debug("Failed to map identity from signature (lookup failure)")
|
Logger.debug("Failed to map identity from signature (lookup failure)")
|
||||||
Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}, actor=#{actor}")
|
Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}, actor=#{actor}")
|
||||||
|
|
||||||
|
@ -68,7 +67,8 @@ def call(%{assigns: %{valid_signature: true}} = conn, _opts) do
|
||||||
Logger.debug("Failed to map identity from signature (lookup failure)")
|
Logger.debug("Failed to map identity from signature (lookup failure)")
|
||||||
Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}")
|
Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}")
|
||||||
|
|
||||||
only_permit_user_routes(conn)
|
conn
|
||||||
|
|> assign(:valid_signature, false)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
Logger.debug("Failed to map identity from signature (no payload actor mismatch)")
|
Logger.debug("Failed to map identity from signature (no payload actor mismatch)")
|
||||||
|
@ -82,33 +82,34 @@ def call(%{assigns: %{valid_signature: true}} = conn, _opts) do
|
||||||
# no signature at all
|
# no signature at all
|
||||||
def call(conn, _opts), do: conn
|
def call(conn, _opts), do: conn
|
||||||
|
|
||||||
defp only_permit_user_routes(%{path_info: ["users", _]} = conn) do
|
|
||||||
conn
|
|
||||||
|> assign(:limited_ap, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp only_permit_user_routes(conn) do
|
|
||||||
conn
|
|
||||||
|> assign(:valid_signature, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp key_id_from_conn(conn) do
|
defp key_id_from_conn(conn) do
|
||||||
with %{"keyId" => key_id} <- HTTPSignatures.signature_for_conn(conn),
|
case HTTPSignatures.signature_for_conn(conn) do
|
||||||
{:ok, ap_id} <- Signature.key_id_to_actor_id(key_id) do
|
%{"keyId" => key_id} when is_binary(key_id) ->
|
||||||
ap_id
|
key_id
|
||||||
else
|
|
||||||
_ ->
|
_ ->
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp user_from_key_id(conn) do
|
defp user_from_key_id(conn) do
|
||||||
with key_actor_id when is_binary(key_actor_id) <- key_id_from_conn(conn),
|
with {:key_id, key_id} when is_binary(key_id) <- {:key_id, key_id_from_conn(conn)},
|
||||||
{:ok, %User{} = user} <- User.get_or_fetch_by_ap_id(key_actor_id) do
|
{:mapped_ap_id, ap_id} when is_binary(ap_id) <-
|
||||||
|
{:mapped_ap_id, User.SigningKey.key_id_to_ap_id(key_id)},
|
||||||
|
{:user_fetch, {:ok, %User{} = user}} <- {:user_fetch, User.get_or_fetch_by_ap_id(ap_id)} do
|
||||||
user
|
user
|
||||||
else
|
else
|
||||||
_ ->
|
{:key_id, nil} ->
|
||||||
nil
|
Logger.debug("Failed to map identity from signature (no key ID)")
|
||||||
|
{:key_id, nil}
|
||||||
|
|
||||||
|
{:mapped_ap_id, nil} ->
|
||||||
|
Logger.debug("Failed to map identity from signature (could not map key ID to AP ID)")
|
||||||
|
{:mapped_ap_id, nil}
|
||||||
|
|
||||||
|
{:user_fetch, {:error, _}} ->
|
||||||
|
Logger.debug("Failed to map identity from signature (lookup failure)")
|
||||||
|
{:user_fetch, nil}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
98
lib/pleroma/web/rich_media/backfill.ex
Normal file
98
lib/pleroma/web/rich_media/backfill.ex
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.Web.RichMedia.Backfill do
|
||||||
|
use Pleroma.Workers.WorkerHelper,
|
||||||
|
queue: "rich_media_backfill",
|
||||||
|
unique: [period: 300, states: Oban.Job.states(), keys: [:op, :url_hash]]
|
||||||
|
|
||||||
|
alias Pleroma.Web.RichMedia.Card
|
||||||
|
alias Pleroma.Web.RichMedia.Parser
|
||||||
|
alias Pleroma.Web.RichMedia.Parser.TTL
|
||||||
|
alias Pleroma.Workers.RichMediaExpirationWorker
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
|
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
||||||
|
|
||||||
|
def start(%{url: url} = args) when is_binary(url) do
|
||||||
|
url_hash = Card.url_to_hash(url)
|
||||||
|
|
||||||
|
args =
|
||||||
|
args
|
||||||
|
|> Map.put(:url_hash, url_hash)
|
||||||
|
|
||||||
|
__MODULE__.enqueue("rich_media_backfill", args)
|
||||||
|
end
|
||||||
|
|
||||||
|
def perform(%Oban.Job{args: %{"op" => "rich_media_backfill", "url" => url} = args})
|
||||||
|
when is_binary(url) do
|
||||||
|
run(args)
|
||||||
|
end
|
||||||
|
|
||||||
|
def run(%{"url" => url, "url_hash" => url_hash} = args) do
|
||||||
|
case Parser.parse(url) do
|
||||||
|
{:ok, fields} ->
|
||||||
|
{:ok, card} = Card.create(url, fields)
|
||||||
|
|
||||||
|
maybe_schedule_expiration(url, fields)
|
||||||
|
|
||||||
|
if Map.has_key?(args, "activity_id") do
|
||||||
|
stream_update(args)
|
||||||
|
end
|
||||||
|
|
||||||
|
warm_cache(url_hash, card)
|
||||||
|
:ok
|
||||||
|
|
||||||
|
{:error, {:invalid_metadata, fields}} ->
|
||||||
|
Logger.debug("Rich media incomplete or invalid metadata for #{url}: #{inspect(fields)}")
|
||||||
|
negative_cache(url_hash, :timer.minutes(30))
|
||||||
|
|
||||||
|
{:error, :body_too_large} ->
|
||||||
|
Logger.error("Rich media error for #{url}: :body_too_large")
|
||||||
|
negative_cache(url_hash, :timer.minutes(30))
|
||||||
|
|
||||||
|
{:error, {:content_type, type}} ->
|
||||||
|
Logger.debug("Rich media error for #{url}: :content_type is #{type}")
|
||||||
|
negative_cache(url_hash, :timer.minutes(30))
|
||||||
|
|
||||||
|
e ->
|
||||||
|
Logger.debug("Rich media error for #{url}: #{inspect(e)}")
|
||||||
|
{:error, e}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def run(e) do
|
||||||
|
Logger.error("Rich media failure - invalid args: #{inspect(e)}")
|
||||||
|
{:discard, :invalid}
|
||||||
|
end
|
||||||
|
|
||||||
|
defp maybe_schedule_expiration(url, fields) do
|
||||||
|
case TTL.process(fields, url) do
|
||||||
|
{:ok, ttl} when is_number(ttl) ->
|
||||||
|
timestamp = DateTime.from_unix!(ttl)
|
||||||
|
|
||||||
|
RichMediaExpirationWorker.new(%{"url" => url}, scheduled_at: timestamp)
|
||||||
|
|> Oban.insert()
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
:ok
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp stream_update(%{"activity_id" => activity_id}) do
|
||||||
|
Logger.info("Rich media backfill: streaming update for activity #{activity_id}")
|
||||||
|
|
||||||
|
Pleroma.Activity.get_by_id(activity_id)
|
||||||
|
|> Pleroma.Activity.normalize()
|
||||||
|
|> Pleroma.Web.ActivityPub.ActivityPub.stream_out()
|
||||||
|
end
|
||||||
|
|
||||||
|
defp warm_cache(key, val), do: @cachex.put(:rich_media_cache, key, val)
|
||||||
|
|
||||||
|
def negative_cache(key, ttl \\ :timer.minutes(30)) do
|
||||||
|
@cachex.put(:rich_media_cache, key, nil, ttl: ttl)
|
||||||
|
{:discard, :error}
|
||||||
|
end
|
||||||
|
end
|
149
lib/pleroma/web/rich_media/card.ex
Normal file
149
lib/pleroma/web/rich_media/card.ex
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
defmodule Pleroma.Web.RichMedia.Card do
|
||||||
|
use Ecto.Schema
|
||||||
|
import Ecto.Changeset
|
||||||
|
import Ecto.Query
|
||||||
|
|
||||||
|
alias Pleroma.Activity
|
||||||
|
alias Pleroma.HTML
|
||||||
|
alias Pleroma.Object
|
||||||
|
alias Pleroma.Repo
|
||||||
|
alias Pleroma.Web.RichMedia.Backfill
|
||||||
|
alias Pleroma.Web.RichMedia.Parser
|
||||||
|
|
||||||
|
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
||||||
|
@config_impl Application.compile_env(:pleroma, [__MODULE__, :config_impl], Pleroma.Config)
|
||||||
|
|
||||||
|
@type t :: %__MODULE__{}
|
||||||
|
|
||||||
|
schema "rich_media_card" do
|
||||||
|
field(:url_hash, :binary)
|
||||||
|
field(:fields, :map)
|
||||||
|
|
||||||
|
timestamps()
|
||||||
|
end
|
||||||
|
|
||||||
|
@doc false
|
||||||
|
def changeset(card, attrs) do
|
||||||
|
card
|
||||||
|
|> cast(attrs, [:url_hash, :fields])
|
||||||
|
|> validate_required([:url_hash, :fields])
|
||||||
|
|> unique_constraint(:url_hash)
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec create(String.t(), map()) :: {:ok, t()}
|
||||||
|
def create(url, fields) do
|
||||||
|
url_hash = url_to_hash(url)
|
||||||
|
|
||||||
|
fields = Map.put_new(fields, "url", url)
|
||||||
|
|
||||||
|
%__MODULE__{}
|
||||||
|
|> changeset(%{url_hash: url_hash, fields: fields})
|
||||||
|
|> Repo.insert(on_conflict: {:replace, [:fields]}, conflict_target: :url_hash)
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec delete(String.t()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()} | :ok
|
||||||
|
def delete(url) do
|
||||||
|
url_hash = url_to_hash(url)
|
||||||
|
@cachex.del(:rich_media_cache, url_hash)
|
||||||
|
|
||||||
|
case get_by_url(url) do
|
||||||
|
%__MODULE__{} = card -> Repo.delete(card)
|
||||||
|
nil -> :ok
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec get_by_url(String.t() | nil) :: t() | nil | :error
|
||||||
|
def get_by_url(url) when is_binary(url) do
|
||||||
|
if @config_impl.get([:rich_media, :enabled]) do
|
||||||
|
url_hash = url_to_hash(url)
|
||||||
|
|
||||||
|
@cachex.fetch!(:rich_media_cache, url_hash, fn _ ->
|
||||||
|
result =
|
||||||
|
__MODULE__
|
||||||
|
|> where(url_hash: ^url_hash)
|
||||||
|
|> Repo.one()
|
||||||
|
|
||||||
|
case result do
|
||||||
|
%__MODULE__{} = card -> {:commit, card}
|
||||||
|
_ -> {:ignore, nil}
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
:error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_by_url(nil), do: nil
|
||||||
|
|
||||||
|
@spec get_or_backfill_by_url(String.t(), map()) :: t() | nil
|
||||||
|
def get_or_backfill_by_url(url, backfill_opts \\ %{}) do
|
||||||
|
case get_by_url(url) do
|
||||||
|
%__MODULE__{} = card ->
|
||||||
|
card
|
||||||
|
|
||||||
|
nil ->
|
||||||
|
backfill_opts = Map.put(backfill_opts, :url, url)
|
||||||
|
|
||||||
|
Backfill.start(backfill_opts)
|
||||||
|
|
||||||
|
nil
|
||||||
|
|
||||||
|
:error ->
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec get_by_activity(Activity.t()) :: t() | nil | :error
|
||||||
|
# Fake/Draft activity
|
||||||
|
def get_by_activity(%Activity{id: "pleroma:fakeid"} = activity) do
|
||||||
|
with %Object{} = object <- Object.normalize(activity, fetch: false),
|
||||||
|
url when not is_nil(url) <- HTML.extract_first_external_url_from_object(object) do
|
||||||
|
case get_by_url(url) do
|
||||||
|
# Cache hit
|
||||||
|
%__MODULE__{} = card ->
|
||||||
|
card
|
||||||
|
|
||||||
|
# Cache miss, but fetch for rendering the Draft
|
||||||
|
_ ->
|
||||||
|
with {:ok, fields} <- Parser.parse(url),
|
||||||
|
{:ok, card} <- create(url, fields) do
|
||||||
|
card
|
||||||
|
else
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_ ->
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_by_activity(activity) do
|
||||||
|
with %Object{} = object <- Object.normalize(activity, fetch: false),
|
||||||
|
{_, nil} <- {:cached, get_cached_url(object, activity.id)} do
|
||||||
|
nil
|
||||||
|
else
|
||||||
|
{:cached, url} ->
|
||||||
|
get_or_backfill_by_url(url, %{activity_id: activity.id})
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
:error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec url_to_hash(String.t()) :: String.t()
|
||||||
|
def url_to_hash(url) do
|
||||||
|
:crypto.hash(:sha256, url) |> Base.encode16(case: :lower)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp get_cached_url(object, activity_id) do
|
||||||
|
key = "URL|#{activity_id}"
|
||||||
|
|
||||||
|
@cachex.fetch!(:scrubber_cache, key, fn _ ->
|
||||||
|
url = HTML.extract_first_external_url_from_object(object)
|
||||||
|
Activity.HTML.add_cache_key_for(activity_id, key)
|
||||||
|
|
||||||
|
{:commit, url}
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
|
@ -3,85 +3,13 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.RichMedia.Helpers do
|
defmodule Pleroma.Web.RichMedia.Helpers do
|
||||||
alias Pleroma.Activity
|
|
||||||
alias Pleroma.Config
|
alias Pleroma.Config
|
||||||
alias Pleroma.HTML
|
|
||||||
alias Pleroma.Object
|
|
||||||
alias Pleroma.Web.RichMedia.Parser
|
|
||||||
|
|
||||||
@options [
|
|
||||||
max_body: 2_000_000,
|
|
||||||
receive_timeout: 2_000
|
|
||||||
]
|
|
||||||
|
|
||||||
@spec validate_page_url(URI.t() | binary()) :: :ok | :error
|
|
||||||
defp validate_page_url(page_url) when is_binary(page_url) do
|
|
||||||
validate_tld = Config.get([Pleroma.Formatter, :validate_tld])
|
|
||||||
|
|
||||||
page_url
|
|
||||||
|> Linkify.Parser.url?(validate_tld: validate_tld)
|
|
||||||
|> parse_uri(page_url)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp validate_page_url(%URI{host: host, scheme: "https", authority: authority})
|
|
||||||
when is_binary(authority) do
|
|
||||||
cond do
|
|
||||||
host in Config.get([:rich_media, :ignore_hosts], []) ->
|
|
||||||
:error
|
|
||||||
|
|
||||||
get_tld(host) in Config.get([:rich_media, :ignore_tld], []) ->
|
|
||||||
:error
|
|
||||||
|
|
||||||
true ->
|
|
||||||
:ok
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp validate_page_url(_), do: :error
|
|
||||||
|
|
||||||
defp parse_uri(true, url) do
|
|
||||||
url
|
|
||||||
|> URI.parse()
|
|
||||||
|> validate_page_url
|
|
||||||
end
|
|
||||||
|
|
||||||
defp parse_uri(_, _), do: :error
|
|
||||||
|
|
||||||
defp get_tld(host) do
|
|
||||||
host
|
|
||||||
|> String.split(".")
|
|
||||||
|> Enum.reverse()
|
|
||||||
|> hd
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch_data_for_object(object) do
|
|
||||||
with true <- Config.get([:rich_media, :enabled]),
|
|
||||||
{:ok, page_url} <-
|
|
||||||
HTML.extract_first_external_url_from_object(object),
|
|
||||||
:ok <- validate_page_url(page_url),
|
|
||||||
{:ok, rich_media} <- Parser.parse(page_url) do
|
|
||||||
%{page_url: page_url, rich_media: rich_media}
|
|
||||||
else
|
|
||||||
_ -> %{}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch_data_for_activity(%Activity{data: %{"type" => "Create"}} = activity) do
|
|
||||||
with true <- Config.get([:rich_media, :enabled]),
|
|
||||||
%Object{} = object <- Object.normalize(activity, fetch: false) do
|
|
||||||
fetch_data_for_object(object)
|
|
||||||
else
|
|
||||||
_ -> %{}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch_data_for_activity(_), do: %{}
|
|
||||||
|
|
||||||
def rich_media_get(url) do
|
def rich_media_get(url) do
|
||||||
headers = [{"user-agent", Pleroma.Application.user_agent() <> "; Bot"}]
|
headers = [{"user-agent", Pleroma.Application.user_agent() <> "; Bot"}]
|
||||||
|
|
||||||
head_check =
|
head_check =
|
||||||
case Pleroma.HTTP.head(url, headers, @options) do
|
case Pleroma.HTTP.head(url, headers, http_options()) do
|
||||||
# If the HEAD request didn't reach the server for whatever reason,
|
# If the HEAD request didn't reach the server for whatever reason,
|
||||||
# we assume the GET that comes right after won't either
|
# we assume the GET that comes right after won't either
|
||||||
{:error, _} = e ->
|
{:error, _} = e ->
|
||||||
|
@ -96,7 +24,7 @@ def rich_media_get(url) do
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
with :ok <- head_check, do: Pleroma.HTTP.get(url, headers, @options)
|
with :ok <- head_check, do: Pleroma.HTTP.get(url, headers, http_options())
|
||||||
end
|
end
|
||||||
|
|
||||||
defp check_content_type(headers) do
|
defp check_content_type(headers) do
|
||||||
|
@ -112,12 +40,13 @@ defp check_content_type(headers) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@max_body @options[:max_body]
|
|
||||||
defp check_content_length(headers) do
|
defp check_content_length(headers) do
|
||||||
|
max_body = Keyword.get(http_options(), :max_body)
|
||||||
|
|
||||||
case List.keyfind(headers, "content-length", 0) do
|
case List.keyfind(headers, "content-length", 0) do
|
||||||
{_, maybe_content_length} ->
|
{_, maybe_content_length} ->
|
||||||
case Integer.parse(maybe_content_length) do
|
case Integer.parse(maybe_content_length) do
|
||||||
{content_length, ""} when content_length <= @max_body -> :ok
|
{content_length, ""} when content_length <= max_body -> :ok
|
||||||
{_, ""} -> {:error, :body_too_large}
|
{_, ""} -> {:error, :body_too_large}
|
||||||
_ -> :ok
|
_ -> :ok
|
||||||
end
|
end
|
||||||
|
@ -126,4 +55,11 @@ defp check_content_length(headers) do
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp http_options do
|
||||||
|
[
|
||||||
|
pool: :media,
|
||||||
|
max_body: Config.get([:rich_media, :max_body], 5_000_000)
|
||||||
|
]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,161 +1,41 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.RichMedia.Parser do
|
defmodule Pleroma.Web.RichMedia.Parser do
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
@config_impl Application.compile_env(:pleroma, [__MODULE__, :config_impl], Pleroma.Config)
|
||||||
|
|
||||||
defp parsers do
|
defp parsers do
|
||||||
Pleroma.Config.get([:rich_media, :parsers])
|
Pleroma.Config.get([:rich_media, :parsers])
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse(nil), do: {:error, "No URL provided"}
|
def parse(nil), do: nil
|
||||||
|
|
||||||
if Pleroma.Config.get(:env) == :test do
|
|
||||||
@spec parse(String.t()) :: {:ok, map()} | {:error, any()}
|
|
||||||
def parse(url), do: parse_with_timeout(url)
|
|
||||||
else
|
|
||||||
@spec parse(String.t()) :: {:ok, map()} | {:error, any()}
|
@spec parse(String.t()) :: {:ok, map()} | {:error, any()}
|
||||||
def parse(url) do
|
def parse(url) do
|
||||||
with {:ok, data} <- get_cached_or_parse(url),
|
with {_, true} <- {:config, @config_impl.get([:rich_media, :enabled])},
|
||||||
{:ok, _} <- set_ttl_based_on_image(data, url) do
|
:ok <- validate_page_url(url),
|
||||||
|
{:ok, data} <- parse_url(url) do
|
||||||
|
data = Map.put(data, "url", url)
|
||||||
{:ok, data}
|
{:ok, data}
|
||||||
|
else
|
||||||
|
{:config, _} -> {:error, :rich_media_disabled}
|
||||||
|
e -> e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_cached_or_parse(url) do
|
defp parse_url(url) do
|
||||||
case @cachex.fetch(:rich_media_cache, url, fn ->
|
|
||||||
case parse_with_timeout(url) do
|
|
||||||
{:ok, _} = res ->
|
|
||||||
{:commit, res}
|
|
||||||
|
|
||||||
{:error, reason} = e ->
|
|
||||||
# Unfortunately we have to log errors here, instead of doing that
|
|
||||||
# along with ttl setting at the bottom. Otherwise we can get log spam
|
|
||||||
# if more than one process was waiting for the rich media card
|
|
||||||
# while it was generated. Ideally we would set ttl here as well,
|
|
||||||
# so we don't override it number_of_waiters_on_generation
|
|
||||||
# times, but one, obviously, can't set ttl for not-yet-created entry
|
|
||||||
# and Cachex doesn't support returning ttl from the fetch callback.
|
|
||||||
log_error(url, reason)
|
|
||||||
{:commit, e}
|
|
||||||
end
|
|
||||||
end) do
|
|
||||||
{action, res} when action in [:commit, :ok] ->
|
|
||||||
case res do
|
|
||||||
{:ok, _data} = res ->
|
|
||||||
res
|
|
||||||
|
|
||||||
{:error, reason} = e ->
|
|
||||||
if action == :commit, do: set_error_ttl(url, reason)
|
|
||||||
e
|
|
||||||
end
|
|
||||||
|
|
||||||
{:error, e} ->
|
|
||||||
{:error, {:cachex_error, e}}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp set_error_ttl(_url, :body_too_large), do: :ok
|
|
||||||
defp set_error_ttl(_url, {:content_type, _}), do: :ok
|
|
||||||
|
|
||||||
# The TTL is not set for the errors above, since they are unlikely to change
|
|
||||||
# with time
|
|
||||||
|
|
||||||
defp set_error_ttl(url, _reason) do
|
|
||||||
ttl = Pleroma.Config.get([:rich_media, :failure_backoff], 60_000)
|
|
||||||
@cachex.expire(:rich_media_cache, url, ttl)
|
|
||||||
:ok
|
|
||||||
end
|
|
||||||
|
|
||||||
defp log_error(url, {:invalid_metadata, data}) do
|
|
||||||
Logger.debug(fn -> "Incomplete or invalid metadata for #{url}: #{inspect(data)}" end)
|
|
||||||
end
|
|
||||||
|
|
||||||
defp log_error(url, reason) do
|
|
||||||
Logger.warning(fn -> "Rich media error for #{url}: #{inspect(reason)}" end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
Set the rich media cache based on the expiration time of image.
|
|
||||||
|
|
||||||
Adopt behaviour `Pleroma.Web.RichMedia.Parser.TTL`
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
defmodule MyModule do
|
|
||||||
@behaviour Pleroma.Web.RichMedia.Parser.TTL
|
|
||||||
def ttl(data, url) do
|
|
||||||
image_url = Map.get(data, :image)
|
|
||||||
# do some parsing in the url and get the ttl of the image
|
|
||||||
# and return ttl is unix time
|
|
||||||
parse_ttl_from_url(image_url)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Define the module in the config
|
|
||||||
|
|
||||||
config :pleroma, :rich_media,
|
|
||||||
ttl_setters: [MyModule]
|
|
||||||
"""
|
|
||||||
@spec set_ttl_based_on_image(map(), String.t()) ::
|
|
||||||
{:ok, Integer.t() | :noop} | {:error, :no_key}
|
|
||||||
def set_ttl_based_on_image(data, url) do
|
|
||||||
case get_ttl_from_image(data, url) do
|
|
||||||
{:ok, ttl} when is_number(ttl) ->
|
|
||||||
ttl = ttl * 1000
|
|
||||||
|
|
||||||
case @cachex.expire_at(:rich_media_cache, url, ttl) do
|
|
||||||
{:ok, true} -> {:ok, ttl}
|
|
||||||
{:ok, false} -> {:error, :no_key}
|
|
||||||
end
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
{:ok, :noop}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp get_ttl_from_image(data, url) do
|
|
||||||
[:rich_media, :ttl_setters]
|
|
||||||
|> Pleroma.Config.get()
|
|
||||||
|> Enum.reduce({:ok, nil}, fn
|
|
||||||
module, {:ok, _ttl} ->
|
|
||||||
module.ttl(data, url)
|
|
||||||
|
|
||||||
_, error ->
|
|
||||||
error
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
def parse_url(url) do
|
|
||||||
with {:ok, %Tesla.Env{body: html}} <- Pleroma.Web.RichMedia.Helpers.rich_media_get(url),
|
with {:ok, %Tesla.Env{body: html}} <- Pleroma.Web.RichMedia.Helpers.rich_media_get(url),
|
||||||
{:ok, html} <- Floki.parse_document(html) do
|
{:ok, html} <- Floki.parse_document(html) do
|
||||||
html
|
html
|
||||||
|> maybe_parse()
|
|> maybe_parse()
|
||||||
|> Map.put("url", url)
|
|
||||||
|> clean_parsed_data()
|
|> clean_parsed_data()
|
||||||
|> check_parsed_data()
|
|> check_parsed_data()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_with_timeout(url) do
|
|
||||||
try do
|
|
||||||
task =
|
|
||||||
Task.Supervisor.async_nolink(Pleroma.TaskSupervisor, fn ->
|
|
||||||
parse_url(url)
|
|
||||||
end)
|
|
||||||
|
|
||||||
Task.await(task, 5000)
|
|
||||||
catch
|
|
||||||
:exit, {:timeout, _} ->
|
|
||||||
Logger.warning("Timeout while fetching rich media for #{url}")
|
|
||||||
{:error, :timeout}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defp maybe_parse(html) do
|
defp maybe_parse(html) do
|
||||||
Enum.reduce_while(parsers(), %{}, fn parser, acc ->
|
Enum.reduce_while(parsers(), %{}, fn parser, acc ->
|
||||||
case parser.parse(html, acc) do
|
case parser.parse(html, acc) do
|
||||||
|
@ -181,4 +61,46 @@ defp clean_parsed_data(data) do
|
||||||
end)
|
end)
|
||||||
|> Map.new()
|
|> Map.new()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@spec validate_page_url(URI.t() | binary()) :: :ok | :error
|
||||||
|
defp validate_page_url(page_url) when is_binary(page_url) do
|
||||||
|
validate_tld = @config_impl.get([Pleroma.Formatter, :validate_tld])
|
||||||
|
|
||||||
|
page_url
|
||||||
|
|> Linkify.Parser.url?(validate_tld: validate_tld)
|
||||||
|
|> parse_uri(page_url)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp validate_page_url(%URI{host: host, scheme: "https"}) do
|
||||||
|
cond do
|
||||||
|
Linkify.Parser.ip?(host) ->
|
||||||
|
:error
|
||||||
|
|
||||||
|
host in @config_impl.get([:rich_media, :ignore_hosts], []) ->
|
||||||
|
:error
|
||||||
|
|
||||||
|
get_tld(host) in @config_impl.get([:rich_media, :ignore_tld], []) ->
|
||||||
|
:error
|
||||||
|
|
||||||
|
true ->
|
||||||
|
:ok
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
defp validate_page_url(_), do: :error
|
||||||
|
|
||||||
|
defp parse_uri(true, url) do
|
||||||
|
url
|
||||||
|
|> URI.parse()
|
||||||
|
|> validate_page_url
|
||||||
|
end
|
||||||
|
|
||||||
|
defp parse_uri(_, _), do: :error
|
||||||
|
|
||||||
|
defp get_tld(host) do
|
||||||
|
host
|
||||||
|
|> String.split(".")
|
||||||
|
|> Enum.reverse()
|
||||||
|
|> hd
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,5 +3,18 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.RichMedia.Parser.TTL do
|
defmodule Pleroma.Web.RichMedia.Parser.TTL do
|
||||||
@callback ttl(Map.t(), String.t()) :: Integer.t() | nil
|
@callback ttl(map(), String.t()) :: integer() | nil
|
||||||
|
|
||||||
|
@spec process(map(), String.t()) :: {:ok, integer() | nil}
|
||||||
|
def process(data, url) do
|
||||||
|
[:rich_media, :ttl_setters]
|
||||||
|
|> Pleroma.Config.get()
|
||||||
|
|> Enum.reduce_while({:ok, nil}, fn
|
||||||
|
module, acc ->
|
||||||
|
case module.ttl(data, url) do
|
||||||
|
ttl when is_number(ttl) -> {:halt, {:ok, ttl}}
|
||||||
|
_ -> {:cont, acc}
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do
|
defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do
|
||||||
|
@ -7,25 +7,26 @@ defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def ttl(data, _url) do
|
def ttl(data, _url) do
|
||||||
image = Map.get(data, :image)
|
image = Map.get(data, "image")
|
||||||
|
|
||||||
if is_aws_signed_url(image) do
|
if aws_signed_url?(image) do
|
||||||
image
|
image
|
||||||
|> parse_query_params()
|
|> parse_query_params()
|
||||||
|> format_query_params()
|
|> format_query_params()
|
||||||
|> get_expiration_timestamp()
|
|> get_expiration_timestamp()
|
||||||
else
|
else
|
||||||
{:error, "Not aws signed url #{inspect(image)}"}
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp is_aws_signed_url(image) when is_binary(image) and image != "" do
|
defp aws_signed_url?(image) when is_binary(image) and image != "" do
|
||||||
%URI{host: host, query: query} = URI.parse(image)
|
%URI{host: host, query: query} = URI.parse(image)
|
||||||
|
|
||||||
String.contains?(host, "amazonaws.com") and String.contains?(query, "X-Amz-Expires")
|
is_binary(host) and String.contains?(host, "amazonaws.com") and
|
||||||
|
is_binary(query) and String.contains?(query, "X-Amz-Expires")
|
||||||
end
|
end
|
||||||
|
|
||||||
defp is_aws_signed_url(_), do: nil
|
defp aws_signed_url?(_), do: nil
|
||||||
|
|
||||||
defp parse_query_params(image) do
|
defp parse_query_params(image) do
|
||||||
%URI{query: query} = URI.parse(image)
|
%URI{query: query} = URI.parse(image)
|
||||||
|
@ -45,6 +46,6 @@ defp get_expiration_timestamp(params) when is_map(params) do
|
||||||
|> Map.get("X-Amz-Date")
|
|> Map.get("X-Amz-Date")
|
||||||
|> Timex.parse("{ISO:Basic:Z}")
|
|> Timex.parse("{ISO:Basic:Z}")
|
||||||
|
|
||||||
{:ok, Timex.to_unix(date) + String.to_integer(Map.get(params, "X-Amz-Expires"))}
|
Timex.to_unix(date) + String.to_integer(Map.get(params, "X-Amz-Expires"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
20
lib/pleroma/web/rich_media/parser/ttl/opengraph.ex
Normal file
20
lib/pleroma/web/rich_media/parser/ttl/opengraph.ex
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.Web.RichMedia.Parser.TTL.Opengraph do
|
||||||
|
@behaviour Pleroma.Web.RichMedia.Parser.TTL
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
def ttl(%{"ttl" => ttl_string}, _url) when is_binary(ttl_string) do
|
||||||
|
try do
|
||||||
|
ttl = String.to_integer(ttl_string)
|
||||||
|
now = DateTime.utc_now() |> DateTime.to_unix()
|
||||||
|
now + ttl
|
||||||
|
rescue
|
||||||
|
_ -> nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def ttl(_, _), do: nil
|
||||||
|
end
|
|
@ -1,5 +1,5 @@
|
||||||
# Pleroma: A lightweight social networking server
|
# Pleroma: A lightweight social networking server
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.RichMedia.Parsers.OEmbed do
|
defmodule Pleroma.Web.RichMedia.Parsers.OEmbed do
|
||||||
|
|
|
@ -144,7 +144,14 @@ defmodule Pleroma.Web.Router do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
pipeline :optional_http_signature do
|
||||||
|
plug(Pleroma.Web.Plugs.EnsureUserPublicKeyPlug)
|
||||||
|
plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
|
||||||
|
plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
|
||||||
|
end
|
||||||
|
|
||||||
pipeline :http_signature do
|
pipeline :http_signature do
|
||||||
|
plug(Pleroma.Web.Plugs.EnsureUserPublicKeyPlug)
|
||||||
plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
|
plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
|
||||||
plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
|
plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
|
||||||
plug(Pleroma.Web.Plugs.EnsureHTTPSignaturePlug)
|
plug(Pleroma.Web.Plugs.EnsureHTTPSignaturePlug)
|
||||||
|
@ -745,7 +752,7 @@ defmodule Pleroma.Web.Router do
|
||||||
scope "/", Pleroma.Web do
|
scope "/", Pleroma.Web do
|
||||||
# Note: html format is supported only if static FE is enabled
|
# Note: html format is supported only if static FE is enabled
|
||||||
# Note: http signature is only considered for json requests (no auth for non-json requests)
|
# Note: http signature is only considered for json requests (no auth for non-json requests)
|
||||||
pipe_through([:accepts_html_xml_json, :http_signature, :static_fe])
|
pipe_through([:accepts_html_xml_json, :optional_http_signature, :static_fe])
|
||||||
|
|
||||||
# Note: returns user _profile_ for json requests, redirects to user _feed_ for non-json ones
|
# Note: returns user _profile_ for json requests, redirects to user _feed_ for non-json ones
|
||||||
get("/users/:nickname", Feed.UserController, :feed_redirect, as: :user_feed)
|
get("/users/:nickname", Feed.UserController, :feed_redirect, as: :user_feed)
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
||||||
xmlns:statusnet="http://status.net/schema/api/1/">
|
xmlns:statusnet="http://status.net/schema/api/1/">
|
||||||
|
|
||||||
<id><%= '#{url(~p"/tags/#{@tag}")}.rss' %></id>
|
<id><%= "#{url(~p"/tags/#{@tag}")}.rss" %></id>
|
||||||
<title>#<%= @tag %></title>
|
<title>#<%= @tag %></title>
|
||||||
|
|
||||||
<subtitle><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></subtitle>
|
<subtitle><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></subtitle>
|
||||||
<logo><%= feed_logo() %></logo>
|
<logo><%= feed_logo() %></logo>
|
||||||
<updated><%= most_recent_update(@activities) %></updated>
|
<updated><%= most_recent_update(@activities) %></updated>
|
||||||
<link rel="self" href="<%= '#{url(~p"/tags/#{@tag}")}.atom' %>" type="application/atom+xml"/>
|
<link rel="self" href="<%= "#{url(~p"/tags/#{@tag}")}.atom" %>" type="application/atom+xml"/>
|
||||||
<%= for activity <- @activities do %>
|
<%= for activity <- @activities do %>
|
||||||
<%= render @view_module, "_tag_activity.atom", Map.merge(assigns, prepare_activity(activity, actor: true)) %>
|
<%= render @view_module, "_tag_activity.atom", Map.merge(assigns, prepare_activity(activity, actor: true)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<title>#<%= @tag %></title>
|
<title>#<%= @tag %></title>
|
||||||
<description><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></description>
|
<description><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></description>
|
||||||
<link><%= '#{url(~p"/tags/#{@tag}")}.rss' %></link>
|
<link><%= "#{url(~p"/tags/#{@tag}")}.rss" %></link>
|
||||||
<webfeeds:logo><%= feed_logo() %></webfeeds:logo>
|
<webfeeds:logo><%= feed_logo() %></webfeeds:logo>
|
||||||
<webfeeds:accentColor>2b90d9</webfeeds:accentColor>
|
<webfeeds:accentColor>2b90d9</webfeeds:accentColor>
|
||||||
<%= for activity <- @activities do %>
|
<%= for activity <- @activities do %>
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
<title><%= @user.nickname <> "'s timeline" %></title>
|
<title><%= @user.nickname <> "'s timeline" %></title>
|
||||||
<updated><%= most_recent_update(@activities, @user) %></updated>
|
<updated><%= most_recent_update(@activities, @user) %></updated>
|
||||||
<logo><%= logo(@user) %></logo>
|
<logo><%= logo(@user) %></logo>
|
||||||
<link rel="self" href="<%= '#{url(~p"/users/#{@user.nickname}/feed")}.atom' %>" type="application/atom+xml"/>
|
<link rel="self" href="<%= "#{url(~p"/users/#{@user.nickname}/feed")}.atom" %>" type="application/atom+xml"/>
|
||||||
|
|
||||||
<%= render @view_module, "_author.atom", assigns %>
|
<%= render @view_module, "_author.atom", assigns %>
|
||||||
|
|
||||||
<%= if last_activity(@activities) do %>
|
<%= if last_activity(@activities) do %>
|
||||||
<link rel="next" href="<%= '#{url(~p"/users/#{@user.nickname}/feed")}.atom?max_id=#{last_activity(@activities).id}' %>" type="application/atom+xml"/>
|
<link rel="next" href="<%= "#{url(~p"/users/#{@user.nickname}/feed")}.atom?max_id=#{last_activity(@activities).id}" %>" type="application/atom+xml"/>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= for activity <- @activities do %>
|
<%= for activity <- @activities do %>
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
<title><%= @user.nickname <> "'s timeline" %></title>
|
<title><%= @user.nickname <> "'s timeline" %></title>
|
||||||
<updated><%= most_recent_update(@activities, @user) %></updated>
|
<updated><%= most_recent_update(@activities, @user) %></updated>
|
||||||
<image><%= logo(@user) %></image>
|
<image><%= logo(@user) %></image>
|
||||||
<link><%= '#{url(~p"/users/#{@user.nickname}/feed")}.rss' %></link>
|
<link><%= "#{url(~p"/users/#{@user.nickname}/feed")}.rss" %></link>
|
||||||
|
|
||||||
<%= render @view_module, "_author.rss", assigns %>
|
<%= render @view_module, "_author.rss", assigns %>
|
||||||
|
|
||||||
<%= if last_activity(@activities) do %>
|
<%= if last_activity(@activities) do %>
|
||||||
<link rel="next"><%= '#{url(~p"/users/#{@user.nickname}/feed")}.rss?max_id=#{last_activity(@activities).id}' %></link>
|
<link rel="next"><%= "#{url(~p"/users/#{@user.nickname}/feed")}.rss?max_id=#{last_activity(@activities).id}" %></link>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= for activity <- @activities do %>
|
<%= for activity <- @activities do %>
|
||||||
|
|
15
lib/pleroma/workers/rich_media_expiration_worker.ex
Normal file
15
lib/pleroma/workers/rich_media_expiration_worker.ex
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.Workers.RichMediaExpirationWorker do
|
||||||
|
alias Pleroma.Web.RichMedia.Card
|
||||||
|
|
||||||
|
use Oban.Worker,
|
||||||
|
queue: :rich_media_expiration
|
||||||
|
|
||||||
|
@impl Oban.Worker
|
||||||
|
def perform(%Job{args: %{"url" => url} = _args}) do
|
||||||
|
Card.delete(url)
|
||||||
|
end
|
||||||
|
end
|
15
mix.exs
15
mix.exs
|
@ -78,7 +78,8 @@ def application do
|
||||||
:comeonin,
|
:comeonin,
|
||||||
:fast_sanitize,
|
:fast_sanitize,
|
||||||
:os_mon,
|
:os_mon,
|
||||||
:ssl
|
:ssl,
|
||||||
|
:recon
|
||||||
],
|
],
|
||||||
included_applications: [:ex_syslogger]
|
included_applications: [:ex_syslogger]
|
||||||
]
|
]
|
||||||
|
@ -136,14 +137,14 @@ defp deps do
|
||||||
{:tesla, "~> 1.7"},
|
{:tesla, "~> 1.7"},
|
||||||
{:castore, "~> 1.0"},
|
{:castore, "~> 1.0"},
|
||||||
{:cowlib, "~> 2.12"},
|
{:cowlib, "~> 2.12"},
|
||||||
{:finch, "~> 0.16.0"},
|
{:finch, "~> 0.18.0"},
|
||||||
{:jason, "~> 1.4"},
|
{:jason, "~> 1.4"},
|
||||||
{:trailing_format_plug, "~> 0.0.7"},
|
{:trailing_format_plug, "~> 0.0.7"},
|
||||||
{:mogrify, "~> 0.9"},
|
{:mogrify, "~> 0.9"},
|
||||||
{:ex_aws, "~> 2.4"},
|
{:ex_aws, "~> 2.4"},
|
||||||
{:ex_aws_s3, "~> 2.4"},
|
{:ex_aws_s3, "~> 2.4"},
|
||||||
{:sweet_xml, "~> 0.7"},
|
{:sweet_xml, "~> 0.7"},
|
||||||
{:earmark, "~> 1.4"},
|
{:earmark, "1.4.46"},
|
||||||
{:bbcode_pleroma, "~> 0.2.0"},
|
{:bbcode_pleroma, "~> 0.2.0"},
|
||||||
{:argon2_elixir, "~> 3.1"},
|
{:argon2_elixir, "~> 3.1"},
|
||||||
{:cors_plug, "~> 3.0"},
|
{:cors_plug, "~> 3.0"},
|
||||||
|
@ -157,10 +158,10 @@ defp deps do
|
||||||
{:floki, "~> 0.34"},
|
{:floki, "~> 0.34"},
|
||||||
{:timex, "~> 3.7"},
|
{:timex, "~> 3.7"},
|
||||||
{:ueberauth, "== 0.10.5"},
|
{:ueberauth, "== 0.10.5"},
|
||||||
{:linkify, git: "https://akkoma.dev/AkkomaGang/linkify.git"},
|
{:linkify, "~> 0.5.3"},
|
||||||
{:http_signatures,
|
{:http_signatures,
|
||||||
git: "https://akkoma.dev/AkkomaGang/http_signatures.git",
|
git: "https://akkoma.dev/AkkomaGang/http_signatures.git",
|
||||||
ref: "6640ce7d24c783ac2ef56e27d00d12e8dc85f396"},
|
ref: "d44c43d66758c6a73eaa4da9cffdbee0c5da44ae"},
|
||||||
{:telemetry, "~> 1.2"},
|
{:telemetry, "~> 1.2"},
|
||||||
{:telemetry_poller, "~> 1.0"},
|
{:telemetry_poller, "~> 1.0"},
|
||||||
{:telemetry_metrics, "~> 0.6"},
|
{:telemetry_metrics, "~> 0.6"},
|
||||||
|
@ -179,7 +180,7 @@ defp deps do
|
||||||
{:remote_ip, "~> 1.1.0"},
|
{:remote_ip, "~> 1.1.0"},
|
||||||
{:captcha,
|
{:captcha,
|
||||||
git: "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git",
|
git: "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git",
|
||||||
ref: "90f6ce7672f70f56708792a98d98bd05176c9176"},
|
ref: "6630c42aaaab124e697b4e513190c89d8b64e410"},
|
||||||
{:restarter, path: "./restarter"},
|
{:restarter, path: "./restarter"},
|
||||||
{:majic,
|
{:majic,
|
||||||
git: "https://akkoma.dev/AkkomaGang/majic.git",
|
git: "https://akkoma.dev/AkkomaGang/majic.git",
|
||||||
|
@ -199,7 +200,7 @@ defp deps do
|
||||||
|
|
||||||
## dev & test
|
## dev & test
|
||||||
{:ex_doc, "~> 0.30", only: :dev, runtime: false},
|
{:ex_doc, "~> 0.30", only: :dev, runtime: false},
|
||||||
{:ex_machina, "~> 2.7", only: :test},
|
{:ex_machina, "~> 2.8", only: :test},
|
||||||
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
|
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
|
||||||
{:mock, "~> 0.3.8", only: :test},
|
{:mock, "~> 0.3.8", only: :test},
|
||||||
{:excoveralls, "0.16.1", only: :test},
|
{:excoveralls, "0.16.1", only: :test},
|
||||||
|
|
93
mix.lock
93
mix.lock
|
@ -3,133 +3,134 @@
|
||||||
"base62": {:hex, :base62, "1.2.2", "85c6627eb609317b70f555294045895ffaaeb1758666ab9ef9ca38865b11e629", [:mix], [{:custom_base, "~> 0.2.1", [hex: :custom_base, repo: "hexpm", optional: false]}], "hexpm", "d41336bda8eaa5be197f1e4592400513ee60518e5b9f4dcf38f4b4dae6f377bb"},
|
"base62": {:hex, :base62, "1.2.2", "85c6627eb609317b70f555294045895ffaaeb1758666ab9ef9ca38865b11e629", [:mix], [{:custom_base, "~> 0.2.1", [hex: :custom_base, repo: "hexpm", optional: false]}], "hexpm", "d41336bda8eaa5be197f1e4592400513ee60518e5b9f4dcf38f4b4dae6f377bb"},
|
||||||
"bbcode_pleroma": {:hex, :bbcode_pleroma, "0.2.0", "d36f5bca6e2f62261c45be30fa9b92725c0655ad45c99025cb1c3e28e25803ef", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "19851074419a5fedb4ef49e1f01b30df504bb5dbb6d6adfc135238063bebd1c3"},
|
"bbcode_pleroma": {:hex, :bbcode_pleroma, "0.2.0", "d36f5bca6e2f62261c45be30fa9b92725c0655ad45c99025cb1c3e28e25803ef", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "19851074419a5fedb4ef49e1f01b30df504bb5dbb6d6adfc135238063bebd1c3"},
|
||||||
"bcrypt_elixir": {:hex, :bcrypt_elixir, "3.0.1", "9be815469e6bfefec40fa74658ecbbe6897acfb57614df1416eeccd4903f602c", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "486bb95efb645d1efc6794c1ddd776a186a9a713abf06f45708a6ce324fb96cf"},
|
"bcrypt_elixir": {:hex, :bcrypt_elixir, "3.0.1", "9be815469e6bfefec40fa74658ecbbe6897acfb57614df1416eeccd4903f602c", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "486bb95efb645d1efc6794c1ddd776a186a9a713abf06f45708a6ce324fb96cf"},
|
||||||
"benchee": {:hex, :benchee, "1.3.0", "f64e3b64ad3563fa9838146ddefb2d2f94cf5b473bdfd63f5ca4d0657bf96694", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "34f4294068c11b2bd2ebf2c59aac9c7da26ffa0068afdf3419f1b176e16c5f81"},
|
"benchee": {:hex, :benchee, "1.3.1", "c786e6a76321121a44229dde3988fc772bca73ea75170a73fd5f4ddf1af95ccf", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "76224c58ea1d0391c8309a8ecbfe27d71062878f59bd41a390266bf4ac1cc56d"},
|
||||||
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
|
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
|
||||||
"cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"},
|
"cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"},
|
||||||
"calendar": {:hex, :calendar, "1.0.0", "f52073a708528482ec33d0a171954ca610fe2bd28f1e871f247dc7f1565fa807", [:mix], [{:tzdata, "~> 0.1.201603 or ~> 0.5.20 or ~> 1.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "990e9581920c82912a5ee50e62ff5ef96da6b15949a2ee4734f935fdef0f0a6f"},
|
"calendar": {:hex, :calendar, "1.0.0", "f52073a708528482ec33d0a171954ca610fe2bd28f1e871f247dc7f1565fa807", [:mix], [{:tzdata, "~> 0.1.201603 or ~> 0.5.20 or ~> 1.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "990e9581920c82912a5ee50e62ff5ef96da6b15949a2ee4734f935fdef0f0a6f"},
|
||||||
"captcha": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git", "90f6ce7672f70f56708792a98d98bd05176c9176", [ref: "90f6ce7672f70f56708792a98d98bd05176c9176"]},
|
"captcha": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git", "6630c42aaaab124e697b4e513190c89d8b64e410", [ref: "6630c42aaaab124e697b4e513190c89d8b64e410"]},
|
||||||
"castore": {:hex, :castore, "1.0.6", "ffc42f110ebfdafab0ea159cd43d31365fa0af0ce4a02ecebf1707ae619ee727", [:mix], [], "hexpm", "374c6e7ca752296be3d6780a6d5b922854ffcc74123da90f2f328996b962d33a"},
|
"castore": {:hex, :castore, "1.0.9", "5cc77474afadf02c7c017823f460a17daa7908e991b0cc917febc90e466a375c", [:mix], [], "hexpm", "5ea956504f1ba6f2b4eb707061d8e17870de2bee95fb59d512872c2ef06925e7"},
|
||||||
"certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"},
|
"certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"},
|
||||||
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},
|
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},
|
||||||
"comeonin": {:hex, :comeonin, "5.4.0", "246a56ca3f41d404380fc6465650ddaa532c7f98be4bda1b4656b3a37cc13abe", [:mix], [], "hexpm", "796393a9e50d01999d56b7b8420ab0481a7538d0caf80919da493b4a6e51faf1"},
|
"comeonin": {:hex, :comeonin, "5.5.0", "364d00df52545c44a139bad919d7eacb55abf39e86565878e17cebb787977368", [:mix], [], "hexpm", "6287fc3ba0aad34883cbe3f7949fc1d1e738e5ccdce77165bc99490aa69f47fb"},
|
||||||
"concurrent_limiter": {:git, "https://akkoma.dev/AkkomaGang/concurrent-limiter.git", "a9e0b3d64574bdba761f429bb4fba0cf687b3338", [ref: "a9e0b3d64574bdba761f429bb4fba0cf687b3338"]},
|
"concurrent_limiter": {:git, "https://akkoma.dev/AkkomaGang/concurrent-limiter.git", "a9e0b3d64574bdba761f429bb4fba0cf687b3338", [ref: "a9e0b3d64574bdba761f429bb4fba0cf687b3338"]},
|
||||||
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
|
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
|
||||||
"cors_plug": {:hex, :cors_plug, "3.0.3", "7c3ac52b39624bc616db2e937c282f3f623f25f8d550068b6710e58d04a0e330", [:mix], [{:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3f2d759e8c272ed3835fab2ef11b46bddab8c1ab9528167bd463b6452edf830d"},
|
"cors_plug": {:hex, :cors_plug, "3.0.3", "7c3ac52b39624bc616db2e937c282f3f623f25f8d550068b6710e58d04a0e330", [:mix], [{:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3f2d759e8c272ed3835fab2ef11b46bddab8c1ab9528167bd463b6452edf830d"},
|
||||||
"cowboy": {:hex, :cowboy, "2.12.0", "f276d521a1ff88b2b9b4c54d0e753da6c66dd7be6c9fca3d9418b561828a3731", [:make, :rebar3], [{:cowlib, "2.13.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e"},
|
"cowboy": {:hex, :cowboy, "2.12.0", "f276d521a1ff88b2b9b4c54d0e753da6c66dd7be6c9fca3d9418b561828a3731", [:make, :rebar3], [{:cowlib, "2.13.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e"},
|
||||||
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},
|
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},
|
||||||
"cowlib": {:hex, :cowlib, "2.13.0", "db8f7505d8332d98ef50a3ef34b34c1afddec7506e4ee4dd4a3a266285d282ca", [:make, :rebar3], [], "hexpm", "e1e1284dc3fc030a64b1ad0d8382ae7e99da46c3246b815318a4b848873800a4"},
|
"cowlib": {:hex, :cowlib, "2.13.0", "db8f7505d8332d98ef50a3ef34b34c1afddec7506e4ee4dd4a3a266285d282ca", [:make, :rebar3], [], "hexpm", "e1e1284dc3fc030a64b1ad0d8382ae7e99da46c3246b815318a4b848873800a4"},
|
||||||
"credo": {:hex, :credo, "1.7.5", "643213503b1c766ec0496d828c90c424471ea54da77c8a168c725686377b9545", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "f799e9b5cd1891577d8c773d245668aa74a2fcd15eb277f51a0131690ebfb3fd"},
|
"credo": {:hex, :credo, "1.7.8", "9722ba1681e973025908d542ec3d95db5f9c549251ba5b028e251ad8c24ab8c5", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cb9e87cc64f152f3ed1c6e325e7b894dea8f5ef2e41123bd864e3cd5ceb44968"},
|
||||||
"custom_base": {:hex, :custom_base, "0.2.1", "4a832a42ea0552299d81652aa0b1f775d462175293e99dfbe4d7dbaab785a706", [:mix], [], "hexpm", "8df019facc5ec9603e94f7270f1ac73ddf339f56ade76a721eaa57c1493ba463"},
|
"custom_base": {:hex, :custom_base, "0.2.1", "4a832a42ea0552299d81652aa0b1f775d462175293e99dfbe4d7dbaab785a706", [:mix], [], "hexpm", "8df019facc5ec9603e94f7270f1ac73ddf339f56ade76a721eaa57c1493ba463"},
|
||||||
"db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"},
|
"db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
|
||||||
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
|
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
|
||||||
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
|
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
|
||||||
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
|
"dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"},
|
||||||
"earmark": {:hex, :earmark, "1.4.46", "8c7287bd3137e99d26ae4643e5b7ef2129a260e3dcf41f251750cb4563c8fb81", [:mix], [], "hexpm", "798d86db3d79964e759ddc0c077d5eb254968ed426399fbf5a62de2b5ff8910a"},
|
"earmark": {:hex, :earmark, "1.4.46", "8c7287bd3137e99d26ae4643e5b7ef2129a260e3dcf41f251750cb4563c8fb81", [:mix], [], "hexpm", "798d86db3d79964e759ddc0c077d5eb254968ed426399fbf5a62de2b5ff8910a"},
|
||||||
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
|
"earmark_parser": {:hex, :earmark_parser, "1.4.41", "ab34711c9dc6212dda44fcd20ecb87ac3f3fce6f0ca2f28d4a00e4154f8cd599", [:mix], [], "hexpm", "a81a04c7e34b6617c2792e291b5a2e57ab316365c2644ddc553bb9ed863ebefa"},
|
||||||
"eblurhash": {:hex, :eblurhash, "1.2.2", "7da4255aaea984b31bb71155f673257353b0e0554d0d30dcf859547e74602582", [:rebar3], [], "hexpm", "8c20ca00904de023a835a9dcb7b7762fed32264c85a80c3cafa85288e405044c"},
|
"eblurhash": {:hex, :eblurhash, "1.2.2", "7da4255aaea984b31bb71155f673257353b0e0554d0d30dcf859547e74602582", [:rebar3], [], "hexpm", "8c20ca00904de023a835a9dcb7b7762fed32264c85a80c3cafa85288e405044c"},
|
||||||
"ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"},
|
"ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"},
|
||||||
"ecto_enum": {:hex, :ecto_enum, "1.4.0", "d14b00e04b974afc69c251632d1e49594d899067ee2b376277efd8233027aec8", [:mix], [{:ecto, ">= 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "> 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:mariaex, ">= 0.0.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4"},
|
"ecto_enum": {:hex, :ecto_enum, "1.4.0", "d14b00e04b974afc69c251632d1e49594d899067ee2b376277efd8233027aec8", [:mix], [{:ecto, ">= 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "> 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:mariaex, ">= 0.0.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4"},
|
||||||
"ecto_psql_extras": {:hex, :ecto_psql_extras, "0.7.15", "0fc29dbae0e444a29bd6abeee4cf3c4c037e692a272478a234a1cc765077dbb1", [:mix], [{:ecto_sql, "~> 3.7", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0", [hex: :postgrex, repo: "hexpm", optional: false]}, {:table_rex, "~> 3.1.1 or ~> 4.0.0", [hex: :table_rex, repo: "hexpm", optional: false]}], "hexpm", "b6127f3a5c6fc3d84895e4768cc7c199f22b48b67d6c99b13fbf4a374e73f039"},
|
"ecto_psql_extras": {:hex, :ecto_psql_extras, "0.8.2", "79350a53246ac5ec27326d208496aebceb77fa82a91744f66a9154560f0759d3", [:mix], [{:ecto_sql, "~> 3.7", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:postgrex, "> 0.16.0 and < 0.20.0", [hex: :postgrex, repo: "hexpm", optional: false]}, {:table_rex, "~> 3.1.1 or ~> 4.0.0", [hex: :table_rex, repo: "hexpm", optional: false]}], "hexpm", "6149c1c4a5ba6602a76cb09ee7a269eb60dab9694a1dbbb797f032555212de75"},
|
||||||
"ecto_sql": {:hex, :ecto_sql, "3.10.2", "6b98b46534b5c2f8b8b5f03f126e75e2a73c64f3c071149d32987a5378b0fdbd", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "68c018debca57cb9235e3889affdaec7a10616a4e3a80c99fa1d01fdafaa9007"},
|
"ecto_sql": {:hex, :ecto_sql, "3.10.2", "6b98b46534b5c2f8b8b5f03f126e75e2a73c64f3c071149d32987a5378b0fdbd", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "68c018debca57cb9235e3889affdaec7a10616a4e3a80c99fa1d01fdafaa9007"},
|
||||||
"elasticsearch": {:git, "https://akkoma.dev/AkkomaGang/elasticsearch-elixir.git", "6cd946f75f6ab9042521a009d1d32d29a90113ca", [ref: "main"]},
|
"elasticsearch": {:git, "https://akkoma.dev/AkkomaGang/elasticsearch-elixir.git", "6cd946f75f6ab9042521a009d1d32d29a90113ca", [ref: "main"]},
|
||||||
"elixir_make": {:hex, :elixir_make, "0.8.3", "d38d7ee1578d722d89b4d452a3e36bcfdc644c618f0d063b874661876e708683", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "5c99a18571a756d4af7a4d89ca75c28ac899e6103af6f223982f09ce44942cc9"},
|
"elixir_make": {:hex, :elixir_make, "0.8.4", "4960a03ce79081dee8fe119d80ad372c4e7badb84c493cc75983f9d3bc8bde0f", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "6e7f1d619b5f61dfabd0a20aa268e575572b542ac31723293a4c1a567d5ef040"},
|
||||||
"elixir_xml_to_map": {:hex, :elixir_xml_to_map, "3.1.0", "4d6260486a8cce59e4bf3575fe2dd2a24766546ceeef9f93fcec6f7c62a2827a", [:mix], [{:erlsom, "~> 1.4", [hex: :erlsom, repo: "hexpm", optional: false]}], "hexpm", "8fe5f2e75f90bab07ee2161120c2dc038ebcae8135554f5582990f1c8c21f911"},
|
"elixir_xml_to_map": {:hex, :elixir_xml_to_map, "3.1.0", "4d6260486a8cce59e4bf3575fe2dd2a24766546ceeef9f93fcec6f7c62a2827a", [:mix], [{:erlsom, "~> 1.4", [hex: :erlsom, repo: "hexpm", optional: false]}], "hexpm", "8fe5f2e75f90bab07ee2161120c2dc038ebcae8135554f5582990f1c8c21f911"},
|
||||||
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
|
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
|
||||||
"erlsom": {:hex, :erlsom, "1.5.1", "c8fe2babd33ff0846403f6522328b8ab676f896b793634cfe7ef181c05316c03", [:rebar3], [], "hexpm", "7965485494c5844dd127656ac40f141aadfa174839ec1be1074e7edf5b4239eb"},
|
"erlsom": {:hex, :erlsom, "1.5.1", "c8fe2babd33ff0846403f6522328b8ab676f896b793634cfe7ef181c05316c03", [:rebar3], [], "hexpm", "7965485494c5844dd127656ac40f141aadfa174839ec1be1074e7edf5b4239eb"},
|
||||||
"eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"},
|
"eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"},
|
||||||
"ex_aws": {:hex, :ex_aws, "2.5.3", "9c2d05ba0c057395b12c7b5ca6267d14cdaec1d8e65bdf6481fe1fd245accfb4", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8 or ~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:mime, "~> 1.2 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "67115f1d399d7ec4d191812ee565c6106cb4b1bbf19a9d4db06f265fd87da97e"},
|
"ex_aws": {:hex, :ex_aws, "2.5.6", "6f642e0f82eff10a9b470044f084b81a791cf15b393d647ea5f3e65da2794e3d", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8 or ~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:mime, "~> 1.2 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:req, "~> 0.3", [hex: :req, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c69eec59e31fdd89d0beeb1d97e16518dd1b23ad95b3d5c9f1dcfec23d97f960"},
|
||||||
"ex_aws_s3": {:hex, :ex_aws_s3, "2.5.3", "422468e5c3e1a4da5298e66c3468b465cfd354b842e512cb1f6fbbe4e2f5bdaf", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "4f09dd372cc386550e484808c5ac5027766c8d0cd8271ccc578b82ee6ef4f3b8"},
|
"ex_aws_s3": {:hex, :ex_aws_s3, "2.5.4", "87aaf4a2f24a48f516d7f5aaced9d128dd5d0f655c4431f9037a11a85c71109c", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "c06e7f68b33f7c0acba1361dbd951c79661a28f85aa2e0582990fccca4425355"},
|
||||||
"ex_const": {:hex, :ex_const, "0.2.4", "d06e540c9d834865b012a17407761455efa71d0ce91e5831e86881b9c9d82448", [:mix], [], "hexpm", "96fd346610cc992b8f896ed26a98be82ac4efb065a0578f334a32d60a3ba9767"},
|
"ex_const": {:hex, :ex_const, "0.3.0", "9d79516679991baf540ef445438eef1455ca91cf1a3c2680d8fb9e5bea2fe4de", [:mix], [], "hexpm", "76546322abb9e40ee4a2f454cf1c8a5b25c3672fa79bed1ea52c31e0d2428ca9"},
|
||||||
"ex_doc": {:hex, :ex_doc, "0.32.0", "896afb57b1e00030f6ec8b2e19d3ca99a197afb23858d49d94aea673dc222f12", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "ed2c3e42c558f49bda3ff37e05713432006e1719a6c4a3320c7e4735787374e7"},
|
"ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"},
|
||||||
"ex_machina": {:hex, :ex_machina, "2.7.0", "b792cc3127fd0680fecdb6299235b4727a4944a09ff0fa904cc639272cd92dc7", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "419aa7a39bde11894c87a615c4ecaa52d8f107bbdd81d810465186f783245bf8"},
|
"ex_machina": {:hex, :ex_machina, "2.8.0", "a0e847b5712065055ec3255840e2c78ef9366634d62390839d4880483be38abe", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "79fe1a9c64c0c1c1fab6c4fa5d871682cb90de5885320c187d117004627a7729"},
|
||||||
"ex_syslogger": {:hex, :ex_syslogger, "2.0.0", "de6de5c5472a9c4fdafb28fa6610e381ae79ebc17da6490b81d785d68bd124c9", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}, {:syslog, "~> 1.1.0", [hex: :syslog, repo: "hexpm", optional: false]}], "hexpm", "a52b2fe71764e9e6ecd149ab66635812f68e39279cbeee27c52c0e35e8b8019e"},
|
"ex_syslogger": {:hex, :ex_syslogger, "2.0.0", "de6de5c5472a9c4fdafb28fa6610e381ae79ebc17da6490b81d785d68bd124c9", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}, {:syslog, "~> 1.1.0", [hex: :syslog, repo: "hexpm", optional: false]}], "hexpm", "a52b2fe71764e9e6ecd149ab66635812f68e39279cbeee27c52c0e35e8b8019e"},
|
||||||
"excoveralls": {:hex, :excoveralls, "0.16.1", "0bd42ed05c7d2f4d180331a20113ec537be509da31fed5c8f7047ce59ee5a7c5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dae763468e2008cf7075a64cb1249c97cb4bc71e236c5c2b5e5cdf1cfa2bf138"},
|
"excoveralls": {:hex, :excoveralls, "0.16.1", "0bd42ed05c7d2f4d180331a20113ec537be509da31fed5c8f7047ce59ee5a7c5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dae763468e2008cf7075a64cb1249c97cb4bc71e236c5c2b5e5cdf1cfa2bf138"},
|
||||||
"expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"},
|
"expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"},
|
||||||
"fast_html": {:hex, :fast_html, "2.3.0", "08c1d8ead840dd3060ba02c761bed9f37f456a1ddfe30bcdcfee8f651cec06a6", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}], "hexpm", "f18e3c7668f82d3ae0b15f48d48feeb257e28aa5ab1b0dbf781c7312e5da029d"},
|
"fast_html": {:hex, :fast_html, "2.3.0", "08c1d8ead840dd3060ba02c761bed9f37f456a1ddfe30bcdcfee8f651cec06a6", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}], "hexpm", "f18e3c7668f82d3ae0b15f48d48feeb257e28aa5ab1b0dbf781c7312e5da029d"},
|
||||||
"fast_sanitize": {:hex, :fast_sanitize, "0.2.3", "67b93dfb34e302bef49fec3aaab74951e0f0602fd9fa99085987af05bd91c7a5", [:mix], [{:fast_html, "~> 2.0", [hex: :fast_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "e8ad286d10d0386e15d67d0ee125245ebcfbc7d7290b08712ba9013c8c5e56e2"},
|
"fast_sanitize": {:hex, :fast_sanitize, "0.2.3", "67b93dfb34e302bef49fec3aaab74951e0f0602fd9fa99085987af05bd91c7a5", [:mix], [{:fast_html, "~> 2.0", [hex: :fast_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "e8ad286d10d0386e15d67d0ee125245ebcfbc7d7290b08712ba9013c8c5e56e2"},
|
||||||
"file_ex": {:git, "https://akkoma.dev/AkkomaGang/file_ex.git", "cc7067c7d446c2526e9ecf91d40896b088851569", [ref: "cc7067c7d446c2526e9ecf91d40896b088851569"]},
|
"file_ex": {:git, "https://akkoma.dev/AkkomaGang/file_ex.git", "cc7067c7d446c2526e9ecf91d40896b088851569", [ref: "cc7067c7d446c2526e9ecf91d40896b088851569"]},
|
||||||
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
|
"file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
|
||||||
"finch": {:hex, :finch, "0.16.0", "40733f02c89f94a112518071c0a91fe86069560f5dbdb39f9150042f44dcfb1a", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f660174c4d519e5fec629016054d60edd822cdfe2b7270836739ac2f97735ec5"},
|
"finch": {:hex, :finch, "0.18.0", "944ac7d34d0bd2ac8998f79f7a811b21d87d911e77a786bc5810adb75632ada4", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69f5045b042e531e53edc2574f15e25e735b522c37e2ddb766e15b979e03aa65"},
|
||||||
"flake_id": {:hex, :flake_id, "0.1.0", "7716b086d2e405d09b647121a166498a0d93d1a623bead243e1f74216079ccb3", [:mix], [{:base62, "~> 1.2", [hex: :base62, repo: "hexpm", optional: false]}, {:ecto, ">= 2.0.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "31fc8090fde1acd267c07c36ea7365b8604055f897d3a53dd967658c691bd827"},
|
"flake_id": {:hex, :flake_id, "0.1.0", "7716b086d2e405d09b647121a166498a0d93d1a623bead243e1f74216079ccb3", [:mix], [{:base62, "~> 1.2", [hex: :base62, repo: "hexpm", optional: false]}, {:ecto, ">= 2.0.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "31fc8090fde1acd267c07c36ea7365b8604055f897d3a53dd967658c691bd827"},
|
||||||
"floki": {:hex, :floki, "0.36.1", "712b7f2ba19a4d5a47dfe3e74d81876c95bbcbee44fe551f0af3d2a388abb3da", [:mix], [], "hexpm", "21ba57abb8204bcc70c439b423fc0dd9f0286de67dc82773a14b0200ada0995f"},
|
"floki": {:hex, :floki, "0.36.3", "1102f93b16a55bc5383b85ae3ec470f82dee056eaeff9195e8afdf0ef2a43c30", [:mix], [], "hexpm", "fe0158bff509e407735f6d40b3ee0d7deb47f3f3ee7c6c182ad28599f9f6b27a"},
|
||||||
"gen_smtp": {:hex, :gen_smtp, "1.2.0", "9cfc75c72a8821588b9b9fe947ae5ab2aed95a052b81237e0928633a13276fd3", [:rebar3], [{:ranch, ">= 1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "5ee0375680bca8f20c4d85f58c2894441443a743355430ff33a783fe03296779"},
|
"gen_smtp": {:hex, :gen_smtp, "1.2.0", "9cfc75c72a8821588b9b9fe947ae5ab2aed95a052b81237e0928633a13276fd3", [:rebar3], [{:ranch, ">= 1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "5ee0375680bca8f20c4d85f58c2894441443a743355430ff33a783fe03296779"},
|
||||||
"gettext": {:hex, :gettext, "0.22.3", "c8273e78db4a0bb6fba7e9f0fd881112f349a3117f7f7c598fa18c66c888e524", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "935f23447713954a6866f1bb28c3a878c4c011e802bcd68a726f5e558e4b64bd"},
|
"gettext": {:hex, :gettext, "0.22.3", "c8273e78db4a0bb6fba7e9f0fd881112f349a3117f7f7c598fa18c66c888e524", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "935f23447713954a6866f1bb28c3a878c4c011e802bcd68a726f5e558e4b64bd"},
|
||||||
"hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"},
|
"hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"},
|
||||||
"hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"},
|
"hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"},
|
||||||
"html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"},
|
"html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"},
|
||||||
"http_signatures": {:git, "https://akkoma.dev/AkkomaGang/http_signatures.git", "6640ce7d24c783ac2ef56e27d00d12e8dc85f396", [ref: "6640ce7d24c783ac2ef56e27d00d12e8dc85f396"]},
|
"http_signatures": {:git, "https://akkoma.dev/AkkomaGang/http_signatures.git", "d44c43d66758c6a73eaa4da9cffdbee0c5da44ae", [ref: "d44c43d66758c6a73eaa4da9cffdbee0c5da44ae"]},
|
||||||
"httpoison": {:hex, :httpoison, "1.8.2", "9eb9c63ae289296a544842ef816a85d881d4a31f518a0fec089aaa744beae290", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "2bb350d26972e30c96e2ca74a1aaf8293d61d0742ff17f01e0279fef11599921"},
|
"httpoison": {:hex, :httpoison, "1.8.2", "9eb9c63ae289296a544842ef816a85d881d4a31f518a0fec089aaa744beae290", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "2bb350d26972e30c96e2ca74a1aaf8293d61d0742ff17f01e0279fef11599921"},
|
||||||
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
|
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
|
||||||
"inet_cidr": {:hex, :inet_cidr, "1.0.8", "d26bb7bdbdf21ae401ead2092bf2bb4bf57fe44a62f5eaa5025280720ace8a40", [:mix], [], "hexpm", "d5b26da66603bb56c933c65214c72152f0de9a6ea53618b56d63302a68f6a90e"},
|
"inet_cidr": {:hex, :inet_cidr, "1.0.8", "d26bb7bdbdf21ae401ead2092bf2bb4bf57fe44a62f5eaa5025280720ace8a40", [:mix], [], "hexpm", "d5b26da66603bb56c933c65214c72152f0de9a6ea53618b56d63302a68f6a90e"},
|
||||||
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
|
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
|
||||||
"joken": {:hex, :joken, "2.6.1", "2ca3d8d7f83bf7196296a3d9b2ecda421a404634bfc618159981a960020480a1", [:mix], [{:jose, "~> 1.11.9", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "ab26122c400b3d254ce7d86ed066d6afad27e70416df947cdcb01e13a7382e68"},
|
"joken": {:hex, :joken, "2.6.2", "5daaf82259ca603af4f0b065475099ada1b2b849ff140ccd37f4b6828ca6892a", [:mix], [{:jose, "~> 1.11.10", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "5134b5b0a6e37494e46dbf9e4dad53808e5e787904b7c73972651b51cce3d72b"},
|
||||||
"jose": {:hex, :jose, "1.11.9", "c861eb99d9e9f62acd071dc5a49ffbeab9014e44490cd85ea3e49e3d36184777", [:mix, :rebar3], [], "hexpm", "b5ccc3749d2e1638c26bed806259df5bc9e438797fe60dc71e9fa0716133899b"},
|
"jose": {:hex, :jose, "1.11.10", "a903f5227417bd2a08c8a00a0cbcc458118be84480955e8d251297a425723f83", [:mix, :rebar3], [], "hexpm", "0d6cd36ff8ba174db29148fc112b5842186b68a90ce9fc2b3ec3afe76593e614"},
|
||||||
"jumper": {:hex, :jumper, "1.0.2", "68cdcd84472a00ac596b4e6459a41b3062d4427cbd4f1e8c8793c5b54f1406a7", [:mix], [], "hexpm", "9b7782409021e01ab3c08270e26f36eb62976a38c1aa64b2eaf6348422f165e1"},
|
"jumper": {:hex, :jumper, "1.0.2", "68cdcd84472a00ac596b4e6459a41b3062d4427cbd4f1e8c8793c5b54f1406a7", [:mix], [], "hexpm", "9b7782409021e01ab3c08270e26f36eb62976a38c1aa64b2eaf6348422f165e1"},
|
||||||
"linkify": {:git, "https://akkoma.dev/AkkomaGang/linkify.git", "2567e2c1073fa371fd26fd66dfa5bc77b6919c16", []},
|
"linkify": {:hex, :linkify, "0.5.3", "5f8143d8f61f5ff08d3aeeff47ef6509492b4948d8f08007fbf66e4d2246a7f2", [:mix], [], "hexpm", "3ef35a1377d47c25506e07c1c005ea9d38d700699d92ee92825f024434258177"},
|
||||||
"mail": {:hex, :mail, "0.3.1", "cb0a14e4ed8904e4e5a08214e686ccf6f9099346885db17d8c309381f865cc5c", [:mix], [], "hexpm", "1db701e89865c1d5fa296b2b57b1cd587587cca8d8a1a22892b35ef5a8e352a6"},
|
"mail": {:hex, :mail, "0.4.2", "959229676ef11dfdfb1269ce4a611622cb70415a1d6f925d79e547848bafc14d", [:mix], [], "hexpm", "08e5b70c72b8d1605cb88ef2df2c7e41d002210a621503ea1c13f1a7916b6bd3"},
|
||||||
"majic": {:git, "https://akkoma.dev/AkkomaGang/majic.git", "80540b36939ec83f48e76c61e5000e0fd67706f0", [ref: "80540b36939ec83f48e76c61e5000e0fd67706f0"]},
|
"majic": {:git, "https://akkoma.dev/AkkomaGang/majic.git", "80540b36939ec83f48e76c61e5000e0fd67706f0", [ref: "80540b36939ec83f48e76c61e5000e0fd67706f0"]},
|
||||||
"makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"},
|
"makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"},
|
||||||
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
|
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
|
||||||
"makeup_erlang": {:hex, :makeup_erlang, "0.1.5", "e0ff5a7c708dda34311f7522a8758e23bfcd7d8d8068dc312b5eb41c6fd76eba", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "94d2e986428585a21516d7d7149781480013c56e30c6a233534bedf38867a59a"},
|
"makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"},
|
||||||
"meck": {:hex, :meck, "0.9.2", "85ccbab053f1db86c7ca240e9fc718170ee5bda03810a6292b5306bf31bae5f5", [:rebar3], [], "hexpm", "81344f561357dc40a8344afa53767c32669153355b626ea9fcbc8da6b3045826"},
|
"meck": {:hex, :meck, "0.9.2", "85ccbab053f1db86c7ca240e9fc718170ee5bda03810a6292b5306bf31bae5f5", [:rebar3], [], "hexpm", "81344f561357dc40a8344afa53767c32669153355b626ea9fcbc8da6b3045826"},
|
||||||
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
|
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
|
||||||
"mfm_parser": {:git, "https://akkoma.dev/AkkomaGang/mfm-parser.git", "b21ab7754024af096f2d14247574f55f0063295b", [ref: "b21ab7754024af096f2d14247574f55f0063295b"]},
|
"mfm_parser": {:git, "https://akkoma.dev/AkkomaGang/mfm-parser.git", "b21ab7754024af096f2d14247574f55f0063295b", [ref: "b21ab7754024af096f2d14247574f55f0063295b"]},
|
||||||
"mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"},
|
"mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"},
|
||||||
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
|
"mimerl": {:hex, :mimerl, "1.3.0", "d0cd9fc04b9061f82490f6581e0128379830e78535e017f7780f37fea7545726", [:rebar3], [], "hexpm", "a1e15a50d1887217de95f0b9b0793e32853f7c258a5cd227650889b38839fe9d"},
|
||||||
"mint": {:hex, :mint, "1.5.2", "4805e059f96028948870d23d7783613b7e6b0e2fb4e98d720383852a760067fd", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "d77d9e9ce4eb35941907f1d3df38d8f750c357865353e21d335bdcdf6d892a02"},
|
"mint": {:hex, :mint, "1.5.2", "4805e059f96028948870d23d7783613b7e6b0e2fb4e98d720383852a760067fd", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "d77d9e9ce4eb35941907f1d3df38d8f750c357865353e21d335bdcdf6d892a02"},
|
||||||
"mock": {:hex, :mock, "0.3.8", "7046a306b71db2488ef54395eeb74df0a7f335a7caca4a3d3875d1fc81c884dd", [:mix], [{:meck, "~> 0.9.2", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "7fa82364c97617d79bb7d15571193fc0c4fe5afd0c932cef09426b3ee6fe2022"},
|
"mock": {:hex, :mock, "0.3.8", "7046a306b71db2488ef54395eeb74df0a7f335a7caca4a3d3875d1fc81c884dd", [:mix], [{:meck, "~> 0.9.2", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "7fa82364c97617d79bb7d15571193fc0c4fe5afd0c932cef09426b3ee6fe2022"},
|
||||||
"mogrify": {:hex, :mogrify, "0.9.3", "238c782f00271dace01369ad35ae2e9dd020feee3443b9299ea5ea6bed559841", [:mix], [], "hexpm", "0189b1e1de27455f2b9ae8cf88239cefd23d38de9276eb5add7159aea51731e6"},
|
"mogrify": {:hex, :mogrify, "0.9.3", "238c782f00271dace01369ad35ae2e9dd020feee3443b9299ea5ea6bed559841", [:mix], [], "hexpm", "0189b1e1de27455f2b9ae8cf88239cefd23d38de9276eb5add7159aea51731e6"},
|
||||||
"mox": {:hex, :mox, "1.1.0", "0f5e399649ce9ab7602f72e718305c0f9cdc351190f72844599545e4996af73c", [:mix], [], "hexpm", "d44474c50be02d5b72131070281a5d3895c0e7a95c780e90bc0cfe712f633a13"},
|
"mox": {:hex, :mox, "1.2.0", "a2cd96b4b80a3883e3100a221e8adc1b98e4c3a332a8fc434c39526babafd5b3", [:mix], [{:nimble_ownership, "~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}], "hexpm", "c7b92b3cc69ee24a7eeeaf944cd7be22013c52fcb580c1f33f50845ec821089a"},
|
||||||
"nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"},
|
"nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"},
|
||||||
|
"nimble_ownership": {:hex, :nimble_ownership, "1.0.0", "3f87744d42c21b2042a0aa1d48c83c77e6dd9dd357e425a038dd4b49ba8b79a1", [:mix], [], "hexpm", "7c16cc74f4e952464220a73055b557a273e8b1b7ace8489ec9d86e9ad56cb2cc"},
|
||||||
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
|
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
|
||||||
"nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"},
|
"nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"},
|
||||||
"oban": {:hex, :oban, "2.17.8", "7fd7c8e82c7819afc1b5b5ed8d6d92bf0ecdd7ba170328fb043301eb06d32521", [:mix], [{:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:ecto_sqlite3, "~> 0.9", [hex: :ecto_sqlite3, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a2165bf93843b7bcb68182c82725ddd4cb43c0c3719f114e7aa3b6c99c4b6129"},
|
"oban": {:hex, :oban, "2.17.12", "33fb0cbfb92b910d48dd91a908590fe3698bb85eacec8cd0d9bc6aa13dddd6d6", [:mix], [{:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:ecto_sqlite3, "~> 0.9", [hex: :ecto_sqlite3, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7a647d6cd6bb300073db17faabce22d80ae135da3baf3180a064fa7c4fa046e3"},
|
||||||
"open_api_spex": {:hex, :open_api_spex, "3.18.3", "fefb84fe323cacfc92afdd0ecb9e89bc0261ae00b7e3167ffc2028ce3944de42", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 3.0 or ~> 4.0 or ~> 5.0", [hex: :poison, repo: "hexpm", optional: true]}, {:ymlr, "~> 2.0 or ~> 3.0 or ~> 4.0 or ~> 5.0", [hex: :ymlr, repo: "hexpm", optional: true]}], "hexpm", "c0cfc31570199ce7e7520b494a591027da609af45f6bf9adce51e2469b1609fb"},
|
"open_api_spex": {:hex, :open_api_spex, "3.21.2", "6a704f3777761feeb5657340250d6d7332c545755116ca98f33d4b875777e1e5", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 3.0 or ~> 4.0 or ~> 5.0 or ~> 6.0", [hex: :poison, repo: "hexpm", optional: true]}, {:ymlr, "~> 2.0 or ~> 3.0 or ~> 4.0 or ~> 5.0", [hex: :ymlr, repo: "hexpm", optional: true]}], "hexpm", "f42ae6ed668b895ebba3e02773cfb4b41050df26f803f2ef634c72a7687dc387"},
|
||||||
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
|
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
|
||||||
"phoenix": {:hex, :phoenix, "1.7.12", "1cc589e0eab99f593a8aa38ec45f15d25297dd6187ee801c8de8947090b5a9d3", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "d646192fbade9f485b01bc9920c139bfdd19d0f8df3d73fd8eaf2dfbe0d2837c"},
|
"phoenix": {:hex, :phoenix, "1.7.14", "a7d0b3f1bc95987044ddada111e77bd7f75646a08518942c72a8440278ae7825", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "c7859bc56cc5dfef19ecfc240775dae358cbaa530231118a9e014df392ace61a"},
|
||||||
"phoenix_ecto": {:hex, :phoenix_ecto, "4.5.1", "6fdbc334ea53620e71655664df6f33f670747b3a7a6c4041cdda3e2c32df6257", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ebe43aa580db129e54408e719fb9659b7f9e0d52b965c5be26cdca416ecead28"},
|
"phoenix_ecto": {:hex, :phoenix_ecto, "4.6.3", "f686701b0499a07f2e3b122d84d52ff8a31f5def386e03706c916f6feddf69ef", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "909502956916a657a197f94cc1206d9a65247538de8a5e186f7537c895d95764"},
|
||||||
"phoenix_html": {:hex, :phoenix_html, "3.3.3", "380b8fb45912b5638d2f1d925a3771b4516b9a78587249cabe394e0a5d579dc9", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "923ebe6fec6e2e3b3e569dfbdc6560de932cd54b000ada0208b5f45024bdd76c"},
|
"phoenix_html": {:hex, :phoenix_html, "3.3.4", "42a09fc443bbc1da37e372a5c8e6755d046f22b9b11343bf885067357da21cb3", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0249d3abec3714aff3415e7ee3d9786cb325be3151e6c4b3021502c585bf53fb"},
|
||||||
"phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.7.2", "97cc4ff2dba1ebe504db72cb45098cb8e91f11160528b980bd282cc45c73b29c", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.18.3", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "0e5fdf063c7a3b620c566a30fcf68b7ee02e5e46fe48ee46a6ec3ba382dc05b7"},
|
"phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.7.2", "97cc4ff2dba1ebe504db72cb45098cb8e91f11160528b980bd282cc45c73b29c", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.18.3", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "0e5fdf063c7a3b620c566a30fcf68b7ee02e5e46fe48ee46a6ec3ba382dc05b7"},
|
||||||
"phoenix_live_view": {:hex, :phoenix_live_view, "0.18.18", "1f38fbd7c363723f19aad1a04b5490ff3a178e37daaf6999594d5f34796c47fc", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a5810d0472f3189ede6d2a95bda7f31c6113156b91784a3426cb0ab6a6d85214"},
|
"phoenix_live_view": {:hex, :phoenix_live_view, "0.18.18", "1f38fbd7c363723f19aad1a04b5490ff3a178e37daaf6999594d5f34796c47fc", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a5810d0472f3189ede6d2a95bda7f31c6113156b91784a3426cb0ab6a6d85214"},
|
||||||
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
|
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
|
||||||
"phoenix_swoosh": {:hex, :phoenix_swoosh, "1.2.1", "b74ccaa8046fbc388a62134360ee7d9742d5a8ae74063f34eb050279de7a99e1", [:mix], [{:finch, "~> 0.8", [hex: :finch, repo: "hexpm", optional: true]}, {:hackney, "~> 1.10", [hex: :hackney, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_view, "~> 1.0 or ~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:swoosh, "~> 1.5", [hex: :swoosh, repo: "hexpm", optional: false]}], "hexpm", "4000eeba3f9d7d1a6bf56d2bd56733d5cadf41a7f0d8ffe5bb67e7d667e204a2"},
|
"phoenix_swoosh": {:hex, :phoenix_swoosh, "1.2.1", "b74ccaa8046fbc388a62134360ee7d9742d5a8ae74063f34eb050279de7a99e1", [:mix], [{:finch, "~> 0.8", [hex: :finch, repo: "hexpm", optional: true]}, {:hackney, "~> 1.10", [hex: :hackney, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_view, "~> 1.0 or ~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}, {:swoosh, "~> 1.5", [hex: :swoosh, repo: "hexpm", optional: false]}], "hexpm", "4000eeba3f9d7d1a6bf56d2bd56733d5cadf41a7f0d8ffe5bb67e7d667e204a2"},
|
||||||
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
|
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
|
||||||
"phoenix_view": {:hex, :phoenix_view, "2.0.3", "4d32c4817fce933693741deeb99ef1392619f942633dde834a5163124813aad3", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "cd34049af41be2c627df99cd4eaa71fc52a328c0c3d8e7d4aa28f880c30e7f64"},
|
"phoenix_view": {:hex, :phoenix_view, "2.0.4", "b45c9d9cf15b3a1af5fb555c674b525391b6a1fe975f040fb4d913397b31abf4", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "4e992022ce14f31fe57335db27a28154afcc94e9983266835bb3040243eb620b"},
|
||||||
"plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"},
|
"plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"},
|
||||||
"plug_cowboy": {:hex, :plug_cowboy, "2.7.1", "87677ffe3b765bc96a89be7960f81703223fe2e21efa42c125fcd0127dd9d6b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "02dbd5f9ab571b864ae39418db7811618506256f6d13b4a45037e5fe78dc5de3"},
|
"plug_cowboy": {:hex, :plug_cowboy, "2.7.2", "fdadb973799ae691bf9ecad99125b16625b1c6039999da5fe544d99218e662e4", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "245d8a11ee2306094840c000e8816f0cbed69a23fc0ac2bcf8d7835ae019bb2f"},
|
||||||
"plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"},
|
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
|
||||||
"plug_static_index_html": {:hex, :plug_static_index_html, "1.0.0", "840123d4d3975585133485ea86af73cb2600afd7f2a976f9f5fd8b3808e636a0", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "79fd4fcf34d110605c26560cbae8f23c603ec4158c08298bd4360fdea90bb5cf"},
|
"plug_static_index_html": {:hex, :plug_static_index_html, "1.0.0", "840123d4d3975585133485ea86af73cb2600afd7f2a976f9f5fd8b3808e636a0", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "79fd4fcf34d110605c26560cbae8f23c603ec4158c08298bd4360fdea90bb5cf"},
|
||||||
"poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"},
|
"poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"},
|
||||||
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
|
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
|
||||||
"postgrex": {:hex, :postgrex, "0.17.5", "0483d054938a8dc069b21bdd636bf56c487404c241ce6c319c1f43588246b281", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "50b8b11afbb2c4095a3ba675b4f055c416d0f3d7de6633a595fc131a828a67eb"},
|
"postgrex": {:hex, :postgrex, "0.17.5", "0483d054938a8dc069b21bdd636bf56c487404c241ce6c319c1f43588246b281", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "50b8b11afbb2c4095a3ba675b4f055c416d0f3d7de6633a595fc131a828a67eb"},
|
||||||
"pot": {:hex, :pot, "1.0.2", "13abb849139fdc04ab8154986abbcb63bdee5de6ed2ba7e1713527e33df923dd", [:rebar3], [], "hexpm", "78fe127f5a4f5f919d6ea5a2a671827bd53eb9d37e5b4128c0ad3df99856c2e0"},
|
"pot": {:hex, :pot, "1.0.2", "13abb849139fdc04ab8154986abbcb63bdee5de6ed2ba7e1713527e33df923dd", [:rebar3], [], "hexpm", "78fe127f5a4f5f919d6ea5a2a671827bd53eb9d37e5b4128c0ad3df99856c2e0"},
|
||||||
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
|
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
|
||||||
"recon": {:hex, :recon, "2.5.5", "c108a4c406fa301a529151a3bb53158cadc4064ec0c5f99b03ddb8c0e4281bdf", [:mix, :rebar3], [], "hexpm", "632a6f447df7ccc1a4a10bdcfce71514412b16660fe59deca0fcf0aa3c054404"},
|
"recon": {:hex, :recon, "2.5.6", "9052588e83bfedfd9b72e1034532aee2a5369d9d9343b61aeb7fbce761010741", [:mix, :rebar3], [], "hexpm", "96c6799792d735cc0f0fd0f86267e9d351e63339cbe03df9d162010cefc26bb0"},
|
||||||
"remote_ip": {:hex, :remote_ip, "1.1.0", "cb308841595d15df3f9073b7c39243a1dd6ca56e5020295cb012c76fbec50f2d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "616ffdf66aaad6a72fc546dabf42eed87e2a99e97b09cbd92b10cc180d02ed74"},
|
"remote_ip": {:hex, :remote_ip, "1.1.0", "cb308841595d15df3f9073b7c39243a1dd6ca56e5020295cb012c76fbec50f2d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "616ffdf66aaad6a72fc546dabf42eed87e2a99e97b09cbd92b10cc180d02ed74"},
|
||||||
"search_parser": {:git, "https://github.com/FloatingGhost/pleroma-contrib-search-parser.git", "08971a81e68686f9ac465cfb6661d51c5e4e1e7f", [ref: "08971a81e68686f9ac465cfb6661d51c5e4e1e7f"]},
|
"search_parser": {:git, "https://github.com/FloatingGhost/pleroma-contrib-search-parser.git", "08971a81e68686f9ac465cfb6661d51c5e4e1e7f", [ref: "08971a81e68686f9ac465cfb6661d51c5e4e1e7f"]},
|
||||||
"sleeplocks": {:hex, :sleeplocks, "1.1.2", "d45aa1c5513da48c888715e3381211c859af34bee9b8290490e10c90bb6ff0ca", [:rebar3], [], "hexpm", "9fe5d048c5b781d6305c1a3a0f40bb3dfc06f49bf40571f3d2d0c57eaa7f59a5"},
|
"sleeplocks": {:hex, :sleeplocks, "1.1.3", "96a86460cc33b435c7310dbd27ec82ca2c1f24ae38e34f8edde97f756503441a", [:rebar3], [], "hexpm", "d3b3958552e6eb16f463921e70ae7c767519ef8f5be46d7696cc1ed649421321"},
|
||||||
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
|
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
|
||||||
"statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"},
|
"statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"},
|
||||||
"sweet_xml": {:hex, :sweet_xml, "0.7.4", "a8b7e1ce7ecd775c7e8a65d501bc2cd933bff3a9c41ab763f5105688ef485d08", [:mix], [], "hexpm", "e7c4b0bdbf460c928234951def54fe87edf1a170f6896675443279e2dbeba167"},
|
"sweet_xml": {:hex, :sweet_xml, "0.7.4", "a8b7e1ce7ecd775c7e8a65d501bc2cd933bff3a9c41ab763f5105688ef485d08", [:mix], [], "hexpm", "e7c4b0bdbf460c928234951def54fe87edf1a170f6896675443279e2dbeba167"},
|
||||||
"swoosh": {:hex, :swoosh, "1.14.4", "94e9dba91f7695a10f49b0172c4a4cb658ef24abef7e8140394521b7f3bbb2d4", [:mix], [{:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.4 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "081c5a590e4ba85cc89baddf7b2beecf6c13f7f84a958f1cd969290815f0f026"},
|
"swoosh": {:hex, :swoosh, "1.14.4", "94e9dba91f7695a10f49b0172c4a4cb658ef24abef7e8140394521b7f3bbb2d4", [:mix], [{:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.4 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "081c5a590e4ba85cc89baddf7b2beecf6c13f7f84a958f1cd969290815f0f026"},
|
||||||
"syslog": {:hex, :syslog, "1.1.0", "6419a232bea84f07b56dc575225007ffe34d9fdc91abe6f1b2f254fd71d8efc2", [:rebar3], [], "hexpm", "4c6a41373c7e20587be33ef841d3de6f3beba08519809329ecc4d27b15b659e1"},
|
"syslog": {:hex, :syslog, "1.1.0", "6419a232bea84f07b56dc575225007ffe34d9fdc91abe6f1b2f254fd71d8efc2", [:rebar3], [], "hexpm", "4c6a41373c7e20587be33ef841d3de6f3beba08519809329ecc4d27b15b659e1"},
|
||||||
"table_rex": {:hex, :table_rex, "4.0.0", "3c613a68ebdc6d4d1e731bc973c233500974ec3993c99fcdabb210407b90959b", [:mix], [], "hexpm", "c35c4d5612ca49ebb0344ea10387da4d2afe278387d4019e4d8111e815df8f55"},
|
"table_rex": {:hex, :table_rex, "4.0.0", "3c613a68ebdc6d4d1e731bc973c233500974ec3993c99fcdabb210407b90959b", [:mix], [], "hexpm", "c35c4d5612ca49ebb0344ea10387da4d2afe278387d4019e4d8111e815df8f55"},
|
||||||
"telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"},
|
"telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},
|
||||||
"telemetry_metrics": {:hex, :telemetry_metrics, "0.6.2", "2caabe9344ec17eafe5403304771c3539f3b6e2f7fb6a6f602558c825d0d0bfb", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9b43db0dc33863930b9ef9d27137e78974756f5f198cae18409970ed6fa5b561"},
|
"telemetry_metrics": {:hex, :telemetry_metrics, "0.6.2", "2caabe9344ec17eafe5403304771c3539f3b6e2f7fb6a6f602558c825d0d0bfb", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9b43db0dc33863930b9ef9d27137e78974756f5f198cae18409970ed6fa5b561"},
|
||||||
"telemetry_metrics_prometheus": {:hex, :telemetry_metrics_prometheus, "1.1.0", "1cc23e932c1ef9aa3b91db257ead31ea58d53229d407e059b29bb962c1505a13", [:mix], [{:plug_cowboy, "~> 2.1", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:telemetry_metrics_prometheus_core, "~> 1.0", [hex: :telemetry_metrics_prometheus_core, repo: "hexpm", optional: false]}], "hexpm", "d43b3659b3244da44fe0275b717701542365d4519b79d9ce895b9719c1ce4d26"},
|
"telemetry_metrics_prometheus": {:hex, :telemetry_metrics_prometheus, "1.1.0", "1cc23e932c1ef9aa3b91db257ead31ea58d53229d407e059b29bb962c1505a13", [:mix], [{:plug_cowboy, "~> 2.1", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:telemetry_metrics_prometheus_core, "~> 1.0", [hex: :telemetry_metrics_prometheus_core, repo: "hexpm", optional: false]}], "hexpm", "d43b3659b3244da44fe0275b717701542365d4519b79d9ce895b9719c1ce4d26"},
|
||||||
"telemetry_metrics_prometheus_core": {:hex, :telemetry_metrics_prometheus_core, "1.1.0", "4e15f6d7dbedb3a4e3aed2262b7e1407f166fcb9c30ca3f96635dfbbef99965c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "0dd10e7fe8070095df063798f82709b0a1224c31b8baf6278b423898d591a069"},
|
"telemetry_metrics_prometheus_core": {:hex, :telemetry_metrics_prometheus_core, "1.1.0", "4e15f6d7dbedb3a4e3aed2262b7e1407f166fcb9c30ca3f96635dfbbef99965c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "0dd10e7fe8070095df063798f82709b0a1224c31b8baf6278b423898d591a069"},
|
||||||
"telemetry_poller": {:hex, :telemetry_poller, "1.1.0", "58fa7c216257291caaf8d05678c8d01bd45f4bdbc1286838a28c4bb62ef32999", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9eb9d9cbfd81cbd7cdd24682f8711b6e2b691289a0de6826e58452f28c103c8f"},
|
"telemetry_poller": {:hex, :telemetry_poller, "1.1.0", "58fa7c216257291caaf8d05678c8d01bd45f4bdbc1286838a28c4bb62ef32999", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9eb9d9cbfd81cbd7cdd24682f8711b6e2b691289a0de6826e58452f28c103c8f"},
|
||||||
"temple": {:git, "https://akkoma.dev/AkkomaGang/temple.git", "066a699ade472d8fa42a9d730b29a61af9bc8b59", [ref: "066a699ade472d8fa42a9d730b29a61af9bc8b59"]},
|
"temple": {:git, "https://akkoma.dev/AkkomaGang/temple.git", "066a699ade472d8fa42a9d730b29a61af9bc8b59", [ref: "066a699ade472d8fa42a9d730b29a61af9bc8b59"]},
|
||||||
"tesla": {:hex, :tesla, "1.9.0", "8c22db6a826e56a087eeb8cdef56889731287f53feeb3f361dec5d4c8efb6f14", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "7c240c67e855f7e63e795bf16d6b3f5115a81d1f44b7fe4eadbf656bae0fef8a"},
|
"tesla": {:hex, :tesla, "1.13.0", "24a068a48d107080dd7c943a593997eee265977a38020eb2ab657cca78a12502", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:mox, "~> 1.0", [hex: :mox, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "7b8fc8f6b0640fa0d090af7889d12eb396460e044b6f8688a8e55e30406a2200"},
|
||||||
"timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"},
|
"timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"},
|
||||||
"trailing_format_plug": {:hex, :trailing_format_plug, "0.0.7", "64b877f912cf7273bed03379936df39894149e35137ac9509117e59866e10e45", [:mix], [{:plug, "> 0.12.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bd4fde4c15f3e993a999e019d64347489b91b7a9096af68b2bdadd192afa693f"},
|
"trailing_format_plug": {:hex, :trailing_format_plug, "0.0.7", "64b877f912cf7273bed03379936df39894149e35137ac9509117e59866e10e45", [:mix], [{:plug, "> 0.12.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bd4fde4c15f3e993a999e019d64347489b91b7a9096af68b2bdadd192afa693f"},
|
||||||
"tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"},
|
"tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"},
|
||||||
"ueberauth": {:hex, :ueberauth, "0.10.5", "806adb703df87e55b5615cf365e809f84c20c68aa8c08ff8a416a5a6644c4b02", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3efd1f31d490a125c7ed453b926f7c31d78b97b8a854c755f5c40064bf3ac9e1"},
|
"ueberauth": {:hex, :ueberauth, "0.10.5", "806adb703df87e55b5615cf365e809f84c20c68aa8c08ff8a416a5a6644c4b02", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3efd1f31d490a125c7ed453b926f7c31d78b97b8a854c755f5c40064bf3ac9e1"},
|
||||||
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
|
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
|
||||||
"unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"},
|
"unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"},
|
||||||
"vex": {:hex, :vex, "0.9.2", "fe061acc9e0907d983d46b51bf35d58176f0fe6eb7ba3b33c9336401bf42b6d1", [:mix], [], "hexpm", "76e709a9762e98c6b462dfce92e9b5dfbf712839227f2da8add6dd11549b12cb"},
|
"vex": {:hex, :vex, "0.9.2", "fe061acc9e0907d983d46b51bf35d58176f0fe6eb7ba3b33c9336401bf42b6d1", [:mix], [], "hexpm", "76e709a9762e98c6b462dfce92e9b5dfbf712839227f2da8add6dd11549b12cb"},
|
||||||
"web_push_encryption": {:hex, :web_push_encryption, "0.3.1", "76d0e7375142dfee67391e7690e89f92578889cbcf2879377900b5620ee4708d", [:mix], [{:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jose, "~> 1.11.1", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "4f82b2e57622fb9337559058e8797cb0df7e7c9790793bdc4e40bc895f70e2a2"},
|
"web_push_encryption": {:hex, :web_push_encryption, "0.3.1", "76d0e7375142dfee67391e7690e89f92578889cbcf2879377900b5620ee4708d", [:mix], [{:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jose, "~> 1.11.1", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "4f82b2e57622fb9337559058e8797cb0df7e7c9790793bdc4e40bc895f70e2a2"},
|
||||||
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
|
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
|
||||||
"websock_adapter": {:hex, :websock_adapter, "0.5.6", "0437fe56e093fd4ac422de33bf8fc89f7bc1416a3f2d732d8b2c8fd54792fe60", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "e04378d26b0af627817ae84c92083b7e97aca3121196679b73c73b99d0d133ea"},
|
"websock_adapter": {:hex, :websock_adapter, "0.5.7", "65fa74042530064ef0570b75b43f5c49bb8b235d6515671b3d250022cb8a1f9e", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "d0f478ee64deddfec64b800673fd6e0c8888b079d9f3444dd96d2a98383bdbd1"},
|
||||||
"websockex": {:hex, :websockex, "0.4.3", "92b7905769c79c6480c02daacaca2ddd49de936d912976a4d3c923723b647bf0", [:mix], [], "hexpm", "95f2e7072b85a3a4cc385602d42115b73ce0b74a9121d0d6dbbf557645ac53e4"},
|
"websockex": {:hex, :websockex, "0.4.3", "92b7905769c79c6480c02daacaca2ddd49de936d912976a4d3c923723b647bf0", [:mix], [], "hexpm", "95f2e7072b85a3a4cc385602d42115b73ce0b74a9121d0d6dbbf557645ac53e4"},
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ msgstr ""
|
||||||
"POT-Creation-Date: 2022-07-28 09:35+0000\n"
|
"POT-Creation-Date: 2022-07-28 09:35+0000\n"
|
||||||
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
||||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||||
"Language-Team: Catalan <http://translate.akkoma.dev/projects/akkoma/"
|
"Language-Team: Catalan <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||||
"akkoma-backend-config-descriptions/ca/>\n"
|
"backend-config-descriptions/ca/>\n"
|
||||||
"Language: ca\n"
|
"Language: ca\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -3296,18 +3296,6 @@ msgstr ""
|
||||||
"If enabled, a name parameter will be added to the URL of the upload. For "
|
"If enabled, a name parameter will be added to the URL of the upload. For "
|
||||||
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
msgstr ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
@ -5798,12 +5786,6 @@ msgctxt "config label at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "Link name"
|
msgid "Link name"
|
||||||
msgstr "Link name"
|
msgstr "Link name"
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy remote"
|
|
||||||
msgstr "Proxy remote"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
|
|
@ -2602,12 +2602,6 @@ msgctxt "config description at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
msgid "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy requests to the remote uploader.\n\nUseful if media upload endpoint is not internet accessible.\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
@ -4888,12 +4882,6 @@ msgctxt "config label at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "Link name"
|
msgid "Link name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy remote"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
|
|
@ -2603,12 +2603,6 @@ msgctxt "config description at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
msgid "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy requests to the remote uploader.\n\nUseful if media upload endpoint is not internet accessible.\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
@ -4889,12 +4883,6 @@ msgctxt "config label at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "Link name"
|
msgid "Link name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy remote"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,8 @@ msgstr ""
|
||||||
"POT-Creation-Date: 2022-08-06 22:23+0000\n"
|
"POT-Creation-Date: 2022-08-06 22:23+0000\n"
|
||||||
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
||||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||||
"Language-Team: Spanish <http://translate.akkoma.dev/projects/akkoma/"
|
"Language-Team: Spanish <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||||
"akkoma-backend-config-descriptions/es/>\n"
|
"backend-config-descriptions/es/>\n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -3314,18 +3314,6 @@ msgstr ""
|
||||||
"If enabled, a name parameter will be added to the URL of the upload. For "
|
"If enabled, a name parameter will be added to the URL of the upload. For "
|
||||||
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
msgstr ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
@ -5816,12 +5804,6 @@ msgctxt "config label at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "Link name"
|
msgid "Link name"
|
||||||
msgstr "Link name"
|
msgstr "Link name"
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy remote"
|
|
||||||
msgstr "Proxy remote"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,8 @@ msgstr ""
|
||||||
"POT-Creation-Date: 2022-08-06 21:54+0000\n"
|
"POT-Creation-Date: 2022-08-06 21:54+0000\n"
|
||||||
"PO-Revision-Date: 2023-08-04 14:26+0000\n"
|
"PO-Revision-Date: 2023-08-04 14:26+0000\n"
|
||||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||||
"Language-Team: Dutch <http://translate.akkoma.dev/projects/akkoma/"
|
"Language-Team: Dutch <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||||
"akkoma-backend-config-descriptions/nl/>\n"
|
"backend-config-descriptions/nl/>\n"
|
||||||
"Language: nl\n"
|
"Language: nl\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -3316,18 +3316,6 @@ msgstr ""
|
||||||
"If enabled, a name parameter will be added to the URL of the upload. For "
|
"If enabled, a name parameter will be added to the URL of the upload. For "
|
||||||
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
msgstr ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
@ -5818,12 +5806,6 @@ msgctxt "config label at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "Link name"
|
msgid "Link name"
|
||||||
msgstr "Link name"
|
msgstr "Link name"
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy remote"
|
|
||||||
msgstr "Proxy remote"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,8 @@ msgstr ""
|
||||||
"POT-Creation-Date: 2023-07-07 18:47+0000\n"
|
"POT-Creation-Date: 2023-07-07 18:47+0000\n"
|
||||||
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
||||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||||
"Language-Team: Thai <http://translate.akkoma.dev/projects/akkoma/"
|
"Language-Team: Thai <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||||
"akkoma-backend-config-descriptions/th/>\n"
|
"backend-config-descriptions/th/>\n"
|
||||||
"Language: th\n"
|
"Language: th\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -3325,18 +3325,6 @@ msgstr ""
|
||||||
"If enabled, a name parameter will be added to the URL of the upload. For "
|
"If enabled, a name parameter will be added to the URL of the upload. For "
|
||||||
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
"example `https://instance.tld/media/imagehash.png?name=realname.png`."
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
msgstr ""
|
|
||||||
"Proxy requests to the remote uploader.\n"
|
|
||||||
"\n"
|
|
||||||
"Useful if media upload endpoint is not internet accessible.\n"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config description at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
@ -5827,12 +5815,6 @@ msgctxt "config label at :pleroma-Pleroma.Upload > :link_name"
|
||||||
msgid "Link name"
|
msgid "Link name"
|
||||||
msgstr "Link name"
|
msgstr "Link name"
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :proxy_remote"
|
|
||||||
msgid "Proxy remote"
|
|
||||||
msgstr "Proxy remote"
|
|
||||||
|
|
||||||
#: lib/pleroma/docs/translator.ex:5
|
#: lib/pleroma/docs/translator.ex:5
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
msgctxt "config label at :pleroma-Pleroma.Upload > :uploader"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,12 +1,10 @@
|
||||||
defmodule Pleroma.Repo.Migrations.AddContextIndex do
|
defmodule Pleroma.Repo.Migrations.AddContextIndex do
|
||||||
use Ecto.Migration
|
use Ecto.Migration
|
||||||
@disable_ddl_transaction true
|
|
||||||
|
|
||||||
def change do
|
def change do
|
||||||
create(
|
create(
|
||||||
index(:activities, ["(data->>'type')", "(data->>'context')"],
|
index(:activities, ["(data->>'type')", "(data->>'context')"],
|
||||||
name: :activities_context_index,
|
name: :activities_context_index
|
||||||
concurrently: true
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue