gitlab - 从gitlab的mr页面是可以看到图片的,但是通过 从gitlab webhooks中查询图片的详情接口访问返回的404

Summary

  • 客户升级前版本是 16.11,客户有集成 webhooks,客户在创建 mr 的时候会添加图片,因此会从 webhooks 的详细信息中获取图片的地址,从而在其他平台上查看
  • 但是当时客户升级后,当前版本是 17.3.+,客户用相同的方法就已经无法查看图片了,显示未 404.

Steps to reproduce

测试

  • 项目有继承 webhooks,触发来源选择“合并请求事件、评论
  • 创建 mr,在mr 中添加图片(也可以创建好 mr 之后通过评论的方式添加图片)
  • 查看 webhooks 的相应信息,获取里面的图片的 url 地址链接
  • 通过地址链接在浏览器访问

Example Project

16.11

16.11 是可以看到图片的 image

17.3.+

17.3+ 访问就 404 了 image

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

王凯旋 编辑于