Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
  • Repository
  • Issues 291
  • Merge Requests 40
  • 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
  • !388

Open
Opened 1 hour ago by Marcelo Rivera@eiennohi
Report abuse

Remove asset signing for public posts

#914

Request to merge fix/remove-public-asset-signing into master
The source branch is 3 commits behind the target branch
Open in Web IDE
Pipeline #93553893 passed for 3c748de9 on fix/remove-public-asset-signing
          Requires 3 more approvals from Devs, Deployers, and QA.
          Emiliano Balbuena
          Emiliano Balbuena
          Martin Santangelo
          Martin Santangelo
          Guy Thouret
          Guy Thouret
          Mark Harding
          Mark Harding
          Olivia Madrid
          Olivia Madrid
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Mentions #914

          Deletes source branch

          • Discussion 7
          • Commits 3
          • Pipelines 4
          • Changes 7
          0/6 threads resolved
          • Marcelo Rivera @eiennohi added Squad::Yellow scoped label 1 hour ago

            added scoped label

          • Marcelo Rivera @eiennohi added 1 commit 1 hour ago

            added 1 commit

            • 2a395c1d - (fix): spec tests

            Compare with previous version

          • Marcelo Rivera @eiennohi added 1 commit 1 hour ago

            added 1 commit

            • cba0d53b - (fix): spec tests

            Compare with previous version

          • Marcelo Rivera
            Marcelo Rivera @eiennohi · 1 hour ago
            Developer

            tested with both public newsfeed and closed group activities

          • Marcelo Rivera @eiennohi added 1 commit 1 hour ago

            added 1 commit

            • 3c748de9 - (fix): spec tests

            Compare with previous version

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 1 hour ago
            Controllers/api/v1/media/thumbnails.php
            41
            42 if (!$entity) {
            37 43 return Factory::response([
            38 44 'status' => 'error',
            39 'message' => 'This endpoint has been deprecated. Please use fs/v1/thumbnail',
            45 'message' => 'Entity not found'
            40 46 ]);
            41 47 }
            42 48
            43 $guid = $pages[0];
            44
            45 Core\Security\ACL::$ignore = true;
            49 $featuresManager = new FeaturesManager();
            46 50
            47 $size = isset($pages[1]) ? $pages[1] : null;
            51 if ($entity->access_id !== ACCESS_PUBLIC && $featuresManager->has('cdn-jwt')) {
            • Mark Harding
              Mark Harding @markeharding · 1 hour ago
              Owner

              Use Common\Access::Public instead

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 1 hour ago
            Controllers/api/v1/media/thumbnails.php
            29 29 exit;
            30 30 }
            31 31
            32 $featuresManager = new FeaturesManager();
            32 $guid = $pages[0];
            33 33
            34 if ($featuresManager->has('cdn-jwt')) {
            35 error_log("{$_SERVER['REQUEST_URI']} was hit, and should not have been");
            34 Core\Security\ACL::$ignore = true;
            35
            36 $size = isset($pages[1]) ? $pages[1] : null;
            • Mark Harding
              Mark Harding @markeharding · 1 hour ago
              Owner

              maybe use $pages[1] ?? null?

              Edited by Mark Harding 1 hour ago
            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 1 hour ago
            Controllers/fs/v1/thumbnail.php
            18 18 exit;
            19 19 }
            20 20
            21 Core\Security\ACL::$ignore = true;
            • Mark Harding
              Mark Harding @markeharding · 1 hour ago
              Owner

              Why are we ignoring acl?

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 1 hour ago
            Controllers/fs/v1/thumbnail.php
            22 $guid = $pages[0];
            23 $size = isset($pages[1]) ? $pages[1] : null;
            24
            25 $entity = Entities\Factory::build($guid);
            26
            27 if (!$entity) {
            28 return Factory::response([
            29 'status' => 'error',
            30 'message' => 'Entity not found'
            31 ]);
            32 }
            33
            21 34 $featuresManager = new FeaturesManager;
            22 35
            23 if ($featuresManager->has('cdn-jwt')) {
            36 if ($entity->access_id !== ACCESS_PUBLIC && $featuresManager->has('cdn-jwt')) {
            • Mark Harding
              Mark Harding @markeharding · 1 hour ago
              Owner

              Use Common instead

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 59 minutes ago
            Core/Media/Thumbnails.php
            15 15 $this->config = $config ?: Di::_()->get('Config');
            16 16 }
            17 17
            18 public function get($guid, $size)
            18 /**
            19 * @param $entity Entities\Entity|string
            20 * @param $size
            21 * @return bool|\ElggFile|mixed|string
            22 */
            23 public function get($entity, $size)
            19 24 {
            20 $entity = Entities\Factory::build($guid);
            25 if (is_string($entity)) {
            26 $entity = Entities\Factory::build($entity);
            • Mark Harding
              Mark Harding @markeharding · 59 minutes ago
              Owner

              Can we use entitiesBuilder for spec test sanity?

            • Please register or sign in to reply
          • Mark Harding @markeharding added MR::Requires Changes scoped label 59 minutes ago

            added scoped label

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 59 minutes ago
            Core/Media/Video/Manager.php
            64 64 if (!$cmd) {
            65 65 return null;
            66 66 }
            67 if ($entity->access_id !== ACCESS_PUBLIC) {
            • Mark Harding
              Mark Harding @markeharding · 59 minutes ago
              Owner

              Common

            • Please register or sign in to reply
          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
          Emiliano Balbuena
          user avatar
          Martin Santangelo
          user avatar
          Guy Thouret
          user avatar
          Mark Harding
          user avatar
          Olivia Madrid
          user avatar
          Brian Hatchet
          user avatar
          Rami Albatal
          Reference: minds/engine!388