friendica / red

The Red Matrix
MIT License
214 stars 50 forks source link

Search module can't search private posts #887

Closed solstag closed 9 years ago

solstag commented 9 years ago

Ni!

Because it is based on a simple database call, our search module cannot match posts that have been obscured (ITEM_OBSCURED) in order to prevent accidental reading by an honest admin. As most, if not all, private posts get obscured in the db, our search is currently limited to public posts.

I assume the full solution to both obscure and search private posts is a proper search engine that keeps a search index and thus needs not go through the content of posts during a search.

I don't have the time to implement that now, perhaps ever, but as I need some form of private post search on my hub, I've patched include/items.php so obscuring becomes optional with a system config 'item_store_plaintext'.

Is that a patch that could be welcome in mainline, or should I maintain it separately?

Cheers!

friendica commented 9 years ago

I cannot endorse such a feature - even as an option. We know that security through obscurity is weak, but allowing a simple tweak to remove it defeats the whole purpose - which is to make it just difficult enough to snoop that few will bother trying. If one was to implement such a thing we would also need some way of notifying site members that the disk encryption of their posts has been disabled. So unfortunately no - I can't accept that in core.

friendica commented 9 years ago

Thinking about this further - I probably wouldn't have a strong objection if this was a pconfig that each member could control to their own liking (defaulting to encrypted). As long as they could change it to their own preference and could view the current setting at any time. What we're trying to protect you from is rogue admins and ISPs. If you wish to waive that protection, that's your own prerogative. But it should probably be on a case by case basis and not as a blanket default for the entire site where members couldn't tell if it was enabled or disabled. And it should never apply to private mail.

solstag commented 9 years ago

That's fine. Although in my view obscuring only helps honest admins avoid accidents or resist temptation, but is no defense against a rogue admin. In any case it would also partially defeat this purpose.

I'll keep it as a private patch for now, if I ever make it a pconfig with all the warnings it requires I might share it then. And maybe not providing a bad fix will encourage someone to provide a good fix, such as a proper search mechanism. ;-)

ghost commented 9 years ago

This issue was moved to redmatrix/redmatrix#177