Skip to main content


FYI #fediverse


I just spent 3 hours cleaning my #Friendica #databse, I got flooded by activitypub-trollcf and well lets just say that was not fun. !Friendica Admins !Friendica Developers !Friendica Support be safe #Fedi.Tips

sql
CREATE TABLE blocklist (
id INT AUTO_INCREMENT PRIMARY KEY,
domain VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

UPDATE `gserver` SET `blocked` = TRUE WHERE `url` LIKE '%activitypub-troll.cf%';

DELETE FROM `workerqueue` WHERE `parameter` LIKE '%activitypub-troll.cf%';

DELIMITER $$
CREATE TRIGGER before_insert_workerqueue
BEFORE INSERT ON `workerqueue`
FOR EACH ROW
BEGIN
IF NEW.parameter LIKE '%activitypub-troll.cf%' THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'Insert of activitypub-troll.cf is not allowed';
END IF;
END$$
DELIMITER ;

DELETE FROM `workerqueue` WHERE `done` = 1;
DELETE FROM `workerqueue` WHERE `done` = 0;

htasccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} activitypub-troll\.cf
[NC]RewriteCond %{REMOTE_HOST} activitypub-troll\.cf
[NC]RewriteCond %{HTTP_USER_AGENT} activitypub-troll\.cf
[NC]RewriteRule .* -
[F]</IfModule>
@pasjrwoctx Sorry you were late to the party, we had quite a few support requests at the time the ActivityPub fork bomb was released. Maybe we should add it to new nodes blocklist by default.
Not sure if they are still a thing, but you might wanna add:

- *.misskey-forkbomb.cf
- *.activitypub-proxy.cf

as well. They also were used to spam the Fediverse back than.