-
Bug
-
Resolution: Unresolved
-
Minor
-
None
It is a follow-up to https://github.com/jenkinsci/git-plugin/pull/484#discussion_r105220902
BuildData exposes public API for contributing remoteUrls as strings, but there is no trimming of incoming values.
> Similarity check for remote URL lists... We may also get false negative if values like "
{remoteUrl}" and " {remoteUrl}" sneak into the set (due to the size check above). I would vote for explicit trimming of strings in places like https://github.com/stephenc/git-plugin/blob/b8f94dfed07e996e87dff4f27615bc82ff8103c3/src/main/java/hudson/plugins/git/util/BuildData.java#L77 and https://github.com/stephenc/git-plugin/blob/b8f94dfed07e996e87dff4f27615bc82ff8103c3/src/main/java/hudson/plugins/git/util/BuildData.java#L208 . Ant to the original code
I believe that the normalization of BuildData remote URL's which was added in a recent version should be enough to handle the case of whitespace differences. It probably won't handle the expanded parameter case.