Skip to content

(bug): NSFW tags on activities not propagating to their entity

Summary

It appears that when a post is made NSFW, the change is not going down the chain to the actual image entity. The effect of this is that when the image entity is loaded for the image endpoints, it does not have any data under nsfw, so shows up anyway.

This is also likely responsible for reports of NSFW in sidebars.

https://www.minds.com/newsfeed/988929333995732992

Steps to reproduce

  1. Make an NSFW image post (check pornography & nudity)
  2. Check it out in your gallery - if you see an unblurred image, therein lies your bug.

Further investigation:

  1. Spin up minds console
  2. Run the below
use Minds\Core;
use Minds\Entities;

$db = new Core\Data\Call('entities_by_time');
$activities = $db->getRow("activity:entitylink:997902097930260493");
var_dump($activities);

$activity = new Entities\Activity($activities[0]);
var_dump($activity);

See the NSFW changes did not propagate to the image entity.

Platform information

Web - cross platform

What is the current bug behavior?

NSFW content is visible.

What is the expected correct behavior?

It should not be.

Relevant logs and/or screenshots

image

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by Ben