Merge branch 'typo' into 'develop'

Fix some typos

See merge request pleroma/pleroma!4017
This commit is contained in:
Haelwenn 2023-12-28 10:02:17 +00:00
commit 81ce04990e
75 changed files with 134 additions and 134 deletions

View File

@ -62,7 +62,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 2.5.4 ## 2.5.4
## Security ## Security
- Fix XML External Entity (XXE) loading vulnerability allowing to fetch arbitary files from the server's filesystem - Fix XML External Entity (XXE) loading vulnerability allowing to fetch arbitrary files from the server's filesystem
## 2.5.3 ## 2.5.3
@ -78,7 +78,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 2.5.4 ## 2.5.4
## Security ## Security
- Fix XML External Entity (XXE) loading vulnerability allowing to fetch arbitary files from the server's filesystem - Fix XML External Entity (XXE) loading vulnerability allowing to fetch arbitrary files from the server's filesystem
## 2.5.3 ## 2.5.3
@ -118,7 +118,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix `block_from_stranger` setting - Fix `block_from_stranger` setting
- Fix rel="me" - Fix rel="me"
- Docker images will now run properly - Docker images will now run properly
- Fix inproper content being cached in report content - Fix improper content being cached in report content
- Notification filter on object content will not operate on the ones that inherently have no content - Notification filter on object content will not operate on the ones that inherently have no content
- ZWNJ and double dots in links are parsed properly for Plain-text posts - ZWNJ and double dots in links are parsed properly for Plain-text posts
- OTP releases will work on systems with a newer libcrypt - OTP releases will work on systems with a newer libcrypt
@ -784,7 +784,7 @@ switched to a new configuration mechanism, however it was not officially removed
- Rate limiter crashes when there is no explicitly specified ip in the config - Rate limiter crashes when there is no explicitly specified ip in the config
- 500 errors when no `Accept` header is present if Static-FE is enabled - 500 errors when no `Accept` header is present if Static-FE is enabled
- Instance panel not being updated immediately due to wrong `Cache-Control` headers - Instance panel not being updated immediately due to wrong `Cache-Control` headers
- Statuses posted with BBCode/Markdown having unncessary newlines in Pleroma-FE - Statuses posted with BBCode/Markdown having unnecessary newlines in Pleroma-FE
- OTP: Fix some settings not being migrated to in-database config properly - OTP: Fix some settings not being migrated to in-database config properly
- No `Cache-Control` headers on attachment/media proxy requests - No `Cache-Control` headers on attachment/media proxy requests
- Character limit enforcement being off by 1 - Character limit enforcement being off by 1
@ -1104,10 +1104,10 @@ curl -Lo ./bin/pleroma_ctl 'https://git.pleroma.social/pleroma/pleroma/raw/devel
- Reverse Proxy limiting `max_body_length` was incorrectly defined and only checked `Content-Length` headers which may not be sufficient in some circumstances - Reverse Proxy limiting `max_body_length` was incorrectly defined and only checked `Content-Length` headers which may not be sufficient in some circumstances
### Added ### Added
- Expiring/ephemeral activites. All activities can have expires_at value set, which controls when they should be deleted automatically. - Expiring/ephemeral activities. All activities can have expires_at value set, which controls when they should be deleted automatically.
- Mastodon API: in post_status, the expires_in parameter lets you set the number of seconds until an activity expires. It must be at least one hour. - Mastodon API: in post_status, the expires_in parameter lets you set the number of seconds until an activity expires. It must be at least one hour.
- Mastodon API: all status JSON responses contain a `pleroma.expires_at` item which states when an activity will expire. The value is only shown to the user who created the activity. To everyone else it's empty. - Mastodon API: all status JSON responses contain a `pleroma.expires_at` item which states when an activity will expire. The value is only shown to the user who created the activity. To everyone else it's empty.
- Configuration: `ActivityExpiration.enabled` controls whether expired activites will get deleted at the appropriate time. Enabled by default. - Configuration: `ActivityExpiration.enabled` controls whether expired activities will get deleted at the appropriate time. Enabled by default.
- Conversations: Add Pleroma-specific conversation endpoints and status posting extensions. Run the `bump_all_conversations` task again to create the necessary data. - Conversations: Add Pleroma-specific conversation endpoints and status posting extensions. Run the `bump_all_conversations` task again to create the necessary data.
- MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`) - MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`)
- MRF: Support for excluding specific domains from Transparency. - MRF: Support for excluding specific domains from Transparency.

0
changelog.d/typo.skip Normal file
View File

View File

@ -1444,7 +1444,7 @@ config :pleroma, :config_description, [
label: "Subject line behavior", label: "Subject line behavior",
type: :string, type: :string,
description: "Allows changing the default behaviour of subject lines in replies. description: "Allows changing the default behaviour of subject lines in replies.
`email`: copy and preprend re:, as in email, `email`: copy and prepend re:, as in email,
`masto`: copy verbatim, as in Mastodon, `masto`: copy verbatim, as in Mastodon,
`noop`: don't copy the subject.", `noop`: don't copy the subject.",
suggestions: ["email", "masto", "noop"] suggestions: ["email", "masto", "noop"]
@ -3096,7 +3096,7 @@ config :pleroma, :config_description, [
key: :max_waiting, key: :max_waiting,
type: :integer, type: :integer,
description: description:
"Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made", "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errors when a new request is made",
suggestions: [10] suggestions: [10]
}, },
%{ %{
@ -3362,7 +3362,7 @@ config :pleroma, :config_description, [
%{ %{
key: :purge_after_days, key: :purge_after_days,
type: :integer, type: :integer,
description: "Remove backup achives after N days", description: "Remove backup archives after N days",
suggestions: [30] suggestions: [30]
}, },
%{ %{

View File

@ -1,4 +1,4 @@
# Transfering the config to/from the database # Transferring the config to/from the database
{! backend/administration/CLI_tasks/general_cli_task_info.include !} {! backend/administration/CLI_tasks/general_cli_task_info.include !}
@ -34,7 +34,7 @@
Options: Options:
- `<path>` - where to save migrated config. E.g. `--path=/tmp`. If file saved into non standart folder, you must manually copy file into directory where Pleroma can read it. For OTP install path will be `PLEROMA_CONFIG_PATH` or `/etc/pleroma`. For installation from source - `config` directory in the pleroma folder. - `<path>` - where to save migrated config. E.g. `--path=/tmp`. If file saved into non-standard folder, you must manually copy file into directory where Pleroma can read it. For OTP install path will be `PLEROMA_CONFIG_PATH` or `/etc/pleroma`. For installation from source - `config` directory in the pleroma folder.
- `<env>` - environment, for which is migrated config. By default is `prod`. - `<env>` - environment, for which is migrated config. By default is `prod`.
- To delete transferred settings from database optional flag `-d` can be used - To delete transferred settings from database optional flag `-d` can be used

View File

@ -31,7 +31,7 @@
1. Optionally you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse. 1. Optionally you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse.
* You can do this from the admin-FE where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown. * You can do this from the admin-FE where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown.
* You can also list local users and delete them individualy using the CLI tasks for [Managing users](./CLI_tasks/user.md). * You can also list local users and delete them individually using the CLI tasks for [Managing users](./CLI_tasks/user.md).
2. Stop the Pleroma service `systemctl stop pleroma` 2. Stop the Pleroma service `systemctl stop pleroma`
3. Disable pleroma from systemd `systemctl disable pleroma` 3. Disable pleroma from systemd `systemctl disable pleroma`
4. Remove the files and folders you created during installation (see installation guide). This includes the pleroma, nginx and systemd files and folders. 4. Remove the files and folders you created during installation (see installation guide). This includes the pleroma, nginx and systemd files and folders.

View File

@ -154,7 +154,7 @@ To add configuration to your config file, you can copy it from the base config.
* `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (See [`:mrf_mention`](#mrf_mention)). * `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (See [`:mrf_mention`](#mrf_mention)).
* `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)). * `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)).
* `Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy`: Rejects or delists posts based on their age when received. (See [`:mrf_object_age`](#mrf_object_age)). * `Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy`: Rejects or delists posts based on their age when received. (See [`:mrf_object_age`](#mrf_object_age)).
* `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled delections. * `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled deletions.
* `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines. * `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines.
* `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed. * `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed.
* `Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy`: Drops follow requests from followbots. Users can still allow bots to follow them by first following the bot. * `Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy`: Drops follow requests from followbots. Users can still allow bots to follow them by first following the bot.
@ -506,7 +506,7 @@ config :pleroma, :rate_limit,
Means that: Means that:
1. In 60 seconds, 15 authentication attempts can be performed from the same IP address. 1. In 60 seconds, 15 authentication attempts can be performed from the same IP address.
2. In 1 second, 10 search requests can be performed from the same IP adress by unauthenticated users, while authenticated users can perform 30 search requests per second. 2. In 1 second, 10 search requests can be performed from the same IP address by unauthenticated users, while authenticated users can perform 30 search requests per second.
Supported rate limiters: Supported rate limiters:
@ -1081,7 +1081,7 @@ config :pleroma, Pleroma.Formatter,
## :configurable_from_database ## :configurable_from_database
Boolean, enables/disables in-database configuration. Read [Transfering the config to/from the database](../administration/CLI_tasks/config.md) for more information. Boolean, enables/disables in-database configuration. Read [Transferring the config to/from the database](../administration/CLI_tasks/config.md) for more information.
## :database_config_whitelist ## :database_config_whitelist
@ -1142,7 +1142,7 @@ Control favicons for instances.
!!! note !!! note
Requires enabled email Requires enabled email
* `:purge_after_days` an integer, remove backup achives after N days. * `:purge_after_days` an integer, remove backup achieves after N days.
* `:limit_days` an integer, limit user to export not more often than once per N days. * `:limit_days` an integer, limit user to export not more often than once per N days.
* `:dir` a string with a path to backup temporary directory or `nil` to let Pleroma choose temporary directory in the following order: * `:dir` a string with a path to backup temporary directory or `nil` to let Pleroma choose temporary directory in the following order:
1. the directory named by the TMPDIR environment variable 1. the directory named by the TMPDIR environment variable

View File

@ -29,7 +29,7 @@ foo, /emoji/custom/foo.png
The files should be PNG (APNG is okay with `.png` for `image/png` Content-type) and under 50kb for compatibility with mastodon. The files should be PNG (APNG is okay with `.png` for `image/png` Content-type) and under 50kb for compatibility with mastodon.
Default file extentions and locations for emojis are set in `config.exs`. To use different locations or file-extentions, add the `shortcode_globs` to your secrets file (`prod.secret.exs` or `dev.secret.exs`) and edit it. Note that not all fediverse-software will show emojis with other file extentions: Default file extensions and locations for emojis are set in `config.exs`. To use different locations or file-extensions, add the `shortcode_globs` to your secrets file (`prod.secret.exs` or `dev.secret.exs`) and edit it. Note that not all fediverse-software will show emojis with other file extensions:
```elixir ```elixir
config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png", "/emoji/custom/**/*.gif"] config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png", "/emoji/custom/**/*.gif"]
``` ```

View File

@ -1,4 +1,4 @@
# I2P Federation and Accessability # I2P Federation and Accessibility
This guide is going to focus on the Pleroma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date. This guide is going to focus on the Pleroma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date.
It might be added to this guide if there will be a need for that. It might be added to this guide if there will be a need for that.

View File

@ -29,7 +29,7 @@ HiddenServiceDir /var/lib/tor/pleroma_hidden_service/
HiddenServicePort 80 127.0.0.1:8099 HiddenServicePort 80 127.0.0.1:8099
HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version ) HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version )
``` ```
Restart Tor to generate an adress: Restart Tor to generate an address:
``` ```
systemctl restart tor@default.service systemctl restart tor@default.service
``` ```

View File

@ -1,6 +1,6 @@
# Optimizing the BEAM # Optimizing the BEAM
Pleroma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between procesess is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty. Pleroma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between processes is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty.
This strategy is very successful in making a performant and responsive application, but is not desirable on Virtual Machines or hardware with few CPU cores. Pleroma instances are often deployed on the same server as the required PostgreSQL database which can lead to situations where the Pleroma application is holding the CPU in a busy-wait loop and as a result the database cannot process requests in a timely manner. The fewer CPUs available, the more this problem is exacerbated. The latency is further amplified by the OS being installed on a Virtual Machine as the Hypervisor uses CPU time-slicing to pause the entire OS and switch between other tasks. This strategy is very successful in making a performant and responsive application, but is not desirable on Virtual Machines or hardware with few CPU cores. Pleroma instances are often deployed on the same server as the required PostgreSQL database which can lead to situations where the Pleroma application is holding the CPU in a busy-wait loop and as a result the database cannot process requests in a timely manner. The fewer CPUs available, the more this problem is exacerbated. The latency is further amplified by the OS being installed on a Virtual Machine as the Hypervisor uses CPU time-slicing to pause the entire OS and switch between other tasks.

View File

@ -22,7 +22,7 @@ config :pleroma, Pleroma.Repo,
] ]
``` ```
A more detailed explaination of the issue can be found at <https://blog.soykaf.com/post/postgresql-elixir-troubles/>. A more detailed explanation of the issue can be found at <https://blog.soykaf.com/post/postgresql-elixir-troubles/>.
## Example configurations ## Example configurations

View File

@ -38,7 +38,7 @@ indexes faster when it can process many posts in a single batch.
Information about setting up meilisearch can be found in the Information about setting up meilisearch can be found in the
[official documentation](https://docs.meilisearch.com/learn/getting_started/installation.html). [official documentation](https://docs.meilisearch.com/learn/getting_started/installation.html).
You probably want to start it with `MEILI_NO_ANALYTICS=true` environment variable to disable analytics. You probably want to start it with `MEILI_NO_ANALYTICS=true` environment variable to disable analytics.
At least version 0.25.0 is required, but you are strongly adviced to use at least 0.26.0, as it introduces At least version 0.25.0 is required, but you are strongly advised to use at least 0.26.0, as it introduces
the `--enable-auto-batching` option which drastically improves performance. Without this option, the search the `--enable-auto-batching` option which drastically improves performance. Without this option, the search
is hardly usable on a somewhat big instance. is hardly usable on a somewhat big instance.
@ -61,7 +61,7 @@ You will see a "Default Admin API Key", this is the key you actually put into yo
### Initial indexing ### Initial indexing
After setting up the configuration, you'll want to index all of your already existsing posts. Only public posts are indexed. You'll only After setting up the configuration, you'll want to index all of your already existing posts. Only public posts are indexed. You'll only
have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. This is also a fairly RAM have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. This is also a fairly RAM
consuming process for `meilisearch`, and it will take a lot of RAM when running if you have a lot of posts (seems to be around 5G for ~1.2 consuming process for `meilisearch`, and it will take a lot of RAM when running if you have a lot of posts (seems to be around 5G for ~1.2
million posts while idle and up to 7G while indexing initially, but your experience may be different). million posts while idle and up to 7G while indexing initially, but your experience may be different).

View File

@ -303,7 +303,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/users/:nickname_or_id` ## `GET /api/v1/pleroma/admin/users/:nickname_or_id`
### Retrive the details of a user ### Retrieve the details of a user
- Params: - Params:
- `nickname` or `id` - `nickname` or `id`
@ -313,7 +313,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses` ## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses`
### Retrive user's latest statuses ### Retrieve user's latest statuses
- Params: - Params:
- `nickname` or `id` - `nickname` or `id`
@ -337,7 +337,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/instances/:instance/statuses` ## `GET /api/v1/pleroma/admin/instances/:instance/statuses`
### Retrive instance's latest statuses ### Retrieve instance's latest statuses
- Params: - Params:
- `instance`: instance name - `instance`: instance name
@ -377,7 +377,7 @@ It may take some time.
## `GET /api/v1/pleroma/admin/statuses` ## `GET /api/v1/pleroma/admin/statuses`
### Retrives all latest statuses ### Retrieves all latest statuses
- Params: - Params:
- *optional* `page_size`: number of statuses to return (default is `20`) - *optional* `page_size`: number of statuses to return (default is `20`)
@ -541,7 +541,7 @@ Response:
## `PATCH /api/v1/pleroma/admin/users/force_password_reset` ## `PATCH /api/v1/pleroma/admin/users/force_password_reset`
### Force passord reset for a user with a given nickname ### Force password reset for a user with a given nickname
- Params: - Params:
- `nicknames` - `nicknames`

View File

@ -382,7 +382,7 @@ Pleroma Conversations have the same general structure that Mastodon Conversation
Conversations have the additional field `recipients` under the `pleroma` key. This holds a list of all the accounts that will receive a message in this conversation. Conversations have the additional field `recipients` under the `pleroma` key. This holds a list of all the accounts that will receive a message in this conversation.
The status posting endpoint takes an additional parameter, `in_reply_to_conversation_id`, which, when set, will set the visiblity to direct and address only the people who are the recipients of that Conversation. The status posting endpoint takes an additional parameter, `in_reply_to_conversation_id`, which, when set, will set the visibility to direct and address only the people who are the recipients of that Conversation.
⚠ Conversation IDs can be found in direct messages with the `pleroma.direct_conversation_id` key, do not confuse it with `pleroma.conversation_id`. ⚠ Conversation IDs can be found in direct messages with the `pleroma.direct_conversation_id` key, do not confuse it with `pleroma.conversation_id`.

View File

@ -20,16 +20,16 @@ Content-Type: multipart/form-data
Parameters: Parameters:
- (required) `file`: The file being uploaded - (required) `file`: The file being uploaded
- (optionnal) `description`: A plain-text description of the media, for accessibility purposes. - (optional) `description`: A plain-text description of the media, for accessibility purposes.
Response: HTTP 201 Created with the object into the body, no `Location` header provided as it doesn't have an `id` Response: HTTP 201 Created with the object into the body, no `Location` header provided as it doesn't have an `id`
The object given in the reponse should then be inserted into an Object's `attachment` field. The object given in the response should then be inserted into an Object's `attachment` field.
## ChatMessages ## ChatMessages
`ChatMessage`s are the messages sent in 1-on-1 chats. They are similar to `ChatMessage`s are the messages sent in 1-on-1 chats. They are similar to
`Note`s, but the addresing is done by having a single AP actor in the `to` `Note`s, but the addressing is done by having a single AP actor in the `to`
field. Addressing multiple actors is not allowed. These messages are always field. Addressing multiple actors is not allowed. These messages are always
private, there is no public version of them. They are created with a `Create` private, there is no public version of them. They are created with a `Create`
activity. activity.

View File

@ -15,7 +15,7 @@ Pleroma requires some adjustments from the defaults for running the instance loc
2. Change the dev.secret.exs 2. Change the dev.secret.exs
* Change the scheme in `config :pleroma, Pleroma.Web.Endpoint` to http (see examples below) * Change the scheme in `config :pleroma, Pleroma.Web.Endpoint` to http (see examples below)
* If you want to change other settings, you can do that too * If you want to change other settings, you can do that too
3. You can now start the server `mix phx.server`. Once it's build and started, you can access the instance on `http://<host>:<port>` (e.g.http://localhost:4000 ) and should be able to do everything locally you normaly can. 3. You can now start the server `mix phx.server`. Once it's build and started, you can access the instance on `http://<host>:<port>` (e.g.http://localhost:4000 ) and should be able to do everything locally you normally can.
Example config to change the scheme to http. Change the port if you want to run on another port. Example config to change the scheme to http. Change the port if you want to run on another port.
```elixir ```elixir

View File

@ -59,7 +59,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
If you would not like to install the optional packages, remove them from this line. If you would not like to install the optional packages, remove them from this line.
If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, strech a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do. If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, stretch a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do.
### Install PostgreSQL ### Install PostgreSQL
@ -104,7 +104,7 @@ Not only does this make it much easier to deploy changes you make, as you can co
* Add a new system user for the Pleroma service and set up default directories: * Add a new system user for the Pleroma service and set up default directories:
Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `pleroma` user will make finishing the insallation and common maintenence tasks somewhat easier: Remove `,wheel` if you do not want this user to be able to use `sudo`, however note that being able to `sudo` as the `pleroma` user will make finishing the installation and common maintenance tasks somewhat easier:
```shell ```shell
# useradd -m -G users,wheel -s /bin/bash pleroma # useradd -m -G users,wheel -s /bin/bash pleroma

View File

@ -49,7 +49,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
If you would not like to install the optional packages, remove them from this line. If you would not like to install the optional packages, remove them from this line.
If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, strech a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do. If you're running this from a low-powered virtual machine, it should work though it will take some time. There were no issues on a VPS with a single core and 1GB of RAM; if you are using an even more limited device and run into issues, you can try creating a swapfile or use a more powerful machine running Gentoo to [cross build](https://wiki.gentoo.org/wiki/Cross_build_environment). If you have a wait ahead of you, now would be a good time to take a break, stretch a bit, refresh your beverage of choice and/or get a snack, and reply to Arch users' posts with "I use Gentoo btw" as we do.
### Setup PostgreSQL ### Setup PostgreSQL

View File

@ -62,7 +62,7 @@ rcctl start postgresql
To check that it started properly and didn't fail right after starting, you can run `ps aux | grep postgres`, there should be multiple lines of output. To check that it started properly and didn't fail right after starting, you can run `ps aux | grep postgres`, there should be multiple lines of output.
#### httpd #### httpd
httpd will have three fuctions: httpd will have three functions:
* redirect requests trying to reach the instance over http to the https URL * redirect requests trying to reach the instance over http to the https URL
* serve a robots.txt file * serve a robots.txt file
@ -225,7 +225,7 @@ pass in quick on $if inet6 proto icmp6 to ($if) icmp6-type { echoreq unreach par
pass in quick on $if proto tcp to ($if) port { http https } # relayd/httpd pass in quick on $if proto tcp to ($if) port { http https } # relayd/httpd
pass in quick on $if proto tcp from $authorized_ssh_clients to ($if) port ssh pass in quick on $if proto tcp from $authorized_ssh_clients to ($if) port ssh
``` ```
Replace *<network interface\>* by your server's network interface name (which you can get with ifconfig). Consider replacing the content of the authorized\_ssh\_clients macro by, for exemple, your home IP address, to avoid SSH connection attempts from bots. Replace *<network interface\>* by your server's network interface name (which you can get with ifconfig). Consider replacing the content of the authorized\_ssh\_clients macro by, for example, your home IP address, to avoid SSH connection attempts from bots.
Check pf's configuration by running `pfctl -nf /etc/pf.conf`, load it with `pfctl -f /etc/pf.conf` and enable pf at boot with `rcctl enable pf`. Check pf's configuration by running `pfctl -nf /etc/pf.conf`, load it with `pfctl -f /etc/pf.conf` and enable pf at boot with `rcctl enable pf`.

View File

@ -238,7 +238,7 @@ At this point if you open your (sub)domain in a browser you should see a 502 err
systemctl enable pleroma systemctl enable pleroma
``` ```
If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors. If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errors.
Questions about the installation or didnt it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma-support/issues/new). Questions about the installation or didnt it work as it should be, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC, you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma-support/issues/new).

View File

@ -204,7 +204,7 @@
]} ]}
]}, ]},
%% Following HTTP API is deprected, the new one abouve should be used instead %% Following HTTP API is deprecated, the new one above should be used instead
{ {5288, "127.0.0.1"} , ejabberd_cowboy, [ { {5288, "127.0.0.1"} , ejabberd_cowboy, [
{num_acceptors, 10}, {num_acceptors, 10},
@ -824,7 +824,7 @@
%% Enable archivization for private messages (default) %% Enable archivization for private messages (default)
% {pm, [ % {pm, [
%% Top-level options can be overriden here if needed, for example: %% Top-level options can be overridden here if needed, for example:
% {async_writer, false} % {async_writer, false}
% ]}, % ]},
@ -834,7 +834,7 @@
%% %%
% {muc, [ % {muc, [
% {host, "muc.@HOST@"} % {host, "muc.@HOST@"}
%% As with pm, top-level options can be overriden for MUC archive %% As with pm, top-level options can be overridden for MUC archive
% ]}, % ]},
% %
%% Do not use a <stanza-id/> element (by default stanzaid is used) %% Do not use a <stanza-id/> element (by default stanzaid is used)

View File

@ -193,7 +193,7 @@ defmodule Mix.Tasks.Pleroma.Database do
"ALTER DATABASE #{db} SET default_text_search_config = '#{tsconfig}';" "ALTER DATABASE #{db} SET default_text_search_config = '#{tsconfig}';"
) )
# non-exist config will not raise excpetion but only give >0 messages # non-exist config will not raise exception but only give >0 messages
if length(msg) > 0 do if length(msg) > 0 do
shell_info("Error: #{inspect(msg, pretty: true)}") shell_info("Error: #{inspect(msg, pretty: true)}")
else else

View File

@ -30,7 +30,7 @@ defmodule Mix.Tasks.Pleroma.Digest do
shell_info("Digest email have been sent to #{nickname} (#{user.email})") shell_info("Digest email have been sent to #{nickname} (#{user.email})")
else else
_ -> _ ->
shell_info("Cound't find any mentions for #{nickname} since #{last_digest_emailed_at}") shell_info("Couldn't find any mentions for #{nickname} since #{last_digest_emailed_at}")
end end
end end
end end

View File

@ -61,7 +61,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
Logger.configure(level: :info) Logger.configure(level: :info)
if opts[:env] == "test" do if opts[:env] == "test" do
Logger.info("Rollback succesfully") Logger.info("Rollback successfully")
else else
{:ok, _, _} = {:ok, _, _} =
Ecto.Migrator.with_repo(Pleroma.Repo, &Ecto.Migrator.run(&1, path, :down, opts)) Ecto.Migrator.with_repo(Pleroma.Repo, &Ecto.Migrator.run(&1, path, :down, opts))

View File

@ -292,7 +292,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
if db_configurable? do if db_configurable? do
shell_info( shell_info(
" Please transfer your config to the database after running database migrations. Refer to \"Transfering the config to/from the database\" section of the docs for more information." " Please transfer your config to the database after running database migrations. Refer to \"Transferring the config to/from the database\" section of the docs for more information."
) )
end end
else else

View File

@ -29,7 +29,7 @@ defmodule Pleroma.Captcha.Kocaptcha do
@impl Service @impl Service
def validate(_token, captcha, answer_data) do def validate(_token, captcha, answer_data) do
# Here the token is unsed, because the unencrypted captcha answer is just passed to method # Here the token is unused, because the unencrypted captcha answer is just passed to method
if not is_nil(captcha) and if not is_nil(captcha) and
:crypto.hash(:md5, captcha) |> Base.encode16() == String.upcase(answer_data), :crypto.hash(:md5, captcha) |> Base.encode16() == String.upcase(answer_data),
do: :ok, do: :ok,

View File

@ -172,7 +172,7 @@ defmodule Pleroma.Config.DeprecationWarnings do
``` ```
config :pleroma, :mrf, config :pleroma, :mrf,
transparency_exclusions: [{"instance.tld", "Reason to exlude transparency"}] transparency_exclusions: [{"instance.tld", "Reason to exclude transparency"}]
``` ```
""") """)
@ -213,7 +213,7 @@ defmodule Pleroma.Config.DeprecationWarnings do
check_gun_pool_options(), check_gun_pool_options(),
check_activity_expiration_config(), check_activity_expiration_config(),
check_remote_ip_plug_name(), check_remote_ip_plug_name(),
check_uploders_s3_public_endpoint(), check_uploaders_s3_public_endpoint(),
check_old_chat_shoutbox(), check_old_chat_shoutbox(),
check_quarantined_instances_tuples(), check_quarantined_instances_tuples(),
check_transparency_exclusions_tuples(), check_transparency_exclusions_tuples(),
@ -372,8 +372,8 @@ defmodule Pleroma.Config.DeprecationWarnings do
) )
end end
@spec check_uploders_s3_public_endpoint() :: :ok | nil @spec check_uploaders_s3_public_endpoint() :: :ok | nil
def check_uploders_s3_public_endpoint do def check_uploaders_s3_public_endpoint do
s3_config = Pleroma.Config.get([Pleroma.Uploaders.S3]) s3_config = Pleroma.Config.get([Pleroma.Uploaders.S3])
use_old_config = Keyword.has_key?(s3_config, :public_endpoint) use_old_config = Keyword.has_key?(s3_config, :public_endpoint)

View File

@ -15,7 +15,7 @@ defmodule Pleroma.Docs.Generator do
:code.all_loaded() :code.all_loaded()
|> Enum.filter(fn {module, _} -> |> Enum.filter(fn {module, _} ->
# This shouldn't be needed as all modules are expected to have module_info/1, # This shouldn't be needed as all modules are expected to have module_info/1,
# but in test enviroments some transient modules `:elixir_compiler_XX` # but in test environments some transient modules `:elixir_compiler_XX`
# are loaded for some reason (where XX is a random integer). # are loaded for some reason (where XX is a random integer).
Code.ensure_loaded(module) Code.ensure_loaded(module)

View File

@ -17,7 +17,7 @@ defmodule Pleroma.Search.SearchBackend do
Remove the object from the index. Remove the object from the index.
Just the object, as opposed to the whole activity, is passed, since the object Just the object, as opposed to the whole activity, is passed, since the object
is what contains the actual content and there is no need for fitlering when removing is what contains the actual content and there is no need for filtering when removing
from index. from index.
""" """
@callback remove_from_index(object :: Pleroma.Object.t()) :: {:ok, any()} | {:error, any()} @callback remove_from_index(object :: Pleroma.Object.t()) :: {:ok, any()} | {:error, any()}

View File

@ -22,7 +22,7 @@ defmodule Pleroma.User.Query do
- pass non empty string - pass non empty string
- e.g. Pleroma.User.Query.build(%{email: "email@example.com"}) - e.g. Pleroma.User.Query.build(%{email: "email@example.com"})
- *contains criteria* - *contains criteria*
- add field to @containns_criteria list - add field to @contains_criteria list
- pass values list - pass values list
- e.g. Pleroma.User.Query.build(%{ap_id: ["http://ap_id1", "http://ap_id2"]}) - e.g. Pleroma.User.Query.build(%{ap_id: ["http://ap_id1", "http://ap_id2"]})
""" """

View File

@ -9,7 +9,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.HashtagPolicy do
alias Pleroma.Object alias Pleroma.Object
@moduledoc """ @moduledoc """
Reject, TWKN-remove or Set-Sensitive messsages with specific hashtags (without the leading #) Reject, TWKN-remove or Set-Sensitive messages with specific hashtags (without the leading #)
Note: This MRF Policy is always enabled, if you want to disable it you have to set empty lists. Note: This MRF Policy is always enabled, if you want to disable it you have to set empty lists.
""" """

View File

@ -43,7 +43,7 @@ defmodule Pleroma.Web.ApiSpec do
- [Mastodon API documentation](https://docs.joinmastodon.org/client/intro/) - [Mastodon API documentation](https://docs.joinmastodon.org/client/intro/)
- [Differences in Mastodon API responses from vanilla Mastodon](https://docs-develop.pleroma.social/backend/development/API/differences_in_mastoapi_responses/) - [Differences in Mastodon API responses from vanilla Mastodon](https://docs-develop.pleroma.social/backend/development/API/differences_in_mastoapi_responses/)
Please report such occurences on our [issue tracker](https://git.pleroma.social/pleroma/pleroma/-/issues). Feel free to submit API questions or proposals there too! Please report such occurrences on our [issue tracker](https://git.pleroma.social/pleroma/pleroma/-/issues). Feel free to submit API questions or proposals there too!
""", """,
# Strip environment from the version # Strip environment from the version
version: Application.spec(:pleroma, :vsn) |> to_string() |> String.replace(~r/\+.*$/, ""), version: Application.spec(:pleroma, :vsn) |> to_string() |> String.replace(~r/\+.*$/, ""),
@ -94,14 +94,14 @@ defmodule Pleroma.Web.ApiSpec do
"tags" => [ "tags" => [
"Chat administration", "Chat administration",
"Emoji pack administration", "Emoji pack administration",
"Frontend managment", "Frontend management",
"Instance configuration", "Instance configuration",
"Instance documents", "Instance documents",
"Invites", "Invites",
"MediaProxy cache", "MediaProxy cache",
"OAuth application managment", "OAuth application management",
"Relays", "Relays",
"Report managment", "Report management",
"Status administration", "Status administration",
"User administration", "User administration",
"Announcement management" "Announcement management"

View File

@ -347,7 +347,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
summary: "Endorse", summary: "Endorse",
operationId: "AccountController.endorse", operationId: "AccountController.endorse",
security: [%{"oAuth" => ["follow", "write:accounts"]}], security: [%{"oAuth" => ["follow", "write:accounts"]}],
description: "Addds the given account to endorsed accounts list.", description: "Adds the given account to endorsed accounts list.",
parameters: [%Reference{"$ref": "#/components/parameters/accountIdOrNickname"}], parameters: [%Reference{"$ref": "#/components/parameters/accountIdOrNickname"}],
responses: %{ responses: %{
200 => Operation.response("Relationship", "application/json", AccountRelationship), 200 => Operation.response("Relationship", "application/json", AccountRelationship),

View File

@ -16,7 +16,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.FrontendOperation do
def index_operation do def index_operation do
%Operation{ %Operation{
tags: ["Frontend managment"], tags: ["Frontend management"],
summary: "Retrieve a list of available frontends", summary: "Retrieve a list of available frontends",
operationId: "AdminAPI.FrontendController.index", operationId: "AdminAPI.FrontendController.index",
security: [%{"oAuth" => ["admin:read"]}], security: [%{"oAuth" => ["admin:read"]}],
@ -29,7 +29,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.FrontendOperation do
def install_operation do def install_operation do
%Operation{ %Operation{
tags: ["Frontend managment"], tags: ["Frontend management"],
summary: "Install a frontend", summary: "Install a frontend",
operationId: "AdminAPI.FrontendController.install", operationId: "AdminAPI.FrontendController.install",
security: [%{"oAuth" => ["admin:read"]}], security: [%{"oAuth" => ["admin:read"]}],

View File

@ -17,7 +17,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
def index_operation do def index_operation do
%Operation{ %Operation{
summary: "Retrieve a list of OAuth applications", summary: "Retrieve a list of OAuth applications",
tags: ["OAuth application managment"], tags: ["OAuth application management"],
operationId: "AdminAPI.OAuthAppController.index", operationId: "AdminAPI.OAuthAppController.index",
security: [%{"oAuth" => ["admin:write"]}], security: [%{"oAuth" => ["admin:write"]}],
parameters: [ parameters: [
@ -69,7 +69,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
def create_operation do def create_operation do
%Operation{ %Operation{
tags: ["OAuth application managment"], tags: ["OAuth application management"],
summary: "Create an OAuth application", summary: "Create an OAuth application",
operationId: "AdminAPI.OAuthAppController.create", operationId: "AdminAPI.OAuthAppController.create",
requestBody: request_body("Parameters", create_request()), requestBody: request_body("Parameters", create_request()),
@ -84,7 +84,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
def update_operation do def update_operation do
%Operation{ %Operation{
tags: ["OAuth application managment"], tags: ["OAuth application management"],
summary: "Update OAuth application", summary: "Update OAuth application",
operationId: "AdminAPI.OAuthAppController.update", operationId: "AdminAPI.OAuthAppController.update",
parameters: [id_param() | admin_api_params()], parameters: [id_param() | admin_api_params()],
@ -102,7 +102,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
def delete_operation do def delete_operation do
%Operation{ %Operation{
tags: ["OAuth application managment"], tags: ["OAuth application management"],
summary: "Delete OAuth application", summary: "Delete OAuth application",
operationId: "AdminAPI.OAuthAppController.delete", operationId: "AdminAPI.OAuthAppController.delete",
parameters: [id_param() | admin_api_params()], parameters: [id_param() | admin_api_params()],

View File

@ -19,7 +19,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
def index_operation do def index_operation do
%Operation{ %Operation{
tags: ["Report managment"], tags: ["Report management"],
summary: "Retrieve a list of reports", summary: "Retrieve a list of reports",
operationId: "AdminAPI.ReportController.index", operationId: "AdminAPI.ReportController.index",
security: [%{"oAuth" => ["admin:read:reports"]}], security: [%{"oAuth" => ["admin:read:reports"]}],
@ -69,7 +69,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
def show_operation do def show_operation do
%Operation{ %Operation{
tags: ["Report managment"], tags: ["Report management"],
summary: "Retrieve a report", summary: "Retrieve a report",
operationId: "AdminAPI.ReportController.show", operationId: "AdminAPI.ReportController.show",
parameters: [id_param() | admin_api_params()], parameters: [id_param() | admin_api_params()],
@ -83,7 +83,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
def update_operation do def update_operation do
%Operation{ %Operation{
tags: ["Report managment"], tags: ["Report management"],
summary: "Change state of specified reports", summary: "Change state of specified reports",
operationId: "AdminAPI.ReportController.update", operationId: "AdminAPI.ReportController.update",
security: [%{"oAuth" => ["admin:write:reports"]}], security: [%{"oAuth" => ["admin:write:reports"]}],
@ -99,7 +99,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
def notes_create_operation do def notes_create_operation do
%Operation{ %Operation{
tags: ["Report managment"], tags: ["Report management"],
summary: "Add a note to the report", summary: "Add a note to the report",
operationId: "AdminAPI.ReportController.notes_create", operationId: "AdminAPI.ReportController.notes_create",
parameters: [id_param() | admin_api_params()], parameters: [id_param() | admin_api_params()],
@ -120,7 +120,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
def notes_delete_operation do def notes_delete_operation do
%Operation{ %Operation{
tags: ["Report managment"], tags: ["Report management"],
summary: "Delete note attached to the report", summary: "Delete note attached to the report",
operationId: "AdminAPI.ReportController.notes_delete", operationId: "AdminAPI.ReportController.notes_delete",
parameters: [ parameters: [

View File

@ -101,7 +101,7 @@ defmodule Pleroma.Web.ApiSpec.InstanceOperation do
languages: %Schema{ languages: %Schema{
type: :array, type: :array,
items: %Schema{type: :string}, items: %Schema{type: :string},
description: "Primary langauges of the website and its staff" description: "Primary languages of the website and its staff"
}, },
registrations: %Schema{type: :boolean, description: "Whether registrations are enabled"}, registrations: %Schema{type: :boolean, description: "Whether registrations are enabled"},
# Extra (not present in Mastodon): # Extra (not present in Mastodon):
@ -252,7 +252,7 @@ defmodule Pleroma.Web.ApiSpec.InstanceOperation do
languages: %Schema{ languages: %Schema{
type: :array, type: :array,
items: %Schema{type: :string}, items: %Schema{type: :string},
description: "Primary langauges of the website and its staff" description: "Primary languages of the website and its staff"
}, },
registrations: %Schema{ registrations: %Schema{
type: :object, type: :object,

View File

@ -23,7 +23,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaScrobbleOperation do
security: [%{"oAuth" => ["write"]}], security: [%{"oAuth" => ["write"]}],
operationId: "PleromaAPI.ScrobbleController.create", operationId: "PleromaAPI.ScrobbleController.create",
deprecated: true, deprecated: true,
requestBody: request_body("Parameters", create_request(), requried: true), requestBody: request_body("Parameters", create_request(), required: true),
responses: %{ responses: %{
200 => Operation.response("Scrobble", "application/json", scrobble()) 200 => Operation.response("Scrobble", "application/json", scrobble())
} }

View File

@ -534,7 +534,7 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do
format: :"date-time", format: :"date-time",
nullable: true, nullable: true,
description: description:
"ISO 8601 Datetime at which to schedule a status. Providing this paramter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future." "ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future."
}, },
language: %Schema{ language: %Schema{
type: :string, type: :string,
@ -546,7 +546,7 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do
allOf: [BooleanLike], allOf: [BooleanLike],
nullable: true, nullable: true,
description: description:
"If set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example" "If set to `true` the post won't be actually posted, but the status entity would still be rendered back. This could be useful for previewing rich text/custom emoji, for example"
}, },
content_type: %Schema{ content_type: %Schema{
type: :string, type: :string,

View File

@ -87,7 +87,7 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do
defp change_password_request do defp change_password_request do
%Schema{ %Schema{
title: "ChangePasswordRequest", title: "ChangePasswordRequest",
description: "POST body for changing the account's passowrd", description: "POST body for changing the account's password",
type: :object, type: :object,
required: [:password, :new_password, :new_password_confirmation], required: [:password, :new_password, :new_password_confirmation],
properties: %{ properties: %{
@ -136,12 +136,12 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do
} }
end end
def update_notificaton_settings_operation do def update_notification_settings_operation do
%Operation{ %Operation{
tags: ["Settings"], tags: ["Settings"],
summary: "Update Notification Settings", summary: "Update Notification Settings",
security: [%{"oAuth" => ["write:accounts"]}], security: [%{"oAuth" => ["write:accounts"]}],
operationId: "UtilController.update_notificaton_settings", operationId: "UtilController.update_notification_settings",
parameters: [ parameters: [
Operation.parameter( Operation.parameter(
:block_from_strangers, :block_from_strangers,

View File

@ -11,7 +11,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Attachment do
title: "Attachment", title: "Attachment",
description: "Represents a file or media attachment that can be added to a status.", description: "Represents a file or media attachment that can be added to a status.",
type: :object, type: :object,
requried: [:id, :url, :preview_url], required: [:id, :url, :preview_url],
properties: %{ properties: %{
id: %Schema{type: :string, description: "The ID of the attachment in the database."}, id: %Schema{type: :string, description: "The ID of the attachment in the database."},
url: %Schema{ url: %Schema{

View File

@ -235,7 +235,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
# So we first build the normal local changeset, then apply it to the # So we first build the normal local changeset, then apply it to the
# user data, but don't persist it. With this, we generate the object # user data, but don't persist it. With this, we generate the object
# data for our update activity. We feed this and the changeset as meta # data for our update activity. We feed this and the changeset as meta
# inforation into the pipeline, where they will be properly updated and # information into the pipeline, where they will be properly updated and
# federated. # federated.
with changeset <- User.update_changeset(user, user_params), with changeset <- User.update_changeset(user, user_params),
{:ok, unpersisted_user} <- Ecto.Changeset.apply_action(changeset, :update), {:ok, unpersisted_user} <- Ecto.Changeset.apply_action(changeset, :update),

View File

@ -310,7 +310,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do
after_token_exchange(conn, %{token: token}) after_token_exchange(conn, %{token: token})
else else
_error -> _error ->
handle_token_exchange_error(conn, :invalid_credentails) handle_token_exchange_error(conn, :invalid_credentials)
end end
end end

View File

@ -20,7 +20,7 @@ defmodule Pleroma.Web.Plugs.Cache do
- `ttl`: An expiration time (time-to-live). This value should be in milliseconds or `nil` to disable expiration. Defaults to `nil`. - `ttl`: An expiration time (time-to-live). This value should be in milliseconds or `nil` to disable expiration. Defaults to `nil`.
- `query_params`: Take URL query string into account (`true`), ignore it (`false`) or limit to specific params only (list). Defaults to `true`. - `query_params`: Take URL query string into account (`true`), ignore it (`false`) or limit to specific params only (list). Defaults to `true`.
- `tracking_fun`: A function that is called on successfull responses, no matter if the request is cached or not. It should accept a conn as the first argument and the value assigned to `tracking_fun_data` as the second. - `tracking_fun`: A function that is called on successful responses, no matter if the request is cached or not. It should accept a conn as the first argument and the value assigned to `tracking_fun_data` as the second.
Additionally, you can overwrite the TTL inside a controller action by assigning `cache_ttl` to the connection struct: Additionally, you can overwrite the TTL inside a controller action by assigning `cache_ttl` to the connection struct:

View File

@ -105,7 +105,7 @@ defmodule Pleroma.Web.Plugs.UploadedMedia do
end end
defp get_media(conn, unknown, _, _) do defp get_media(conn, unknown, _, _) do
Logger.error("#{__MODULE__}: Unknown get startegy: #{inspect(unknown)}") Logger.error("#{__MODULE__}: Unknown get strategy: #{inspect(unknown)}")
conn conn
|> send_resp(:internal_server_error, dgettext("errors", "Internal Error")) |> send_resp(:internal_server_error, dgettext("errors", "Internal Error"))

View File

@ -481,7 +481,7 @@ defmodule Pleroma.Web.Router do
post("/change_email", UtilController, :change_email) post("/change_email", UtilController, :change_email)
post("/change_password", UtilController, :change_password) post("/change_password", UtilController, :change_password)
post("/delete_account", UtilController, :delete_account) post("/delete_account", UtilController, :delete_account)
put("/notification_settings", UtilController, :update_notificaton_settings) put("/notification_settings", UtilController, :update_notification_settings)
post("/disable_account", UtilController, :disable_account) post("/disable_account", UtilController, :disable_account)
post("/move_account", UtilController, :move_account) post("/move_account", UtilController, :move_account)

View File

@ -396,7 +396,7 @@ defmodule Pleroma.Web.Streamer do
end end
end end
# In test environement, only return true if the registry is started. # In test environment, only return true if the registry is started.
# In benchmark environment, returns false. # In benchmark environment, returns false.
# In any other environment, always returns true. # In any other environment, always returns true.
cond do cond do

View File

@ -4,7 +4,7 @@
defmodule Pleroma.Web.TwitterAPI.PasswordController do defmodule Pleroma.Web.TwitterAPI.PasswordController do
@moduledoc """ @moduledoc """
The module containts functions for reset password. The module contains functions for password reset.
""" """
use Pleroma.Web, :controller use Pleroma.Web, :controller

View File

@ -35,7 +35,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
:change_email, :change_email,
:change_password, :change_password,
:delete_account, :delete_account,
:update_notificaton_settings, :update_notification_settings,
:disable_account, :disable_account,
:move_account, :move_account,
:add_alias, :add_alias,
@ -181,7 +181,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
json(conn, emoji) json(conn, emoji)
end end
def update_notificaton_settings(%{assigns: %{user: user}} = conn, params) do def update_notification_settings(%{assigns: %{user: user}} = conn, params) do
with {:ok, _} <- User.update_notification_settings(user, params) do with {:ok, _} <- User.update_notification_settings(user, params) do
json(conn, %{status: "success"}) json(conn, %{status: "success"})
end end

View File

@ -39,7 +39,7 @@ defmodule Mix.PleromaTest do
describe "get_option/3" do describe "get_option/3" do
test "get from options" do test "get from options" do
assert get_option([domain: "some-domain.com"], :domain, "Promt") == "some-domain.com" assert get_option([domain: "some-domain.com"], :domain, "Prompt") == "some-domain.com"
end end
test "get from prompt" do test "get from prompt" do

View File

@ -13,7 +13,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
assert capture_log(fn -> assert capture_log(fn ->
Mix.Tasks.Pleroma.Ecto.Rollback.run(["--env", "test"]) Mix.Tasks.Pleroma.Ecto.Rollback.run(["--env", "test"])
end) =~ "[info] Rollback succesfully" end) =~ "[info] Rollback successfully"
Logger.configure(level: level) Logger.configure(level: level)
end end

View File

@ -26,7 +26,7 @@ defmodule Mix.Tasks.Pleroma.RobotsTxtTest do
assert file == "User-Agent: *\nDisallow: /\n" assert file == "User-Agent: *\nDisallow: /\n"
end end
test "to existance folder" do test "to existing folder" do
path = "test/fixtures/" path = "test/fixtures/"
file_path = path <> "robots.txt" file_path = path <> "robots.txt"
clear_config([:instance, :static_dir], path) clear_config([:instance, :static_dir], path)

View File

@ -215,7 +215,7 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
``` ```
config :pleroma, :mrf, config :pleroma, :mrf,
transparency_exclusions: [{"instance.tld", "Reason to exlude transparency"}] transparency_exclusions: [{"instance.tld", "Reason to exclude transparency"}]
``` ```
""" """
end end
@ -327,11 +327,11 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
end) =~ "Your config is using old namespace for activity expiration configuration." end) =~ "Your config is using old namespace for activity expiration configuration."
end end
test "check_uploders_s3_public_endpoint/0" do test "check_uploaders_s3_public_endpoint/0" do
clear_config([Pleroma.Uploaders.S3], public_endpoint: "https://fake.amazonaws.com/bucket/") clear_config([Pleroma.Uploaders.S3], public_endpoint: "https://fake.amazonaws.com/bucket/")
assert capture_log(fn -> assert capture_log(fn ->
DeprecationWarnings.check_uploders_s3_public_endpoint() DeprecationWarnings.check_uploaders_s3_public_endpoint()
end) =~ end) =~
"Your config is using the old setting for controlling the URL of media uploaded to your S3 bucket." "Your config is using the old setting for controlling the URL of media uploaded to your S3 bucket."
end end

View File

@ -321,7 +321,7 @@ defmodule Pleroma.ConfigDBTest do
}) == {:proxy_url, {:socks5, {127, 0, 0, 1}, 1234}} }) == {:proxy_url, {:socks5, {127, 0, 0, 1}, 1234}}
end end
test "tuple with n childs" do test "tuple with n children" do
assert ConfigDB.to_elixir_types(%{ assert ConfigDB.to_elixir_types(%{
"tuple" => [ "tuple" => [
"v1", "v1",
@ -399,7 +399,7 @@ defmodule Pleroma.ConfigDBTest do
assert ConfigDB.to_elixir_types(a: 1, b: 2, c: "string") == [a: 1, b: 2, c: "string"] assert ConfigDB.to_elixir_types(a: 1, b: 2, c: "string") == [a: 1, b: 2, c: "string"]
end end
test "complex keyword with nested mixed childs" do test "complex keyword with nested mixed children" do
assert ConfigDB.to_elixir_types([ assert ConfigDB.to_elixir_types([
%{"tuple" => [":uploader", "Pleroma.Uploaders.Local"]}, %{"tuple" => [":uploader", "Pleroma.Uploaders.Local"]},
%{"tuple" => [":filters", ["Pleroma.Upload.Filter.Dedupe"]]}, %{"tuple" => [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},

View File

@ -57,7 +57,7 @@ defmodule Pleroma.Conversation.ParticipationTest do
assert Participation.unread_count(other_user) == 0 assert Participation.unread_count(other_user) == 0
end end
test "for a new conversation, it sets the recipents of the participation" do test "for a new conversation, it sets the recipients of the participation" do
user = insert(:user) user = insert(:user)
other_user = insert(:user) other_user = insert(:user)
third_user = insert(:user) third_user = insert(:user)

View File

@ -72,7 +72,7 @@ defmodule Pleroma.Emoji.LoaderTest do
assert group == "special file" assert group == "special file"
end end
test "no mathing returns nil", %{groups: groups} do test "no matching returns nil", %{groups: groups} do
group = group =
groups groups
|> Loader.match_extra("/emoji/some_undefined.png") |> Loader.match_extra("/emoji/some_undefined.png")

View File

@ -324,7 +324,7 @@ defmodule Pleroma.FormatterTest do
assert {_text, [], ^expected_tags} = Formatter.linkify(text) assert {_text, [], ^expected_tags} = Formatter.linkify(text)
end end
test "parses mulitple tags in html" do test "parses multiple tags in html" do
text = "<p>#tag1 #tag2 #tag3 #tag4</p>" text = "<p>#tag1 #tag2 #tag3 #tag4</p>"
expected_tags = [ expected_tags = [
@ -347,7 +347,7 @@ defmodule Pleroma.FormatterTest do
assert {_text, [], ^expected_tags} = Formatter.linkify(text) assert {_text, [], ^expected_tags} = Formatter.linkify(text)
end end
test "parses mulitple tags on mulitple lines in html" do test "parses multiple tags on multiple lines in html" do
text = text =
"<p>testing...</p><p>#tag1 #tag2 #tag3 #tag4</p><p>paragraph</p><p>#tag5 #tag6 #tag7 #tag8</p>" "<p>testing...</p><p>#tag1 #tag2 #tag3 #tag4</p><p>paragraph</p><p>#tag5 #tag6 #tag7 #tag8</p>"

View File

@ -25,7 +25,7 @@ defmodule Pleroma.HealthcheckTest do
refute result.healthy refute result.healthy
end end
test "chech_health/1" do test "check_health/1" do
result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 9}) result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 9})
assert result.healthy assert result.healthy
end end

View File

@ -36,7 +36,7 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
assert opts[:certificates_verification] assert opts[:certificates_verification]
end end
test "https url with non standart port" do test "https url with non-standard port" do
uri = URI.parse("https://example.com:115") uri = URI.parse("https://example.com:115")
opts = Gun.options([receive_conn: false], uri) opts = Gun.options([receive_conn: false], uri)
@ -44,7 +44,7 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
assert opts[:certificates_verification] assert opts[:certificates_verification]
end end
test "merges with defaul http adapter config" do test "merges with default http adapter config" do
defaults = Gun.options([receive_conn: false], URI.parse("https://example.com")) defaults = Gun.options([receive_conn: false], URI.parse("https://example.com"))
assert Keyword.has_key?(defaults, :a) assert Keyword.has_key?(defaults, :a)
assert Keyword.has_key?(defaults, :b) assert Keyword.has_key?(defaults, :b)

View File

@ -28,7 +28,7 @@ defmodule Pleroma.OTPVersionTest do
"23.0" "23.0"
end end
test "with non existance file" do test "with nonexistent file" do
assert OTPVersion.get_version_from_files([ assert OTPVersion.get_version_from_files([
"test/fixtures/warnings/otp_version/non-exising", "test/fixtures/warnings/otp_version/non-exising",
"test/fixtures/warnings/otp_version/22.4" "test/fixtures/warnings/otp_version/22.4"

View File

@ -306,7 +306,7 @@ defmodule Pleroma.ReverseProxyTest do
end end
describe "response content disposition header" do describe "response content disposition header" do
test "not atachment", %{conn: conn} do test "not attachment", %{conn: conn} do
disposition_headers_mock([ disposition_headers_mock([
{"content-type", "image/gif"}, {"content-type", "image/gif"},
{"content-length", "0"} {"content-length", "0"}

View File

@ -226,7 +226,7 @@ defmodule Pleroma.UserTest do
assert [] = User.get_follow_requests(followed) assert [] = User.get_follow_requests(followed)
end end
test "follow_all follows mutliple users" do test "follow_all follows multiple users" do
user = insert(:user) user = insert(:user)
followed_zero = insert(:user) followed_zero = insert(:user)
followed_one = insert(:user) followed_one = insert(:user)
@ -250,7 +250,7 @@ defmodule Pleroma.UserTest do
refute User.following?(user, reverse_blocked) refute User.following?(user, reverse_blocked)
end end
test "follow_all follows mutliple users without duplicating" do test "follow_all follows multiple users without duplicating" do
user = insert(:user) user = insert(:user)
followed_zero = insert(:user) followed_zero = insert(:user)
followed_one = insert(:user) followed_one = insert(:user)
@ -873,7 +873,7 @@ defmodule Pleroma.UserTest do
end end
end end
describe "get_or_fetch/1 remote users with tld, while BE is runned on subdomain" do describe "get_or_fetch/1 remote users with tld, while BE is running on a subdomain" do
setup do: clear_config([Pleroma.Web.WebFinger, :update_nickname_on_user_fetch], true) setup do: clear_config([Pleroma.Web.WebFinger, :update_nickname_on_user_fetch], true)
test "for mastodon" do test "for mastodon" do
@ -1018,13 +1018,13 @@ defmodule Pleroma.UserTest do
@tag capture_log: true @tag capture_log: true
test "returns nil if no user could be fetched" do test "returns nil if no user could be fetched" do
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant@social.heldscal.la") {:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistent@social.heldscal.la")
assert fetched_user == "not found nonexistant@social.heldscal.la" assert fetched_user == "not found nonexistent@social.heldscal.la"
end end
test "returns nil for nonexistant local user" do test "returns nil for nonexistent local user" do
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant") {:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistent")
assert fetched_user == "not found nonexistant" assert fetched_user == "not found nonexistent"
end end
test "updates an existing user, if stale" do test "updates an existing user, if stale" do
@ -1132,7 +1132,7 @@ defmodule Pleroma.UserTest do
assert cs.valid? assert cs.valid?
end end
test "it sets the follower_adress" do test "it sets the follower_address" do
cs = User.remote_user_changeset(@valid_remote) cs = User.remote_user_changeset(@valid_remote)
# remote users get a fake local follower address # remote users get a fake local follower address
assert cs.changes.follower_address == assert cs.changes.follower_address ==

View File

@ -1028,7 +1028,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
refute repeat_activity in activities refute repeat_activity in activities
end end
test "see your own posts even when they adress actors from blocked domains" do test "see your own posts even when they address actors from blocked domains" do
user = insert(:user) user = insert(:user)
domain = "dogwhistle.zone" domain = "dogwhistle.zone"

View File

@ -24,7 +24,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.EnsureRePrependedTest do
assert res["object"]["summary"] == "re: object-summary" assert res["object"]["summary"] == "re: object-summary"
end end
test "it adds `re:` to summary object when child summary containts re-subject of parent summary " do test "it adds `re:` to summary object when child summary contains re-subject of parent summary " do
message = %{ message = %{
"type" => "Create", "type" => "Create",
"object" => %{ "object" => %{

View File

@ -164,7 +164,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
assert attachment.mediaType == "image/jpeg" assert attachment.mediaType == "image/jpeg"
end end
test "it transforms image dimentions to our internal format" do test "it transforms image dimensions to our internal format" do
attachment = %{ attachment = %{
"type" => "Document", "type" => "Document",
"name" => "Hello world", "name" => "Hello world",

View File

@ -508,7 +508,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.NoteHandlingTest do
[data: data] [data: data]
end end
test "returns not modified object when hasn't containts inReplyTo field", %{data: data} do test "returns not modified object when has no inReplyTo field", %{data: data} do
assert Transmogrifier.fix_in_reply_to(data) == data assert Transmogrifier.fix_in_reply_to(data) == data
end end

View File

@ -32,7 +32,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
assert activity.data["type"] == "Undo" assert activity.data["type"] == "Undo"
end end
test "it returns an error for incoming unlikes wihout a like activity" do test "it returns an error for incoming unlikes without a like activity" do
user = insert(:user) user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: "leave a like pls"}) {:ok, activity} = CommonAPI.post(user, %{status: "leave a like pls"})

View File

@ -17,7 +17,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
require Pleroma.Constants require Pleroma.Constants
describe "strip_report_status_data/1" do describe "strip_report_status_data/1" do
test "does not break on issues with the reported activites" do test "does not break on issues with the reported activities" do
reporter = insert(:user) reporter = insert(:user)
target_account = insert(:user) target_account = insert(:user)
{:ok, activity} = CommonAPI.post(target_account, %{status: "foobar"}) {:ok, activity} = CommonAPI.post(target_account, %{status: "foobar"})
@ -153,7 +153,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
assert Enum.sort(cc) == expected_cc assert Enum.sort(cc) == expected_cc
end end
test "does not adress actor's follower address if the activity is not public", %{ test "does not address actor's follower address if the activity is not public", %{
user: user, user: user,
other_user: other_user, other_user: other_user,
third_user: third_user third_user: third_user
@ -622,7 +622,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
end end
describe "get_cached_emoji_reactions/1" do describe "get_cached_emoji_reactions/1" do
test "returns the normalized data or an emtpy list" do test "returns the normalized data or an empty list" do
object = insert(:note) object = insert(:note)
assert Utils.get_cached_emoji_reactions(object) == [] assert Utils.get_cached_emoji_reactions(object) == []

View File

@ -163,7 +163,7 @@ defmodule Pleroma.Web.AdminAPI.OAuthAppControllerTest do
assert response == "" assert response == ""
end end
test "with non existance id", %{conn: conn} do test "with nonexistent id", %{conn: conn} do
response = response =
conn conn
|> delete("/api/pleroma/admin/oauth_app/0") |> delete("/api/pleroma/admin/oauth_app/0")

View File

@ -1360,7 +1360,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert user.registration_reason == "I'm a cool dude, bro" assert user.registration_reason == "I'm a cool dude, bro"
end end
test "returns error when user already registred", %{conn: conn, valid_params: valid_params} do test "returns error when user already registered", %{conn: conn, valid_params: valid_params} do
_user = insert(:user, email: "lain@example.org") _user = insert(:user, email: "lain@example.org")
app_token = insert(:oauth_token, user: nil) app_token = insert(:oauth_token, user: nil)
@ -1495,7 +1495,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|> Plug.Conn.put_req_header("authorization", "Bearer " <> token) |> Plug.Conn.put_req_header("authorization", "Bearer " <> token)
|> put_req_header("content-type", "multipart/form-data") |> put_req_header("content-type", "multipart/form-data")
|> post("/api/v1/accounts", %{ |> post("/api/v1/accounts", %{
nickname: "nickanme", nickname: "nickname",
agreement: true, agreement: true,
email: "email@example.com", email: "email@example.com",
fullname: "Lain", fullname: "Lain",
@ -1781,7 +1781,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{language: "ru_RU"} = Pleroma.User.get_by_nickname("foo") assert %{language: "ru_RU"} = Pleroma.User.get_by_nickname("foo")
end end
test "createing an account without language parameter should fallback to cookie/header language", test "creating an account without language parameter should fallback to cookie/header language",
%{conn: conn} do %{conn: conn} do
params = %{ params = %{
username: "foo2", username: "foo2",

View File

@ -214,7 +214,7 @@ defmodule Pleroma.Web.OAuth.MFAControllerTest do
assert response == %{"error" => "Invalid code"} assert response == %{"error" => "Invalid code"}
end end
test "returns error when client credentails is wrong ", %{conn: conn, user: user} do test "returns error when client credentials is wrong ", %{conn: conn, user: user} do
otp_token = TOTP.generate_token(user.multi_factor_authentication_settings.totp.secret) otp_token = TOTP.generate_token(user.multi_factor_authentication_settings.totp.secret)
mfa_token = insert(:mfa_token, user: user) mfa_token = insert(:mfa_token, user: user)

View File

@ -13,7 +13,7 @@ defmodule Pleroma.Web.OAuth.Token.UtilsTest do
Utils.fetch_app(%Plug.Conn{params: %{"client_id" => 1, "client_secret" => "x"}}) Utils.fetch_app(%Plug.Conn{params: %{"client_id" => 1, "client_secret" => "x"}})
end end
test "returns App by params credentails" do test "returns App by params credentials" do
app = insert(:oauth_app) app = insert(:oauth_app)
assert {:ok, load_app} = assert {:ok, load_app} =
@ -24,7 +24,7 @@ defmodule Pleroma.Web.OAuth.Token.UtilsTest do
assert load_app == app assert load_app == app
end end
test "returns App by header credentails" do test "returns App by header credentials" do
app = insert(:oauth_app) app = insert(:oauth_app)
header = "Basic " <> Base.encode64("#{app.client_id}:#{app.client_secret}") header = "Basic " <> Base.encode64("#{app.client_id}:#{app.client_secret}")

View File

@ -16,7 +16,7 @@ defmodule Pleroma.Web.PleromaApi.InstancesControllerTest do
{:ok, %Pleroma.Instances.Instance{unreachable_since: constant_unreachable}} = {:ok, %Pleroma.Instances.Instance{unreachable_since: constant_unreachable}} =
Instances.set_consistently_unreachable(constant) Instances.set_consistently_unreachable(constant)
_eventual_unrechable = Instances.set_unreachable(eventual) _eventual_unreachable = Instances.set_unreachable(eventual)
%{constant_unreachable: constant_unreachable, constant: constant} %{constant_unreachable: constant_unreachable, constant: constant}
end end

View File

@ -48,7 +48,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
] ]
end end
test "reach user on tld, while pleroma is runned on subdomain" do test "reach user on tld, while pleroma is running on subdomain" do
Pleroma.Web.Endpoint.config_change( Pleroma.Web.Endpoint.config_change(
[{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}], [{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}],
[] []

View File

@ -178,7 +178,7 @@ defmodule HttpRequestMock do
end end
def get( def get(
"https://social.heldscal.la/.well-known/webfinger?resource=nonexistant@social.heldscal.la", "https://social.heldscal.la/.well-known/webfinger?resource=nonexistent@social.heldscal.la",
_, _,
_, _,
[{"accept", "application/xrd+xml,application/jrd+json"}] [{"accept", "application/xrd+xml,application/jrd+json"}]
@ -186,7 +186,7 @@ defmodule HttpRequestMock do
{:ok, {:ok,
%Tesla.Env{ %Tesla.Env{
status: 200, status: 200,
body: File.read!("test/fixtures/tesla_mock/nonexistant@social.heldscal.la.xml") body: File.read!("test/fixtures/tesla_mock/nonexistent@social.heldscal.la.xml")
}} }}
end end