• Jamie Davis's avatar
    [2.7] closes bpo-32997: Fix REDOS in fpformat (GH-5984) · 55d5bfba
    Jamie Davis yazdı
    The regex to decode a number in fpformat is susceptible to catastrophic backtracking. This is a potential DOS vector if a server is using fpformat on untrusted number strings.
    
    Replace it with an equivalent non-vulnerable regex. The match behavior of the new regex is slightly different. It captures the whole integer part of the number in one group, Leading zeros are stripped off later.
    55d5bfba