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>
I'm getting NXDOMAIN when trying to access activitypub-troll.cf
@Fae Empress I did too, I was going to just do an ip block, but nslookup activitypub-troll.cf ** server can't find activitypub-troll.cf: NXDOMAIN so I had to temporally shutdown my instance, and do a lot of fast homework and cleaning, and blocking, what I did, at the moment seems to be working, I fear as the fediverse grows, so will the troubles with keeping up with this, but its really no different than back when everyone got online through a cd rom, and bombed each others computers through im and chat rooms the difference today is, the bad actors have vast resources and us little people, have to walk a fine line between blocking everything and letting just enough in to stay connected.
The real problem is that we might end up with positive connection lists instead of negative listing of servers.
I guess we all start to think about how tor create some kind of fediWeb of trust where we mutually confirm and integrate servers into our permitted server lists. Even maybe some kind of rules set for new servers restricting their access and bumping some allow request to the server admin for a domain and/or IP?
🤔

Where are the main problems for us as friendicans?
(Forum) profile pages that allow automatic following and any kind of automatic manually unapproved connections?
Well no, as interaction with public posts always is possible, some kinda emergency beak for spamming would be needed.
Gif of Marvin, the paranoid android, coming down in an elevator stating that he considers that all ought to know that he feels very depressed.
@pasjrwoctx

Go to /moderation/blocklist/server and enter *.activitypub-troll.cf in ‘Add new blocklist entry’. Then click ‘Check pattern’.
In the new window that opens, click ‘Remove server’ and, if you wish, enter a reason. Finally, click ‘Add pattern to blocklist’.
Then *.activitypub-troll.cf and all its subdomains will be blocked.



Once that's done, you just have to delete the corresponding entries from the database.

mysql -u [user_name] -p[password] [database_name]

SELECT COUNT(*) FROM gserver where nurl LIKE ‘%.activitypub-troll.cf’;

DELETE from gserver where nurl LIKE ‘%.activitypub-troll.cf’ LIMIT 1000000;

OPTIMIZE TABLE gserver;

EXIT;
@OldKid ⁂ @pasjrwoctx
My friendica database is 15 GB , I tried to follow your advice but i have error
sudo mysql
use myfriendicadb;
SELECT COUNT(*) FROM gserver where nurl LIKE ‘%.activitypub-troll.cf’;

[strong]Error[/strong]
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-troll.cf’' at line 1
@OldKid ⁂ @pasjrwoctx
I solved it, it was a problem when I did the copy and paste, it didn't copy the correct formatting my database has shrunk by 600MB 😅 , thanks