Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 33
    • Merge Requests 33
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • List
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !313

Merged
Opened 1 week ago by Guy Thouret@gthouret
  • Report abuse
Report abuse

(fix) Handle ImagickException in blog api where an invalid image file is passed - #770

This error could be triggered by uploading a 0 byte file as a banner image.

Created by e.g. touch testimage.jpg.

This is now handled and api will return a correct error response.

Request to merge fix/770-imagickexception into master
  • Email patches
  • Plain diff
Pipeline #80234716 passed for 705b5529 on fix/770-imagickexception
          Merge request approved. Approved by
          Mark Harding
          Mark Harding
          Brian Hatchet
          Brian Hatchet
          Emiliano Balbuena
          Emiliano Balbuena
          Rami Albatal
          Rami Albatal
          Martin Santangelo
          Martin Santangelo
          Ben Hayward
          Ben Hayward

          Merged by Mark Harding 1 hour ago

          The changes were merged into master with 61f0bd82

          The source branch has been deleted

          Mentions #770 (closed)

          Pipeline #82349885 waiting for manual action for 61f0bd82 on master
                      • Discussion 4
                      • Commits 1
                      • Pipelines 1
                      • Changes 1
                      • Loading...
                      • Guy Thouret @gthouret added MR::Awaiting Review Priority::1 - High Product::Blogs Squad::Blue scoped labels 1 week ago

                        added MR::Awaiting Review Priority::1 - High Product::Blogs Squad::Blue scoped labels

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

                        Received the following error when changing banner.

                        [05-Sep-2019 19:29:33] WARNING: [pool www] child 596 said into stderr: "NOTICE: PHP message: Exception #1567711773: ImagickException: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504 in /var/www/Minds/engine/Core/Media/Imagick/Manager.php:59"

                        Also, does this exception also not trigger on image uploads in comments and newsfeed?

                      • Mark Harding @markeharding added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 1 week ago

                        added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label

                      • Guy Thouret
                        Guy Thouret @gthouret · 1 week ago
                        Developer

                        Should be seeing this...Screenshot_2019-09-06_at_12.11.54

                      • Guy Thouret
                        Guy Thouret @gthouret · 1 week ago
                        Developer

                        According to the Sentry logs it's always thrown from the same place for the same request - /api/v1/blogs/new so this will resolve that issue.

                      • Guy Thouret @gthouret added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 1 week ago

                        added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label

                      • Guy Thouret
                        Guy Thouret @gthouret · 1 week ago
                        Developer

                        Editing an existing banner to an invalid file is producing the same correct 'Invalid image file' response.

                        This is in dev env because review site has been taken down.

                      • Mark Harding @markeharding approved this merge request 1 hour ago

                        approved this merge request

                      • Mark Harding @markeharding mentioned in commit 61f0bd82 1 hour ago

                        mentioned in commit 61f0bd82

                      • Mark Harding @markeharding merged 1 hour ago

                        merged

                      • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
                      Please register or sign in to reply
                      0 Assignees
                      None
                      Assign to
                      None
                      Milestone
                      None
                      Assign milestone
                      None
                      Time tracking
                      No estimate or time spent
                      4
                      Labels
                      MR::Awaiting Review Priority::1 - High Product::Blogs Squad::Blue
                      Assign labels
                      • View project labels
                      Lock merge request
                      Unlocked
                      8
                      8 participants
                      user avatar
                      Brian Hatchet
                      user avatar
                      Emiliano Balbuena
                      user avatar
                      Rami Albatal
                      user avatar
                      Martin Santangelo
                      user avatar
                      Ben Hayward
                      user avatar
                      Marcelo Rivera
                      user avatar
                      Mark Harding
                      Reference: minds/engine!313

                      Revert this merge request

                      This will create a new commit in order to revert the existing changes.

                      Switch branch
                      Cancel
                      A new branch will be created in your fork and a new merge request will be started.

                      Cherry-pick this merge request

                      Switch branch
                      Cancel
                      A new branch will be created in your fork and a new merge request will be started.