Skip to content

Unable to parse link to update line number: invalid control character in URL #3729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rgmz opened this issue Dec 4, 2024 · 3 comments
Open
Labels

Comments

@rgmz
Copy link
Contributor

rgmz commented Dec 4, 2024

Observed Behaviour

This repository has a file with a control character (\r) in the file name:

diff --git "a/\rexit" "b/\rexit"
new file mode 100644
index 0000000000..8e1cc8374c
--- /dev/null
+++ "b/\rexit"

Resulting in the following error:

2024-12-04T12:55:42Z    error   trufflehog      unable to parse link to update line number      {"detector_worker_id": "Js4ie", "detector": {"type":"PrivateKey"}, "timeout": 60, "link": "https://github.com/ibm-developer-skills-network/jbbmo-Introduction-to-Git-and-GitHub/blob/b8938b6ea34624d7376285d1f47b577dac9e2619/\rexit#L1", "link": "https://github.com/ibm-developer-skills-network/jbbmo-Introduction-to-Git-and-GitHub/blob/b8938b6ea34624d7376285d1f47b577dac9e2619/\rexit#L1", "error": "parse \"https://github.com/ibm-developer-skills-network/jbbmo-Introduction-to-Git-and-GitHub/blob/b8938b6ea34624d7376285d1f47b577dac9e2619/\\rexit\": net/url: invalid control character in URL"}

Expected Behaviour

This ought to be encoded as https://github.com/ibm-developer-skills-network/jbbmo-Introduction-to-Git-and-GitHub/blob/b8938b6ea34624d7376285d1f47b577dac9e2619/%0Dexit

Related

#2214

@rgmz rgmz added the bug label Dec 4, 2024
@kashifkhan0771
Copy link
Contributor

Fixed in: #2214

@rgmz
Copy link
Contributor Author

rgmz commented Apr 22, 2025

@kashifkhan0771 that PR fixes a different link parsing issue.

@kashifkhan0771
Copy link
Contributor

Ok my bad. I thought it's added in related so probably fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants