[issue37327] python re bug

2019-06-18 Thread Matthew Barnett
Matthew Barnett added the comment: The problem is the "(?:[^<]+|<(?!/head>))*?". If I simplify it a little I get "(?:[^<]+)*?", which is a repeat within a repeat. There are many ways in which it could match, and if what follows fails to match (it doesn't because there's no "

[issue37327] python re bug

2019-06-18 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: neither the banner contains "

[issue37327] python re bug

2019-06-18 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: When I run the regex on https://regex101.com/, after some small adjustments ("HTTP\/1\.0" and "\/head"), it mentions 'Catastrophic backtracking has been detected and the execution of your expression has been halted.' I don't know much about regex, but it s

[issue37327] python re bug

2019-06-17 Thread aixian le
aixian le added the comment: the code is: banner = "HTTP/1.0 404 Not Found\r\nDate: Mon, 17 Jun 2019 13:15:44 GMT\r\nServer:\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n404 Not Found\r\n404 Not Found\r\nThe requested URL /PSIA/index was not found on this server.\r

[issue37327] python re bug

2019-06-17 Thread aixian le
New submission from aixian le : the code is: banner = "HTTP/1.0 404 Not Found\r\nDate: Mon, 17 Jun 2019 13:15:44 GMT\r\nServer:\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n404 Not Found\r\n404 Not Found\r\nThe requested URL /PSIA/index was not found on this server.