Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2015 10:40:31 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests
Message-ID:  <20151203094031.GG20169@ivaldir.etoilebsd.net>
In-Reply-To: <86lh9bubru.fsf@desk.des.no>
References:  <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> <86egf4uegi.fsf@desk.des.no> <20151203083556.GF20169@ivaldir.etoilebsd.net> <86lh9bubru.fsf@desk.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help

--xs+9IvWevLaxKUtW
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 03, 2015 at 10:22:45AM +0100, Dag-Erling Sm=F8rgrav wrote:
> Baptiste Daroussin <bapt@FreeBSD.org> writes:
> > Dag-Erling Sm=F8rgrav <des@des.no> writes:
> > > Baptiste Daroussin <bapt@FreeBSD.org> writes:
> > > > Or a fix can be made, if you provide an example of the failing case=
, I
> > > > would be able to fix it and add it to the regression tests.
> > > Any operation that specifies a GECOS containing multibyte characters.
> > Right so it is fixed.
>=20
> Not really.  After your latest commit, it will appear to work, but it
> will still be broken.  A proper fix would entail converting all input to
> wide strings, validating it as such and converting back before output.
> Also, the validation is based on blacklisting specific characters which
> are considered unsafe instead of whitelisting those that are known to be
> safe.

Yes but that was already broken before my work, so doing that would be an
entirely new and willing project but in term of "regression" the regression=
 has
been fixed. reverting the work I have done will not change that.

The interesting thing is the validator was there before my changes, and not
changed at all in the process of adding validation, so depending on the com=
mand
you were using your multibyte input for gecos may or may not have been reje=
cted
already! the behaviour we have now is better in the sense that it is consis=
tent
in that regards. So imho reverting is really not needed.

Now if one wants to make that properly handled using wide char, then you ha=
ve a
lot of tools and interfaces to work on not only pw(8)

Best regards,
Bapt

--xs+9IvWevLaxKUtW
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlZgDg8ACgkQ8kTtMUmk6ExvXgCdFsbGhb63hB6KsPlVPgMWCrLP
BJsAnA6iZCBEv7x1GJBCAMfjwSejODVd
=vyYi
-----END PGP SIGNATURE-----

--xs+9IvWevLaxKUtW--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151203094031.GG20169>