Ticket #9007: fixregex.diff

File fixregex.diff, 570 bytes (added by Zarel, 6 years ago)

patch

  • TorBulkExitList.py

     
    203203
    204204    # Verify that the port is a number between 1 and 65535
    205205    # Otherwise return a sane default of 80
    206     search = re.compile("^(?:[1-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|"+\
     206    search = re.compile("^(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|"+\
    207207                            "65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$")
    208208
    209209    if search.match(user_supplied_port):