git-vanity-sha icon indicating copy to clipboard operation
git-vanity-sha copied to clipboard

argv[0] could use some sanity checks

Open alexandruavadanii opened this issue 7 years ago • 2 comments

git vanity-sha test will spend a lot of cycles before bailing out without a match, when it could have simply complained the required pattern is not valid hex. This should be easy to fix, but I'm not fluent in Ruby, so I'll refrain from submitting a PR.

alexandruavadanii avatar Apr 28 '18 18:04 alexandruavadanii

Fail early if:

  target_prefix =~ /^[a-f0-9]+$/

?

misternu avatar Apr 28 '18 21:04 misternu

This should be easy to fix, but I'm not fluent in Ruby, so I'll refrain from submitting a PR.

No need to be fluent! Go for it! If there was one place to try submitting a Ruby PR it's this one

mattbaker avatar May 11 '18 05:05 mattbaker