Post are being reshared in instances despite of "federating: false " enabled.
Bug description
Installation Type: OTP Pleroma 2.0.7 OS: Debian 10 psql (PostgreSQL) 11.7 (Debian 11.7-0+deb10u1)
test
Created Wednesday 08 July 2020
The steps for reproducing this behavior is first creating a federated instance, then disabling federation through config (the instance is still on but not federating thanks to config). The post that were posted when the instance were federating are still being shared and displayed publicly.
Lets put this situation in the following way:
TEST CASE 1:
Instance A is the instance that is not federating. Instance B is an instance with a cached post from Instance A. and Instance C, D, E, etc... are any instances who are federating with instance B.
So Instance A stooped to federate thanks to config, but Instance B has a cached copy which is reshared, this reshared post is being displayed on Instance C, D, and E successfully.
I tested this situation as follows: Instance A: ghostgirl.princesa.company (not federating but online) Instance B: gentoo.live Instance C: pleroma.wolfie.pw
This original post: https://ghostgirl.princesa.company/objects/ab2296a2-d9f2-44ff-b70a-c0cbf21a75c2 was cached in gentoo.live, and in any random instance federating with gentoo.live the repost is being displayed:
https://pleroma.wolfie.pw/notice/9uE47kTJ61DGK0ZAvY
TEST CASE 2:
Or even this reshared post https://ghostgirl.princesa.company/objects/3d70d3fd-c59d-4362-bcbf-7694f49bb059 from ghostgirl.princesa.company:
https://queer.hacktivis.me/notice/9wrcBRSm9JyHqxSZBw https://pleroma.soykaf.com/notice/9uE446W0UAH5eqwo08 https://gentoo.live/notice/9w1mOUEig0lFhOo1oG
Then I discovered more about this behaviour when I tested it in patch.cx:<<
patch.cx didn't have any cached post from ghostgirl.princesa.company, and it seems that retrieveing for first time my timeline from gentoo.live it wasn't able to retrieve reshared post from ghostgirl.princesa.company (that is not federating) https://patch.cx/users/9vYK6ZBMNlFq3dyLOi?tab=statuses
But then I did this experiment, I registrered in patch.cx myself, and followed myself, and then I reshared a ghostgirl.princesa.company (Instance A) from Gentoo.live (Instance B) and this time, the post also were displayed in my timeline from patch.cx.
**This means that as long as the instances are peers the post from a non-federating instance that once were federating are indefinitely federating as long as the non-federating instance is still on. **
CONTROL EXPERIMENT: First I executed: systemctl stop pleroma systemctl stop nginx Then My control instance is https://neenster.org, a non related instance to the mine, I also followed my princessgentoo@gentoo.live account there, but now I'm not able to see reshared post from ghostgirl.princesa.company, THIS IS THE EXPECTED BEHAVIOUR!!!
However, once nginx is on again, this instance is able to display ghostgirl.princesa.company reshared statuses.
NOTICE THAT GHOSTGIRL WERE NOT "SUPPOSELY" FEDERATING AT ALL THANKS TO CONFIG DESPITE OF BEING ON OR OFFLINE.