Skip to content
代码片段 群组 项目
该项目从 https://gitlab.com/gitlab-org/gitlab.git 镜像。 拉取镜像更新于
  1. 3月 09, 2021
  2. 3月 05, 2021
  3. 3月 03, 2021
  4. 3月 02, 2021
  5. 2月 17, 2021
  6. 2月 16, 2021
  7. 2月 10, 2021
  8. 1月 21, 2021
  9. 1月 19, 2021
  10. 1月 11, 2021
  11. 1月 06, 2021
  12. 12月 09, 2020
  13. 11月 27, 2020
  14. 11月 26, 2020
  15. 11月 20, 2020
  16. 11月 13, 2020
  17. 11月 03, 2020
  18. 10月 22, 2020
  19. 10月 15, 2020
  20. 10月 02, 2020
  21. 10月 01, 2020
  22. 9月 28, 2020
  23. 9月 21, 2020
  24. 9月 05, 2020
  25. 9月 03, 2020
  26. 9月 01, 2020
  27. 8月 21, 2020
  28. 8月 20, 2020
  29. 8月 13, 2020
  30. 8月 11, 2020
  31. 7月 16, 2020
  32. 6月 18, 2020
  33. 6月 04, 2020
  34. 6月 02, 2020
  35. 5月 28, 2020
  36. 5月 26, 2020
  37. 5月 22, 2020
  38. 5月 08, 2020
  39. 4月 11, 2020
    • Stan Hu's avatar
      Prevent filename bypass on artifact upload · 96857bf2
      Stan Hu 创作于
      The attack is outlined in
      https://gitlab.com/gitlab-org/gitlab/-/issues/213139. It exploits the
      fact that the artifacts endpoint reads `file.path` directly using
      `UploadedFile.from_params`.
      
      `file.path` can be given by the user and pass through workhorse. As
      such, it's an untrusted source and could contain the path of any file in
      `Dir.tmpdir`. This results in creating a `Ci::JobArtifact` pointing to
      an arbitrary temporary file.
      
      To counter this, this commit relies on the fact that the upload endpoint
      deals with a multipart upload. This type of uploads are handled by
      `Gitlab::Middleware::Multipart` which will read the upload file from a
      trusted source (the workhorse JWT token) and build a `UploadedFile`
      object out of it. Thus, in the Grape endpoint, we can simply read the
      param directly and validate that it's an `UploadedFile`.
      96857bf2
  40. 4月 06, 2020
加载中