Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 303
  • Merge Requests 39
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !412

Open
Opened 3 hours ago by Ben Hayward@benhayward.ben
Report abuse

[Sprint/SillySheep](fix): Failing spam detection on staging causing issues when uploading media #1193

Closes #1193

Summary

Following an update to the spam detection system, videos stopped working because the spam detector was expecting an Entity object rather than the Video that our media POST was passing to it. The same applies to an Image object being passed through.

This caused an issue where-in ->getDescription() could not be found - as Video has the description attribute, I added getters and setters into the Video and Image classes.

Testing

Test various upload types, try posting with and without a red flag failing link (e.g. bit.ly).

Edited 3 hours ago by Ben Hayward
Request to merge fix/spam-detection-webm-1193 into master
Open in Web IDE
Pipeline #100320140 passed for 4ba8807f on fix/spam-detection-webm-1193
          Requires 2 more approvals from Devs and Deployers. Approved by
          Xander Miller
          Xander Miller
          Marcelo Rivera
          Marcelo Rivera
          Olivia Madrid
          Olivia Madrid
          Emiliano Balbuena
          Emiliano Balbuena
          Mark Harding
          Mark Harding
          Rami Albatal
          Rami Albatal
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Closes #1193

          Deletes source branch

          • Discussion 4
          • Commits 3
          • Pipelines 3
          • Changes 2
          0/2 threads resolved
          • Ben Hayward @benhayward.ben added MR::Awaiting Review Squad::Yellow scoped labels 3 hours ago

            added scoped labels

          • Ben Hayward @benhayward.ben added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 3 hours ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added 1 commit 3 hours ago

            added 1 commit

            • 27039ee4 - Added description getter and setters for images

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 3 hours ago

            added 1 commit

            • 4ba8807f - Forgot to switch return type

            Compare with previous version

          • Ben Hayward @benhayward.ben changed title from Sprint/SillySheep: Failing spam detection causing issues when uploading webm media #1193 to Sprint/SillySheep: Failing spam detection on staging causing issues when uploading media #1193 3 hours ago

            changed title from : Failing spam detection media to : Failing spam detection media

          • Ben Hayward @benhayward.ben changed the description 3 hours ago

            changed the description

          • Ben Hayward @benhayward.ben added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 3 hours ago

            added scoped label and automatically removed label

          • Xander Miller @xander-miller approved this merge request 2 hours ago

            approved this merge request

          • Xander Miller
            Xander Miller @xander-miller · 2 hours ago
            Developer

            Feels like there is a couple hundred milliseconds of lag at the end of the progress bar just before a image uploads but seems more stable than previously.

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 3 minutes ago
            Entities/Video.php
            296 296 $this->time_sent = $time_sent;
            297 297 return $this;
            298 298 }
            299
            300 /**
            301 * Return description
            302 * @return string
            303 */
            304 public function getDescription(): string
            305 {
            306 return $this->description ?: '';
            307 }
            308
            309 /**
            310 * Set description
            311 * @return Image
            • Mark Harding
              Mark Harding @markeharding · 3 minutes ago
              Owner

              :eyes:

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 3 minutes ago
            Entities/Image.php
            386 386 $this->time_sent = $time_sent;
            387 387 return $this;
            388 388 }
            389
            390
            391 /**
            392 * Return description
            393 * @return string
            394 */
            395 public function getDescription(): string
            396 {
            397 return $this->description ?: '';
            398 }
            399
            400 /**
            401 * Set description
            • Mark Harding
              Mark Harding @markeharding · 3 minutes ago
              Owner

              param type

            • Please register or sign in to reply
          • Mark Harding @markeharding added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 1 minute ago

            added scoped label and automatically removed label

          • Mark Harding
            Mark Harding @markeharding · 1 minute ago
            Owner

            We need to use method_exists on https://gitlab.com/minds/engine/blob/master/Core/Security/Spam.php#L32

          Please register or sign in to reply
          0 Assignees
          None
          None
          Milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Requires Changes Squad::Yellow
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Marcelo Rivera
          user avatar
          Olivia Madrid
          user avatar
          Emiliano Balbuena
          user avatar
          Mark Harding
          user avatar
          Rami Albatal
          user avatar
          Guy Thouret
          user avatar
          Martin Santangelo
          Reference: minds/engine!412