@Friendica Support
While I did some searching with friendicas fulltext search and tag search I noticed that there are many top-level posts from diaspora users in my stream. So I looked in the db. And I noticed that I'm the only person on my instance who does have connections with diaspora users (and this two contacts are not real diaspora contacts. They are hubzilla contacts.)
Social relay is disabled.
So why do I have that many top-level posts from diaspora users who no one knows?
-
While I did some searching with friendicas fulltext search and tag search I noticed that there are many top-level posts from diaspora users in my stream. So I looked in the db. And I noticed that I'm the only person on my instance who does have connections with diaspora users (and this two contacts are not real diaspora contacts. They are hubzilla contacts.)
Social relay is disabled.
So why do I have that many top-level posts from diaspora users who no one knows?
SELECT COUNT( `a`.`id`) AS `total`
FROM `item` a
LEFT JOIN `item` `b` ON `a`.`id` = `b`.`id`
INNER JOIN `contact` ON `a`.`contact-id` = `contact`.`id`
WHERE `a`.`id` = `b`.`parent` AND `contact`.`uid` = 0 AND `contact`.`network` = 'dspr'
-
total
------
1867
Michael Vogel
Rabuzarus
Michael Vogel
user
Rabuzarus
But posts were automatically deleted after 180 days
Rabuzarus
I have ca. 376 public top level post on my instance from friendica members with uid=0 (in the contact table) but for diaspora there are 1902 top level posts
Rabuzarus
user
edit : user agent for the relay is "Social-Relay/1.3.1 - https://github.com/jaywink/social-relay"
Rabuzarus
But this shouldn't be problematically since https://friendica.kommune4.de/.well_known/x-social-relay does say
"subscribe": false,
Rabuzarus
In the webserver log says
130.180.122.122 - - [10/Feb/2017:12:31:02 +0100] "POST /receive/public HTTP/1.1" 200 5704 "-" "DiasporaFederation/0.1.7"
Michael Vogel
user
Michael Vogel
Rabuzarus
But the other question is why do I get that much public posts?
subscribe
is set tofalse
in.well_known/x-social-relay
The ideal behavior for me would be. Federating my public posts to the social relay but don't receive public posts from the relay (because at the moment I'm not interested in any public posts from diaspora or other networks)
Michael Vogel
Rabuzarus
I just want to analyze where the problems are.
The question is also if the problem is only on our side. Shouldn't the relay server stop relaying post to instance with
subscribe: false
?Michael Vogel
Michael Vogel
Now I go to bed.
Rabuzarus
user
user
From how many users are the public posts you receive with "uid=0" ?
Rabuzarus
SELECT COUNT(DISTINCT `contact`.`nurl`) FROM `item` `a` LEFT JOIN `item` `b` ON `a`.`id` = `b`.`id` INNER JOIN `contact` ON `a`.`contact-id` = `contact`.`id` WHERE `a`.`id` = `b`.`parent` AND `contact`.`uid` = 0 AND `contact`.`network` = 'dspr'
Result 373 Persons from diaspora with uid=0 who have public top-level-posts on my instance
Rabuzarus
Jason Robinson said in the comments of the GitHub PR that he can confirm that my instance isn't subscribed to relay.iliketoast.net. And I can confirm by my webserver log that no POST to /receive/public comes from this IP.
But with this knowledge it becomes really tricky. In the webserver logs I have many other IP's which post to
receive/public
OK I said I have two Hubzilla contacts. It would be a little bit easier if I could see the domain names in the logs (not only the IP) but on a shared host I can't change this.
I guess the PR from @Michael Vogel would solve my problem. But I guess that maybe also other people are affected by this issue.
The actual PR would prevent the storing of public diaspora messages if
relay_subscribe
isn't set to true.But lets think of the case that we wan't to subscribe to the... show more
Jason Robinson said in the comments of the GitHub PR that he can confirm that my instance isn't subscribed to relay.iliketoast.net. And I can confirm by my webserver log that no POST to /receive/public comes from this IP.
But with this knowledge it becomes really tricky. In the webserver logs I have many other IP's which post to
receive/public
OK I said I have two Hubzilla contacts. It would be a little bit easier if I could see the domain names in the logs (not only the IP) but on a shared host I can't change this.
I guess the PR from @Michael Vogel would solve my problem. But I guess that maybe also other people are affected by this issue.
The actual PR would prevent the storing of public diaspora messages if
relay_subscribe
isn't set to true.But lets think of the case that we wan't to subscribe to the relay server for tag subscribing. Let's say something like
#gnusocial
which does only have 10 posts with this tag in a month.In this case we would not only get the posts with the tag
#gnusocial
, we would also get the other messages again.I don't know how much other friendica installations are effected by this. But at the moment my instance is good for testing such a "bad behavior" because I only have two hubzilla contacts and no real diaspora contacts. At the moment I'm the only one who is active on this instance and the other users on this instance does only have contacts who are on this instance (I know them all in real life).
So this are good testing conditions (beside the fact that it is a shared host with limited access)
Rabuzarus
There are a lot more posts. I guess this are the original posts of the reshares from the pending/rejected diaspora contacts.
I can't be totally sure because testing 2000 posts by hand is not doable. But I did some tests for the last 200 posts and the result seems to prove the assumption.
Rabuzarus
if a user presses the reject contact request a post call to with a "request_id" (it is the id of the intro in the intro table). To make it short, the reject contact request button deletes the intro in the intro table and the pending contact in the contact table (see /mod/notifications.php).
I don't know if something needs to be commited to the diaspora server so that they know that we have rejected their request and would stop sending us messages.
Michael Vogel
BTW: Pull request is done: https://github.com/friendica/friendica/pull/3161
It adds some logging so that you can detect the origin of a post.
Rabuzarus
Rabuzarus
I got ca. 50 "Unwanted messages" from diaspora users.
Until 3h ago the messages did come from 3 diaspora contact where I have rejected their connection request some time ago.
3h ago I rejected another connection request from a diaspora users who has been marked 2 weeks as pending contact. And as a result I get now also "unwanted messages" from this user since 3h (note: @Michael Vogel PR is working. The messages were not saved in the db).
But there is one strange thing. To test my thesis from some posts above I registered an account on iliketoast.net to reproduce this. I sent a connection request to this account and did send a public message from the dspr account. Nothing happend. Afterwards I rejected the connection request on the friendica side and did send a new public messages. Again nothing happens.
According to the logs the public messages from my dspr account were discarded because thy were sent directly to the user (and not to
receive/public
).The only difference in the handl... show more
I got ca. 50 "Unwanted messages" from diaspora users.
Until 3h ago the messages did come from 3 diaspora contact where I have rejected their connection request some time ago.
3h ago I rejected another connection request from a diaspora users who has been marked 2 weeks as pending contact. And as a result I get now also "unwanted messages" from this user since 3h (note: @Michael Vogel PR is working. The messages were not saved in the db).
But there is one strange thing. To test my thesis from some posts above I registered an account on iliketoast.net to reproduce this. I sent a connection request to this account and did send a public message from the dspr account. Nothing happend. Afterwards I rejected the connection request on the friendica side and did send a new public messages. Again nothing happens.
According to the logs the public messages from my dspr account were discarded because thy were sent directly to the user (and not to
receive/public
).The only difference in the handling of my test contact and the other rejected contacts was that the other contacts were for 2-3 weeks in the pending state and my test contact only for one hour.
Michael Meer