Skip to content
代码片段 群组 项目
未验证 提交 f3547556 编辑于 作者: Stan Hu's avatar Stan Hu 提交者: GitLab
浏览文件

Fix Rack Attack incorrectly rate limiting runner API

To update a job status, the runner uses the PUT /api/v4/:jobs endpoint
with the job token in two places:

1. The PRIVATE-TOKEN header
2. The `token` parameter in the JSON body

Previously `AuthFinders` looked up the PAT and raised an unauthorized
exception because no user was found. Instead, it should continue to
see if it can authenticate the job with the `token` parameter.

This commit makes `access_token` return blank if it has the CI build
token prefix so that the exception is not raised. That way Rack Attack
can then ensure the request is authenticated with the job token.

Changelog: fixed
上级 212741ae
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册