ci/bin: Remove whitespace from token files
There was a security problem with some `gitlab_gql.py` scenarios because of `\r` and `\n` in the token file, which interrupted the requests for Gitlab endpoints. Stripping the token file after reading the file content solves the problem. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18066>
This commit is contained in:
parent
d52d51b24d
commit
be3c46964b
1 changed files with 1 additions and 1 deletions
|
|
@ -123,7 +123,7 @@ def print_dag(dag: Dag) -> None:
|
|||
|
||||
def fetch_merged_yaml(gl_gql: GitlabGQL, params) -> dict[Any]:
|
||||
gitlab_yml_file = get_project_root_dir() / ".gitlab-ci.yml"
|
||||
content = Path(gitlab_yml_file).read_text()
|
||||
content = Path(gitlab_yml_file).read_text().strip()
|
||||
params["content"] = content
|
||||
raw_response = gl_gql.query("job_details.gql", params)
|
||||
if merged_yaml := raw_response["ciConfig"]["mergedYaml"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue