Re: Regression: git send-email fails with "Use of uninitialized value $address" + "unable to extract a valid address"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 24, 2023 at 10:43:18PM +0200, Uwe Kleine-König wrote:

> I debugged a bit and if I do
> 
> 	mv .git/hooks/sendemail-validate .git/hooks/sendemail-validate.bak
> 
> git send-email --to 'Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>'
> starts to work for me, too.
> 
> I'd guess the content of my sendemail-validate script doesn't matter
> much, but for the record, it's:
> 
> 	#!/bin/sh
> 	# installed by patatt install-hook
> 	patatt sign --hook "${1}"
> 
> Does the problem reproduce on your end with a sendemail-validate script?

I can reproduce with:

  git init
  echo foo >file && git add file && git commit -m foo
  echo 'exit 0' >.git/hooks/sendemail-validate
  chmod +x .git/hooks/sendemail-validate
  git send-email --dry-run --to='pëff <peff@xxxxxxxx>' -1

Note that the bug will only trigger if Email::Valid is installed. I
think this is the same issue being discussed elsewhere. The call to
process_address_list() sanitizes it to use rfc2047 encoding, which is
necessary for it to be syntactically valid.

So the patch to move the validation later in the process here:

  https://lore.kernel.org/git/ee56c4df-e030-45f9-86a9-94fb3540db60@xxxxxxx/

fixes it.

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux