This repository was archived by the owner on May 5, 2023. It is now read-only.
Commit 8feb8dc
committed
Remove test_max_str_len
It appears this test was verifying a quirk of the DoS protection.
When the input is supplied via feed() BufferFull is raised to prevent
excessive memory allocation. When the input is supplied via a file
ValueError is raised when the length of the bin, str or ext is too big.
The fallback implementation had a quirk: it would raise ValueError when
the length of the is too big even when the input is supplied via feed().
As far as I can tell removing this quirk does not introduce a
vulnerability. I have fixed the quirk making this test obsolete.
This also allowed me to remove the code from the extension the appears
to serve only one purpose: make this test pass.1 parent 535fd96 commit 8feb8dc
2 files changed
Lines changed: 0 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 234 | | |
240 | 235 | | |
241 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 44 | | |
59 | 45 | | |
60 | 46 | | |
| |||
0 commit comments