projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eae4995
)
fix idlib.could_be_base32_encoded_l() to accept *only* valid strings
author
Zooko O'Whielacronx
<zooko@zooko.com>
Thu, 3 Jan 2008 18:43:11 +0000
(11:43 -0700)
committer
Zooko O'Whielacronx
<zooko@zooko.com>
Thu, 3 Jan 2008 18:43:11 +0000
(11:43 -0700)
src/allmydata/util/idlib.py
patch
|
blob
|
history
diff --git
a/src/allmydata/util/idlib.py
b/src/allmydata/util/idlib.py
index a972b22e751822239a2d70a4a048826ce0e72e5c..8432f5801d3e3cf3224d645c7e8d67c8a3486385 100644
(file)
--- a/
src/allmydata/util/idlib.py
+++ b/
src/allmydata/util/idlib.py
@@
-161,9
+161,9
@@
s8 = init_s8()
# string tells whether the final character is reasonable.
def init_s5():
s5 = []
- add_check_array(
chars
, s5)
- for lenmod5 in
(1, 2, 3, 4,)
:
- add_check_array(get_trailing_chars_without_lsbs(
4
-lenmod5), s5)
+ add_check_array(
get_trailing_chars_without_lsbs(0)
, s5)
+ for lenmod5 in
[1,2,3,4]
:
+ add_check_array(get_trailing_chars_without_lsbs(
5
-lenmod5), s5)
return tuple(s5)
s5 = init_s5()