Code review comment for lp:~gz/bzr/require_unicode_committer_614593

Revision history for this message
John A Meinel (jameinel) wrote :

If I were doing this, I would probably have done it deeper. Specifically "committer" is just passed into Repository.get_commit_builder(), and the commit builder code has:

        if committer is None:
            self._committer = self._config.username()
        else:
            self._committer = committer

That is probably the point where I would assert that it is properly Unicode. That may be a bit later than you would like (since the commit is pretty much finished then), but it should help prevent injection via some other path.

You could also potentially check in the Revision constructor.

Either way, we are expecting a unicode string here.

« Back to merge proposal