Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/composer/phpunit/phpunit-11.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
BentiGorlich authored Jan 20, 2025
2 parents 5336003 + 1ed1e53 commit 4464045
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A clear and concise description of what the bug is.
[domain.tld]

**Which Mbin version was running on the instance?**
[e.g. 1.4.0]
[e.g. 1.7.4]

**To Reproduce**
Steps to reproduce the behavior:
Expand Down
54 changes: 19 additions & 35 deletions docs/02-admin/02-configuration/02-nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,53 +92,37 @@ upstream mercure {
# Map instance requests vs the rest
map "$http_accept:$request" $instanceRequest {
~^.*:GET\ \/.well-known\/.+ 1;
~^.*:GET\ \/nodeinfo\/.+ 1;
~^.*:GET\ \/i\/actor 1;
~^.*:POST\ \/i\/inbox 1;
~^.*:POST\ \/i\/outbox 1;
~^.*:POST\ \/f\/inbox 1;
~^application\/activity\+json:GET\ \/ 1;
~^application\/ld\+json:GET\ \/ 1;
~^application\/json:GET\ \/ 1;
~^application\/activity\+json:GET\ \/f\/object\/.+ 1;
~^application\/ld\+json:GET\ \/f\/object\/.+ 1;
~^application\/json:GET\ \/f\/object\/.+ 1;
default 0;
~^.*:GET\ \/.well-known\/.+ 1;
~^.*:GET\ \/nodeinfo\/.+ 1;
~^.*:GET\ \/i\/actor 1;
~^.*:POST\ \/i\/inbox 1;
~^.*:POST\ \/i\/outbox 1;
~^.*:POST\ \/f\/inbox 1;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:GET\ \/ 1;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:GET\ \/f\/object\/.+ 1;
default 0;
}
# Map user requests vs the rest
map "$http_accept:$request" $userRequest {
~^application\/activity\+json:GET\ \/u\/.+ 1;
~^application\/ld\+json:GET\ \/u\/.+ 1;
~^application\/json:GET\ \/u\/.+ 1;
~^application\/activity\+json:POST\ \/u\/.+ 1;
~^application\/ld\+json:POST\ \/u\/.+ 1;
~^application\/json:POST\ \/u\/.+ 1;
default 0;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:GET\ \/u\/.+ 1;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:POST\ \/u\/.+ 1;
default 0;
}
# Map magazine requests vs the rest
map "$http_accept:$request" $magazineRequest {
~^application\/activity\+json:GET\ \/m\/.+ 1;
~^application\/ld\+json:GET\ \/m\/.+ 1;
~^application\/json:GET\ \/m\/.+ 1;
~^application\/activity\+json:POST\ \/m\/.+ 1;
~^application\/ld\+json:POST\ \/m\/.+ 1;
~^application\/json:POST\ \/m\/.+ 1;
default 0;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:GET\ \/m\/.+ 1;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:POST\ \/m\/.+ 1;
default 0;
}
# Miscellaneous requests
map "$http_accept:$request" $miscRequest {
~^application\/activity\+json:GET\ \/reports\/.+ 1;
~^application\/ld\+json:GET\ \/reports\/.+ 1;
~^application\/json:GET\ \/reports\/.+ 1;
~^application\/activity\+json:GET\ \/message\/.+ 1;
~^application\/ld\+json:GET\ \/message\/.+ 1;
~^application\/json:GET\ \/message\/.+ 1;
~^.*:GET\ \/contexts\..+ 1;
default 0;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:GET\ \/reports\/.+ 1;
~^(?:application\/activity\+json|application\/ld\+json|application\/json).*:GET\ \/message\/.+ 1;
~^.*:GET\ \/contexts\..+ 1;
default 0;
}
# Determine if a request should go into the regular log
Expand Down
40 changes: 32 additions & 8 deletions public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
# Using: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/robots.txt/robots.txt
### Version Information for nginx-ultimate-bad-bot-blocker #
###################################################
### Version: V4.2024.07.4631
### Updated: Thu Jul 18 22:01:11 UTC 2024
### Bad Bot Count: 663
### Version: V4.2025.01.4984
### Updated: Sun Jan 19 10:06:56 UTC 2025
### Bad Bot Count: 675
###################################################
### Version Information ##

User-agent: 01h4x.com
Disallow:/
User-agent: 360Spider
Expand Down Expand Up @@ -97,6 +95,8 @@ User-agent: Backlink-Ceck
Disallow:/
User-agent: BacklinkCrawler
Disallow:/
User-agent: BacklinksExtendedBot
Disallow:/
User-agent: Badass
Disallow:/
User-agent: Bandit
Expand Down Expand Up @@ -363,8 +363,6 @@ User-agent: Go-Ahead-Got-It
Disallow:/
User-agent: GoZilla
Disallow:/
User-agent: Google-Extended
Disallow:/
User-agent: Gotit
Disallow:/
User-agent: GrabNet
Expand Down Expand Up @@ -813,6 +811,8 @@ User-agent: SEOkicks
Disallow:/
User-agent: SEOkicks-Robot
Disallow:/
User-agent: SEOlyt
Disallow:/
User-agent: SEOlyticsCrawler
Disallow:/
User-agent: SEOprofiler
Expand Down Expand Up @@ -853,10 +853,22 @@ User-agent: Semrush
Disallow:/
User-agent: SemrushBot
Disallow:/
User-agent: SemrushBot-BA
Disallow:/
User-agent: SemrushBot-FT
Disallow:/
User-agent: SemrushBot-OCOB
Disallow:/
User-agent: SemrushBot-SI
Disallow:/
User-agent: SemrushBot-SWA
Disallow:/
User-agent: SentiBot
Disallow:/
User-agent: SenutoBot
Disallow:/
User-agent: SeoCherryBot
Disallow:/
User-agent: SeoSiteCheckup
Disallow:/
User-agent: SeobilityBot
Expand All @@ -867,6 +879,8 @@ User-agent: Shodan
Disallow:/
User-agent: Siphon
Disallow:/
User-agent: SiteAuditBot
Disallow:/
User-agent: SiteCheckerBotCrawler
Disallow:/
User-agent: SiteExplorer
Expand Down Expand Up @@ -915,8 +929,14 @@ User-agent: Spanner
Disallow:/
User-agent: Spbot
Disallow:/
User-agent: Spider_Bot
Disallow:/
User-agent: Spider_Bot/3.0
Disallow:/
User-agent: Spinn3r
Disallow:/
User-agent: SplitSignalBot
Disallow:/
User-agent: SputnikBot
Disallow:/
User-agent: Sqlmap
Expand Down Expand Up @@ -1209,7 +1229,7 @@ User-agent: crawler4j
Disallow:/
User-agent: dataforseo.com
Disallow:/
User-agent: DataForSeoBot
User-agent: dataforseobot
Disallow:/
User-agent: demandbase-bot
Disallow:/
Expand All @@ -1219,6 +1239,8 @@ User-agent: eCatch
Disallow:/
User-agent: evc-batch
Disallow:/
User-agent: everyfeed-spider
Disallow:/
User-agent: facebookscraper
Disallow:/
User-agent: gopher
Expand Down Expand Up @@ -1337,6 +1359,8 @@ User-agent: zgrab
Disallow:/

# Extra bad bots
User-agent: Google-Extended
Disallow: /
User-agent: PerplexityBot
Disallow: /
User-agent: OmigiliBot
Expand Down
8 changes: 5 additions & 3 deletions src/MessageHandler/ActivityPub/Inbox/ActivityHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ public function doWork(MessageInterface $message): void
$payload = @json_decode($message->payload, true);

if (null === $payload) {
$this->logger->warning('[ActivityHandler::doWork] Activity message from was empty: {json}, ignoring it', ['json' => json_encode($message->payload)]);
throw new UnrecoverableMessageHandlingException('activity message from was empty');
$this->logger->warning('[ActivityHandler::doWork] Activity message from was empty or invalid JSON. Truncated content: {content}, ignoring it', [
'content' => substr($message->payload ?? 'No payload provided', 0, 200),
]);
throw new UnrecoverableMessageHandlingException('Activity message from was empty or invalid JSON');
}

if ($message->request && $message->headers) {
Expand All @@ -93,7 +95,7 @@ public function doWork(MessageInterface $message): void

if (null === $payload['id']) {
$this->logger->warning('[ActivityHandler::doWork] Activity message has no id field which is required: {json}', ['json' => json_encode($message->payload)]);
throw new UnrecoverableMessageHandlingException('activity message has no id field');
throw new UnrecoverableMessageHandlingException('Activity message has no id field');
}

$idHost = parse_url($payload['id'], PHP_URL_HOST);
Expand Down
51 changes: 50 additions & 1 deletion translations/messages.gsw.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
{}
add: Dezuefüege
filter_by_subscription: Nach Abonnemänt filterä
type.article: Thema
type.smart_contract: Smart Contract
type.magazine: Magazin
thread: Thema
threads: Themä
microblog: Mikroblog
people: Lüüt
events: Ereignissä
magazine: Magazin
magazines: Magazinä
search: Suechä
select_channel: Wähl en Kanal
login: Ahmeldä
top: Top
hot: Heiss
active: Aktiv
newest: Neu
oldest: Alt
commented: Kommentiert
change_view: Ahsicht wächsle
filter_by_time: Nach de Ziit filterä
filter_by_type: Nach em Typ filterä
filter_by_federation: Nach Föderierigsstatus filterä
comments_count: '{0}Kommentär|{1}Kommentar|]1,Inf[ Kommentär'
followers_count: '{0}Follower|{1}Follower|]1,Inf[ Follower'
marked_for_deletion: Für Löschig markiert
marked_for_deletion_at: Für Löschig am %date% markiert
more: Meh
avatar: Avatar
added: Dezuegfüegt
up_votes: Förderä
favourite: Duume ufä
register: Registrierä
reset_password: Passwort zrüggsetzä
in: i
from: vo
username: Bnutzername
email: E-Mail
repeat_password: Passwort wiederholä
type.link: Link
type.video: Video
type.photo: Foti
sort_by: Sortierä nach
subscribers_count: '{0}Abonnänte|{1}Abonnänt|]1,Inf[ Abonnänte'
favourites: Favoritä
show_more: Meh zeige
already_have_account: Hesch scho es Konto?
to: ah
1 change: 1 addition & 0 deletions translations/messages.zh_Hans.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 4464045

Please sign in to comment.