Commit ea21389
…aders. (GH-15239)
Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
- a case without trailing whitespace
- an invalid encoded word
https://bugs.python.org/issue37764
This fix should also be backported to 3.7 and 3.8
https://bugs.python.org/issue37764
(cherry picked from commit c5b242f)
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
https://bugs.python.org/issue37764
1 parent 4805805 commit ea21389
File tree
5 files changed
+55
-3
lines changed- Lib
- email
- test/test_email
- Misc
- NEWS.d/next/Security
5 files changed
+55
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
936 | 940 | | |
937 | 941 | | |
938 | 942 | | |
| |||
1037 | 1041 | | |
1038 | 1042 | | |
1039 | 1043 | | |
1040 | | - | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1041 | 1048 | | |
1042 | 1049 | | |
1043 | 1050 | | |
| |||
1049 | 1056 | | |
1050 | 1057 | | |
1051 | 1058 | | |
1052 | | - | |
| 1059 | + | |
1053 | 1060 | | |
1054 | 1061 | | |
1055 | 1062 | | |
| |||
1099 | 1106 | | |
1100 | 1107 | | |
1101 | 1108 | | |
| 1109 | + | |
1102 | 1110 | | |
1103 | 1111 | | |
1104 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
1105 | 1115 | | |
1106 | 1116 | | |
1107 | 1117 | | |
| |||
1123 | 1133 | | |
1124 | 1134 | | |
1125 | 1135 | | |
1126 | | - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1127 | 1140 | | |
1128 | 1141 | | |
1129 | 1142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
386 | 402 | | |
387 | 403 | | |
388 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5381 | 5381 | | |
5382 | 5382 | | |
5383 | 5383 | | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
| 5393 | + | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
| 5401 | + | |
| 5402 | + | |
| 5403 | + | |
| 5404 | + | |
5384 | 5405 | | |
5385 | 5406 | | |
5386 | 5407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
| 1310 | + | |
1310 | 1311 | | |
1311 | 1312 | | |
1312 | 1313 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments