Re: Subject: [PATCH] g10 : passphrase.c : read_passphrase_from_fd : Strip trailing carriage return from passphrase read from file generated on windows

Werner Koch via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
On Sun, 15 Jun 2025 23:14, VAIBHAV SHARMA said:
> I have requested this patch after personally facing the issue with a
> passphrase file generated on windows as it was silently including \r in the

Please fix this outside of GnuPG.  We won't change things in GnuPG
because it was never specified what the character set is and whether the
linen ending is CR, or CR+LF.  Some software used fopen("foo","r") and
other software uses fopen("foo", "rb") or "w" and "wb" at the other
site.  Your change fixes this for you but introduces a regression for
others.


Salam-Shalom,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein

_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
openpgp-digital-signature.asc (application/pgp-signature, 247 B)
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQSHd0YfKgdOvEgNNZQZzByeCFsQegUCaE/DAA0cd2tAZ251cGcu
b3JnAAoJEBnMHJ4IWxB6qn0A/iV6M/rd2opmuG3Ug+YGSOoiUDf2rLiErSvB0sfI
4OX6AQDz8R1NWNqQk27to/k1B0ArNSbrUQgrqnGTjMUeCwFpAg==
=f5bF
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.