add should refuse bad filenames
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Bazaar |
Medium
|
Unassigned | ||
| Breezy |
Medium
|
Jelmer Vernooij |
Bug Description
WHAT HAPPENED:
When a directory name that consisted of a single
control character (control-C was observed) was seen
by a 'bzr add' command, some subsequent commands
failed with an error in ElementTree(
ANALYSIS:
I examined .bzr/checkout/
in an error message and found a name element that looked like it contained '^C'. Upon examining the directory on the disk, I found a directory with a questionable, single-character name. Deleting it and starting clean with bzr got around the problem.
FIX:
Either the name should be canonicalized (encoded in
a safe form that all code which uses it knows about),
and/or a warning should be provided when the file/directory is first "bzr added".
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Fábio (machado2) wrote : | #2 |
Now bzr.dev throws an exception when I add a file with an invalid filename, at mutabletree.py.
I didnt understand why its doing it, as the same line of code "for subf in sorted(
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/home/
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
no_recurse, action=action, save=not dry_run)
File "/home/
return unbound(self, *args, **kwargs)
File "/home/
for subf in sorted(
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)
bzr 0.19.0dev0 on python 2.5.1.final.0 (linux2)
arguments: ['/home/
** please send this report to <email address hidden>
tags: | added: add |
tags: | added: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: |
added: filenames removed: check-for-breezy |
Jelmer Vernooij (jelmer) wrote : | #3 |
FWIW newer versions of Bazaar/Breezy will happily add Ctrl+C characters.
We should probably raise an understandable exception though, on older platforms.
Changed in brz: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
milestone: | none → 3.0.0 |
Changed in brz: | |
milestone: | 3.0.0 → 3.1.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David R Dick wrote: ).parse. inventory at a line referenced
> Public bug reported:
>
> WHAT HAPPENED:
> When a directory name that consisted of a single
> control character (control-C was observed) was seen
> by a 'bzr add' command, some subsequent commands
> failed with an error in ElementTree(
>
> ANALYSIS:
> I examined .bzr/checkout/
> in an error message and found a name element that looked like it contained '^C'. Upon examining the directory on the disk, I found a directory with a questionable, single-character name. Deleting it and starting clean with bzr got around the problem.
>
> FIX:
> Either the name should be canonicalized (encoded in
> a safe form that all code which uses it knows about),
> and/or a warning should be provided when the file/directory is first "bzr added".
This root cause of this problem is that we store this data in XML, and
XML1.0 doesn't permit most ASCII control codes.
Aaron enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://
iD8DBQFFBeM+ 0F+nu1YWqI0RAgl DAJwMDlH93/ nV1o6lTLIDd5UVX as4wACeK8r4 zlx6JWLc=
rJUJKZCajmqPVWe
=z+4k
-----END PGP SIGNATURE-----