rss-bridge icon indicating copy to clipboard operation
rss-bridge copied to clipboard

Facebook Bridge includes auto-translated content (depending on Accept-Language header)

Open cvtsi2sd opened this issue 4 years ago • 8 comments

Describe the bug When using RSSBridge to follow a group in (e.g.) Italian, if the user agent provides a different language (e.g. en-US) through the Accept-Language header Facebook inserts even automatically translated content, that is returned just after the "original" content (probably hidden by default in the rendered HTML).

To Reproduce

The bug was more tricky than expected to understand/debug because the Accept-Language header isn't considered in the cache key, so once you do a request with one Accept-Language header set, that's in cache on the server side, and even changing it doesn't affect the result anymore.

Steps to reproduce the behavior:

  1. Try an Italian page on a server passing Accept-Language: it-IT, e.g.
curl -H 'Accept-Language: it-IT' 'https://rss-bridge.snopyta.org/?action=display&bridge=Facebook&context=User&u=hipdem&media_type=all&skip_reviews=on&limit=-1&format=Atom'

some random entry looks like this:

	<entry>
		<title type="html">Un creepypasta: appare sul web Giornalisti italiani: ECCO LA...</title>
		<published>2020-10-01T15:29:39+00:00</published>
		<updated>2020-10-01T15:29:39+00:00</updated>
		<id>https://www.facebook.com/hipdem/posts/3032246060212909</id>
		<link rel="alternate" type="text/html" href="https://www.facebook.com/hipdem/posts/3032246060212909"/>
		<author><name>Hipster Democratici HD - Post | Facebook</name></author>
		<content type="html">&lt;a href="https://www.facebook.com/hipdem/"&gt;&lt;img src="https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-1/cp0/p50x50/102913386_2711317128972472_8514887640594513920_n.jpg?_nc_cat=1&amp;_nc_sid=dbb9e7&amp;_nc_ohc=QaMTiCBAfEcAX9FaF5U&amp;_nc_ht=scontent-frx5-1.xx&amp;_nc_tp=27&amp;oh=b03254ccf1f3ec397e6a6e7fc3bee8c3&amp;oe=5F9D6567" alt="" /&gt;&lt;/a&gt;&lt;a href="https://www.facebook.com/hipdem/"&gt;Hipster Democratici HD&lt;/a&gt;&lt;a href="https://www.facebook.com/hipdem/posts/3032246060212909"&gt;&lt;/a&gt;&lt;a href="https://www.facebook.com"&gt;&lt;i&gt;&lt;/i&gt;&lt;/a&gt;&lt;p&gt;Un creepypasta: appare sul web&lt;br /&gt; Giornalisti italiani: ECCO LA NUOVA CHALLENGE AUTOLESIONISTA DEI GIOVANI D'OGGI BECCATEVI QUESTO SERVIZIO INQUIETANTE&lt;/p&gt;</content>
		
		
		
	</entry>
  1. try again, but on a different server and with Accept-Language: en-us, like:
curl -H 'Accept-Language: en-US' 'https://wtf.roflcopter.fr/rss-bridge/?action=display&bridge=Facebook&context=User&u=hipdem&media_type=all&skip_reviews=on&limit=-1&format=Atom'

the same entry will now be

	<entry>
		<title type="html">Un creepypasta: appare sul web Giornalisti italiani: ECCO LA...</title>
		<published>2020-10-01T15:29:39+00:00</published>
		<updated>2020-10-01T15:29:39+00:00</updated>
		<id>https://www.facebook.com/hipdem/posts/3032246060212909</id>
		<link rel="alternate" type="text/html" href="https://www.facebook.com/hipdem/posts/3032246060212909"/>
		<author><name>Hipster Democratici HD</name></author>
		<content type="html">&lt;a href="https://www.facebook.com/hipdem/"&gt;&lt;img src="https://scontent-frx5-1.xx.fbcdn.net/v/t1.0-1/cp0/p50x50/102913386_2711317128972472_8514887640594513920_n.jpg?_nc_cat=1&amp;_nc_sid=dbb9e7&amp;_nc_ohc=QaMTiCBAfEcAX9Ok3Sv&amp;_nc_ht=scontent-frx5-1.xx&amp;_nc_tp=27&amp;oh=3b61db1df9fc7f9412d131000f26b2b3&amp;oe=5F9D6567" alt="" /&gt;&lt;/a&gt;&lt;a href="https://www.facebook.com/hipdem/"&gt;Hipster Democratici HD&lt;/a&gt;&lt;a href="https://www.facebook.com/hipdem/posts/3032246060212909"&gt;&lt;/a&gt;&lt;a href="https://www.facebook.com"&gt;&lt;i&gt;&lt;/i&gt;&lt;/a&gt;&lt;p&gt;Un creepypasta: appare sul web&lt;br /&gt; Giornalisti italiani: ECCO LA NUOVA CHALLENGE AUTOLESIONISTA DEI GIOVANI D'OGGI BECCATEVI QUESTO SERVIZIO INQUIETANTE&lt;/p&gt;A creepypasta: it appears on the web Italian journalists: HERE IS THE NEW AUTOLESIONIST CHALLENGE OF TODAY'S YOUNG PEOPLE GET THIS INQUIETING SERVICETranslated</content>
		
		
		
	</entry>

(see the extra auto-translated "A creepypasta: it appears on the web Italian journalists: HERE IS THE NEW AUTOLESIONIST CHALLENGE OF TODAY'S YOUNG PEOPLE GET THIS INQUIETING SERVICETranslated" text at the end)

Expected behavior The content of the returned items from the bridge shouldn't ever include the auto-translated text, regardless of the Accept-Language header settings.

As a workaround, at least there should be a way to pass the Accept-Language header value through the URL, as many (most?) applications/services that build on RSS only allow to specify an URL, not the extra headers.

cvtsi2sd avatar Oct 01 '20 16:10 cvtsi2sd

This and #1661 seem the same, but as this has more content, I would recommend someone close 1661 into this

SpangleLabs avatar Oct 22 '20 20:10 SpangleLabs

Was this actually fixed or is it just generic cleanup of old-ish issues?

cvtsi2sd avatar Mar 26 '22 16:03 cvtsi2sd

Cleanup. Not fixed.

dvikan avatar Mar 26 '22 16:03 dvikan

So what's the point of closing this if the issue is still there?

cvtsi2sd avatar Mar 26 '22 16:03 cvtsi2sd

We don't have a bridge maintainer to fix this im afraid.

dvikan avatar Mar 26 '22 16:03 dvikan

And that doesn't magically make the bug go away indeed... Unless you are deprecating the bridge completely, you are making the future maintainer a disservice by closing all the bugs related to the codebase they are going to take on. Instead of closing them you could add a label "fb-missing-maintainer" or something to more easily categorize them, but closing them tout-court doesn't seem particularly helpful, and seems a bit of a mockery to reporters who wasted time to analyze the bug prepare a well-made repro.

cvtsi2sd avatar Mar 26 '22 17:03 cvtsi2sd

Thanks for feedback. I've been a bit overactive closing older issues. The issue is still here in the issue tracker and is easily searchable. When we start fixing facebook bridge we can easily find it. What is the purpose of having open issues and closed issues in your opinion? Should we keep issues open for years as long it's still an issue?

dvikan avatar Mar 26 '22 17:03 dvikan

IMO an issue should be closed if it has been fixed, if it is likely that it no longer applies to the codebase (typical case: the entire subsystem has been rewritten), or if it has been decided that it's not a bug or won't be fixed for some reason; in other words, they are kept around only for historical purposes.

Closing an issue that still applies because "it's old" or because currently no-one can work on it doesn't really make sense to me: if I opened this issue yesterday with the exact same content it would still be valid, and probably wouldn't be closed, would it? But what difference does it make if I reported it a year ago or yesterday, if the problem is still there?

The issue is still here in the issue tracker and is easily searchable. When we start fixing facebook bridge we can easily find it.

It's mixed with stuff that no longer applies, or that has been fixed, or that is invalid, to find it you'd have to filter out all of these other cases, some are easy (if there are PR connected to them), some need manual work, that could be avoided leaving valid issues open, even if no one is working on them.

cvtsi2sd avatar Mar 26 '22 17:03 cvtsi2sd