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>
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>
Fae Empress
•pasjrwoctx
•utopiArte
•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.
OldKid ⁂
•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.
Anomaly
•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
Anomaly
•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