Commit c5b242f
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
1 parent daa82d0 commit c5b242f
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 | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
938 | 942 | | |
939 | 943 | | |
940 | 944 | | |
| |||
1039 | 1043 | | |
1040 | 1044 | | |
1041 | 1045 | | |
1042 | | - | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
1043 | 1050 | | |
1044 | 1051 | | |
1045 | 1052 | | |
| |||
1051 | 1058 | | |
1052 | 1059 | | |
1053 | 1060 | | |
1054 | | - | |
| 1061 | + | |
1055 | 1062 | | |
1056 | 1063 | | |
1057 | 1064 | | |
| |||
1101 | 1108 | | |
1102 | 1109 | | |
1103 | 1110 | | |
| 1111 | + | |
1104 | 1112 | | |
1105 | 1113 | | |
1106 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
1107 | 1117 | | |
1108 | 1118 | | |
1109 | 1119 | | |
| |||
1125 | 1135 | | |
1126 | 1136 | | |
1127 | 1137 | | |
1128 | | - | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1129 | 1142 | | |
1130 | 1143 | | |
1131 | 1144 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
| 1339 | + | |
1339 | 1340 | | |
1340 | 1341 | | |
1341 | 1342 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments