@@ -1230,15 +1230,21 @@ pyexpat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold
12301230
12311231Sets the number of output bytes needed to activate protection against billion laughs attacks.
12321232
1233+ The number of output bytes includes amplification from entity expansion
1234+ and reading DTD files.
1235+
12331236Parser objects usually have a protection activation threshold of 8 MiB,
12341237but the actual default value depends on the underlying Expat library.
1238+
1239+ Activation thresholds below 4 MiB are known to break support for DITA 1.3
1240+ payload and are hence not recommended.
12351241[clinic start generated code]*/
12361242
12371243static PyObject *
12381244pyexpat_xmlparser_SetBillionLaughsAttackProtectionActivationThreshold_impl (xmlparseobject * self ,
12391245 PyTypeObject * cls ,
12401246 unsigned long long threshold )
1241- /*[clinic end generated code: output=0c082342f1c78114 input=a420a76f682ffc76 ]*/
1247+ /*[clinic end generated code: output=0c082342f1c78114 input=fa2f91f26b62a42a ]*/
12421248{
12431249 return set_activation_threshold (
12441250 self , cls , threshold ,
@@ -1277,7 +1283,7 @@ static PyObject *
12771283pyexpat_xmlparser_SetBillionLaughsAttackProtectionMaximumAmplification_impl (xmlparseobject * self ,
12781284 PyTypeObject * cls ,
12791285 float max_factor )
1280- /*[clinic end generated code: output=c590439eadf463fa input=c5bae55c9b25d045 ]*/
1286+ /*[clinic end generated code: output=c590439eadf463fa input=cc1e97c1fd2bd950 ]*/
12811287{
12821288 return set_maximum_amplification (
12831289 self , cls , max_factor ,
@@ -1306,7 +1312,7 @@ static PyObject *
13061312pyexpat_xmlparser_SetAllocTrackerActivationThreshold_impl (xmlparseobject * self ,
13071313 PyTypeObject * cls ,
13081314 unsigned long long threshold )
1309- /*[clinic end generated code: output=bed7e93207ba08c5 input=54182cd71ad69978 ]*/
1315+ /*[clinic end generated code: output=bed7e93207ba08c5 input=b7a7a3e3d054286a ]*/
13101316{
13111317 return set_activation_threshold (
13121318 self , cls , threshold ,
@@ -1345,7 +1351,7 @@ static PyObject *
13451351pyexpat_xmlparser_SetAllocTrackerMaximumAmplification_impl (xmlparseobject * self ,
13461352 PyTypeObject * cls ,
13471353 float max_factor )
1348- /*[clinic end generated code: output=6e44bd48c9b112a0 input=aac2029e96e80b03 ]*/
1354+ /*[clinic end generated code: output=6e44bd48c9b112a0 input=c6af7ccb76ae5c6b ]*/
13491355{
13501356 return set_maximum_amplification (
13511357 self , cls , max_factor ,
0 commit comments