String inputs should be clearly defined and validated in commit builder
Bug #663593 reported by
Martin Packman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
The commit builder code makes some effort to validate its inputs, but is not clear over whether strings should be bytes or unicode. It appears to expect either, but bug 614593 showed that it can let bytestrings through that lower level code then chokes on. Generally user input through bzr will be decoded to unicode already, but plugins and tests particularly may be using plain str, generally as ascii which is harmless. However, as it appears non-ascii bytestrings may go undetected and potentially break things, it should perhaps be stricter.
Changed in bzr: | |
importance: | Undecided → Low |
status: | New → Confirmed |
tags: | added: check-for-breezy |
To post a comment you must log in.
On Wed, Oct 20, 2010 at 12:14 PM, Martin [gz] <email address hidden> wrote:
> Public bug reported:
>
> The commit builder code makes some effort to validate its inputs, but is
> not clear over whether strings should be bytes or unicode. It appears to
> expect either, but bug 614593 showed that it can let bytestrings through
> that lower level code then chokes on. Generally user input through bzr
> will be decoded to unicode already, but plugins and tests particularly
> may be using plain str, generally as ascii which is harmless. However,
> as it appears non-ascii bytestrings may go undetected and potentially
> break things, it should perhaps be stricter.
Perhaps a default cast to unicode in the test layer will help -
controllable for the case where you want corrupt bytestrings ;)
-Rob