Compare commits

...

37 commits

Author SHA1 Message Date
0af8e93135 bump version 2023-08-16 10:44:57 +01:00
98a64ab145 Mix format 2023-08-16 00:35:08 +01:00
94d1af2c4c Disallow nil hosts in should_federate 2023-08-16 00:34:59 +01:00
43c5fd5db0 bullseye build (you owe me for this one) 2023-08-08 22:43:24 +01:00
c887dd4f2e Merge branch 'develop' into stable 2023-08-06 15:13:13 +01:00
ba1ed37edf Merge branch 'develop' into stable 2023-08-05 14:12:59 +01:00
f1de9bd9ba Merge branch 'develop' into stable 2023-08-05 13:37:21 +01:00
a4bab7bdfa Merge branch 'develop' into stable 2023-08-05 13:36:43 +01:00
a7dbca885f Merge branch 'develop' into stable 2023-08-05 13:26:54 +01:00
9d7c877de0 Merge branch 'develop' into stable 2023-05-26 20:46:56 +01:00
39a878f530 Merge branch 'develop' into stable 2023-05-26 12:07:05 +01:00
dcee1b109b Merge branch 'develop' into stable 2023-05-26 12:05:11 +01:00
9a8373a3f5 Merge branch 'develop' into stable 2023-05-23 14:10:19 +01:00
ccae7ef824 Merge branch 'develop' into stable 2023-04-14 18:10:07 +01:00
8504878187 Merge branch 'develop' into stable 2023-04-14 18:09:32 +01:00
fef4bae006 Merge branch 'develop' into stable 2023-03-11 18:25:07 +00:00
86dcf273c5 Merge branch 'develop' into stable 2023-03-11 17:26:58 +00:00
36cb19dbf2 Merge branch 'develop' into stable 2023-02-15 22:13:30 +00:00
71d08991ea Merge branch 'develop' into stable 2023-02-11 11:19:42 +00:00
d756607112 Merge branch 'develop' into stable 2023-02-11 10:59:04 +00:00
367bc9c818 Merge branch 'develop' into stable 2023-02-11 10:57:01 +00:00
81caf77223 Merge branch 'develop' into stable 2023-02-11 10:49:01 +00:00
551f92dd50 Merge branch 'develop' into stable 2023-02-11 10:43:22 +00:00
d9508474b6 Merge pull request 'clean-up docs to avoid version-mismatches in BE and FE in new installs (for stable)' (#378) from stefan230/akkoma:stable into stable
Reviewed-on: AkkomaGang/akkoma#378
2022-12-19 10:59:34 +00:00
f676007b18 clean-up docs to avoid mismatches in BE and FE. Clearly state that stable-versions are installed 2022-12-16 17:23:31 +01:00
63f2d1cbef Merge branch 'develop' into stable 2022-12-10 14:50:35 +00:00
f91b896731 Merge branch 'develop' into stable 2022-11-12 15:34:19 +00:00
af90a4e51b Merge branch 'develop' into stable 2022-10-14 12:49:46 +01:00
5e7be063c7 Merge branch 'develop' into stable 2022-10-08 12:12:52 +01:00
a1317bf541 use on-release tag 2022-09-20 13:36:28 +01:00
a0dd670e68 ensure we use the same OTP for all releases 2022-09-20 13:34:50 +01:00
11d29d27b8 Ensure migrations succeed (#216)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/akkoma#216
2022-09-16 12:53:45 +01:00
44da806a77 Merge branch 'develop' into stable 2022-09-10 17:13:49 +01:00
d7c805b0bb Merge pull request '2022.09 stable' (#208) from develop into stable
Reviewed-on: AkkomaGang/akkoma#208
2022-09-10 16:06:18 +00:00
c52982e9c5 add finch outbound proxy support (#158)
Reviewed-on: AkkomaGang/akkoma#158
2022-08-24 16:03:17 +01:00
2e433e106f generate-keys-at-registration-time (#181)
Reviewed-on: AkkomaGang/akkoma#181
2022-08-24 15:39:30 +01:00
bfbe4e8dce Merge pull request 'stable release' (#160) from develop into stable
Reviewed-on: AkkomaGang/akkoma#160
2022-08-12 15:25:01 +00:00
6 changed files with 53 additions and 3 deletions

View file

@ -65,6 +65,32 @@ pipeline:
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-ubuntu-jammy.zip - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-ubuntu-jammy.zip
- /bin/sh /entrypoint.sh - /bin/sh /entrypoint.sh
debian-bullseye:
image: hexpm/elixir:1.15.4-erlang-25.3.2.5-debian-bullseye-20230612
<<: *on-release
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands:
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
- *clean
- echo "import Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64-debian-bullseye.zip -r release
release-debian-bullseye:
image: akkoma/releaser
<<: *on-release
secrets: *scw-secrets
commands:
- export SOURCE=akkoma-amd64-debian-bullseye.zip
# AMD64
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-debian-bullseye.zip
- /bin/sh /entrypoint.sh
# Canonical amd64-musl # Canonical amd64-musl
musl: musl:
image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.18.0 image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.18.0

View file

@ -4,6 +4,11 @@ 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
## Fixed
- Issue where a bad inbox URL could break federation
## 2023.08 ## 2023.08
## Added ## Added
@ -233,6 +238,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 2022.08 ## 2022.08
### Removed
- Non-finch HTTP adapters. `:tesla, :adapter` is now highly recommended to be set to the default.
## 2022.08
### Added ### Added
- extended runtime module support, see config cheatsheet - extended runtime module support, see config cheatsheet
- quote posting; quotes are limited to public posts - quote posting; quotes are limited to public posts

View file

@ -115,13 +115,18 @@ defp allowed_instances do
def should_federate?(url) do def should_federate?(url) do
%{host: host} = URI.parse(url) %{host: host} = URI.parse(url)
with allowed <- allowed_instances(), with {nil, false} <- {nil, is_nil(host)},
allowed <- allowed_instances(),
false <- Enum.empty?(allowed) do false <- Enum.empty?(allowed) do
allowed allowed
|> Pleroma.Web.ActivityPub.MRF.instance_list_from_tuples() |> Pleroma.Web.ActivityPub.MRF.instance_list_from_tuples()
|> Pleroma.Web.ActivityPub.MRF.subdomains_regex() |> Pleroma.Web.ActivityPub.MRF.subdomains_regex()
|> Pleroma.Web.ActivityPub.MRF.subdomain_match?(host) |> Pleroma.Web.ActivityPub.MRF.subdomain_match?(host)
else else
# oi!
{nil, true} ->
false
_ -> _ ->
quarantined_instances = quarantined_instances =
blocked_instances() blocked_instances()

View file

@ -34,7 +34,9 @@ def perform(%Plug.Conn{assigns: assigns} = conn, %{scopes: scopes} = options) do
permissions = Enum.join(missing_scopes, " #{op} ") permissions = Enum.join(missing_scopes, " #{op} ")
error_message = error_message =
dgettext("errors", "Insufficient permissions: %{permissions}.", permissions: permissions) dgettext("errors", "Insufficient permissions: %{permissions}.",
permissions: permissions
)
conn conn
|> put_resp_content_type("application/json") |> put_resp_content_type("application/json")

View file

@ -4,7 +4,7 @@ defmodule Pleroma.Mixfile do
def project do def project do
[ [
app: :pleroma, app: :pleroma,
version: version("3.10.3"), version: version("3.10.4"),
elixir: "~> 1.14", elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(), compilers: [:phoenix] ++ Mix.compilers(),

View file

@ -487,4 +487,11 @@ test "publish to url with with different ports" do
) )
end end
end end
describe "should_federate/1" do
test "should not obliterate itself if the inbox URL is bad" do
url = "/inbox"
refute Pleroma.Web.ActivityPub.Publisher.should_federate?(url)
end
end
end end