News for hackers. Stuff that matters.
Re:“Like” at Your Own Risk by kerkeslager on Thursday January 23, 2020 @10:44AM (#22128403)
There's a lot of major challenges to creating decentralized, trustless systems, but this is very easy to solve in a trustless system. All you do is indicate "Like"s by signing an object like:

    {post:"<cryptographic hash of post>",action:"like"}
That way if the post changes, your signed "like" no longer applies.

This trustless-ness can be introduced in centralized systems too, but the tendency in a centralized system is to trust the central authority, which is the whole problem with such systems.

Re:“Like” at Your Own Risk by close04 on Thursday January 23, 2020 @11:32AM (#22128882)
This doesn't work if you're just linking to some dynamic content. People will like the link and the link itself is static but the content provided by clicking it can change without notice.
Re:“Like” at Your Own Risk by kerkeslager on Thursday January 23, 2020 @02:33PM (#22130945)
Responding to this post, since it looks like you edited it (to clarify) and I responded to my misunderstanding based on what your post previously said:

That comes down to making sure you like what you actually intend to like: you probably don't intend to like the literal bytes of the URL, you probably intend to like the content at the URL. UIs can aid in this[1] but ultimately I don't think people think that specifically, and there's not a perfect technical solution to that problem.

[1] WARNING: You're about to "Like" a URL. The content at the URL may change. Do you wish to continue? Y/N

Re:“Like” at Your Own Risk by heavenlyblue on Thursday January 23, 2020 @11:48AM (#22129072)
You could hash both the url and the content
Re:“Like” at Your Own Risk by close04 on Thursday January 23, 2020 @12:19PM (#22129446)
In this case a different ad on that page would change the hash and you’d have to hash the content periodically anyway.

When I was using FB I noticed I “liked” some FB pages that in he meantime changes hands and were posting all kinds of crap. The name of the page stayed the same so I didn’t get the usual warning. With dynamic websites it’s impossible to have any control over those changes.

Re:“Like” at Your Own Risk by kerkeslager on Thursday January 23, 2020 @02:16PM (#22130750)
I think you're misunderstanding the nature of what I'm proposing.

You don't sign a hash of the URL or the page. You sign a URL of the content. If the content changes, your signed hash will no longer match, and the like no longer validates, which is exactly the point--your like isn't intended to apply to all future things the page owner could possibly put on that page, it's intended to apply only to the content that is there.

And personally, I'd never intentionally like an ad anyway. In general, ads causing things to lose all likes if they inject them into the content would be a good thing, because it would force advertisers to differentiate dynamic ads from content.

EDIT: I see you edited to clarify your other post, so my post here doesn't really apply any more. I've responded to that post directly.

Re:“Like” at Your Own Risk by kerkeslager on Thursday January 23, 2020 @01:04PM (#22129970)
The hash is of the content, not the link.
Re:“Like” at Your Own Risk by close04 on Thursday January 23, 2020 @02:02PM (#22130605)
The content being a dynamic webpage where if you change a single byte (ads, page logo, anything) the hash changes? Try to load any webpage twice and see if you can get exactly the same bits.

And just imagine how much of the internet FB would have to periodically hash, and what impact it would have on those sites too.

Re:“Like” at Your Own Risk by kerkeslager on Thursday January 23, 2020 @02:25PM (#22130854)
That's a feature not a bug. Not only is it a feature, it's the feature. That's the entire point.

It doesn't have to be the entire page that's hashed, only the content being liked.

Facebook would probably never implement this, because their entire business model relies on them being a trusted authority, so trustless architectures would actively undermine them.

In general, if you see my name above a post, you can assume that the only thing I want Facebook to do is sell all their assets, give the money to charity, and shut down. :)

Re:“Like” at Your Own Risk by close04 on Thursday January 23, 2020 @04:36PM (#22132404)
> It doesn't have to be the entire page that's hashed, only the content being liked.

I think there's a disconnect here... The page to which your posted link points is the content. Whatever loads when clicking the link is the content you hash, with ads, scripts, the main body, the comments, the everythings. If I link to the front page of HN it's guaranteed it will never ever have any likes. If I link to an article that says something like "posted 6 minutes ago" then every minute the page changes.

A FB robot loads the link, receives some data (the full page), hashes that, attaches it to your "Like". Then rehashes periodically.

But every time someone clicks the same link they load slightly different content. Simply because something on that page changes. A new comment in that page, an evolving story where the site puts updates, a live blog, or a different ad loaded on the page, which are all valid reasons for a page to change. They would all invalidate the like.

So what happens next time? FB robot loads page, gets data, hashes, new hash doesn't match. Your Like is removed because the page changed. You might as well remove the Like button for anything linking outside of FB.

Educating users is an option, big warning that the content behind the link may change but let's be honest, most people will be oblivious to the implications.

Re:“Like” at Your Own Risk by kerkeslager on Friday January 24, 2020 @09:31AM (#22138568)
> The page to which your posted link points is the content.

I disagree, the page is not the content of the page. I hear where you're coming from though: what you're saying is a widely-accepted approximation because "semantic HTML" is not semantic, so we don't have a way to get the actual content from an HTML page. This is by design: lots of big websites have a vested interest in making it impossible to separate their content from their presentation. But I don't think future implementations have to be bound by previous bad decisions.