|
20 | 20 | from thirdparty import six |
21 | 21 |
|
22 | 22 | # sqlmap version (<major>.<minor>.<month>.<monthly commit>) |
23 | | -VERSION = "1.10.9.3" |
| 23 | +VERSION = "1.10.9.4" |
24 | 24 | TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" |
25 | 25 | TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} |
26 | 26 | VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) |
|
1193 | 1193 | ("Python ElementTree", r"xml\.etree\.ElementTree\.(?:ParseError|Element)"), |
1194 | 1194 | # NOT XSLT: a dedicated '--xslt' engine owns those errors now, and claiming them here made every |
1195 | 1195 | # XSLT parser error suggest '--xpath' as well |
1196 | | - ("Generic XPath", r"XPath.*?(?:error|exception|syntax)"), |
| 1196 | + # NOTE: the gap has to stay bounded (like in 'Handlebars' below). An unbounded '.*?' turns this |
| 1197 | + # into a quadratic scan of every long line that merely carries the word 'xpath' (e.g. minified |
| 1198 | + # JS/JSON), which took ~25s on a 400KB response - and blew up the regex engine itself (#6105) |
| 1199 | + ("Generic XPath", r"XPath[^\n]{0,100}?(?:error|exception|syntax)"), |
1197 | 1200 | ("Generic XPath", r"Invalid XPath|XPath evaluation failed"), |
1198 | 1201 | ) |
1199 | 1202 |
|
|
1337 | 1340 | ("Velocity", r"org\.apache\.velocity\.(?:runtime|exception)\.\w+|ParseErrorException|MethodInvocationException|ResourceNotFoundException"), |
1338 | 1341 | ("Spring EL / Thymeleaf", r"org\.springframework\.expression\.\w+|org\.thymeleaf\.\w+|SpelEvaluationException|TemplateProcessingException|ExpressionParsingException"), |
1339 | 1342 | ("Struts2 (OGNL)", r"ognl\.(?:OgnlException|NoSuchPropertyException|MethodFailedException|InappropriateExpressionException|ExpressionSyntaxException)|com\.opensymphony\.xwork2|org\.apache\.struts2|There is no Action mapped for|Struts (?:Problem Report|has detected an unhandled exception)"), |
1340 | | - ("ERB", r"\(erb\):\d+|NameError.*undefined local variable"), |
| 1343 | + ("ERB", r"\(erb\):\d+|NameError[^\n]{0,100}?undefined local variable"), |
1341 | 1344 | # NOTE: these must stay anchored to a diagnostic. The bare product names matched any page that |
1342 | 1345 | # carries the word 'pug'/'jade'/'handlebars' (a surname, a colour, a <script src=> of the runtime), |
1343 | 1346 | # and the bare 'ParseError' matched lxml.etree.XSLTParseError and ElementTree.ParseError |
|
1361 | 1364 | ("Java (Xerces/JAXP)", r"(?:org\.xml\.sax\.SAXParseException|com\.sun\.org\.apache\.xerces|javax\.xml\.stream\.XMLStreamException|The (?:entity|element type) \"[^\"]*\" was referenced|DOCTYPE is disallowed when the feature|External (?:DTD|parsed entities|Entity): failed|\"[^\"]*\" must be declared|had to be read but the maximum)"), |
1362 | 1365 | (".NET System.Xml", r"(?:System\.Xml\.XmlException|For security reasons DTD is prohibited|Reference to undeclared entity|An error occurred while parsing EntityName|XmlTextReaderImpl)"), |
1363 | 1366 | ("Python expat", r"(?:xml\.parsers\.expat\.ExpatError|undefined entity|not well-formed \(invalid token\)|ExpatError)"), |
1364 | | - ("Ruby Nokogiri/REXML", r"(?:Nokogiri::XML::SyntaxError|REXML::ParseException|Entity .* not defined)"), |
| 1367 | + ("Ruby Nokogiri/REXML", r"(?:Nokogiri::XML::SyntaxError|REXML::ParseException|Entity [^\n]{0,100}? not defined)"), |
1365 | 1368 | ("Go encoding/xml", r"XML syntax error on line \d+"), |
1366 | 1369 | # NOTE: 'unexpected end of ...' is what every parser says, not what an XML parser says. It matched |
1367 | 1370 | # the "Unexpected end of query" of BaseX, the "Unexpected <EOF>" of GraphQL and the "Unexpected end |
|
1417 | 1420 | ("Hibernate", r"(?:unexpected (?:token:|end of subtree|AST node)|Could not (?:resolve|interpret) (?:attribute|root entity|path|property))"), |
1418 | 1421 | ("EclipseLink / JPQL", r"(?:org\.eclipse\.persistence\.exceptions\.JPQLException|Exception \[EclipseLink|Problem compiling \[|An exception occurred while creating a query)"), |
1419 | 1422 | ("JPA / JPQL", r"(?:javax|jakarta)\.persistence\.(?:PersistenceException|Query(?:Syntax|Timeout)?Exception)"), |
1420 | | - ("Generic HQL/JPQL", r"(?:HQL|JPQL|EJBQL)\b.*?(?:error|exception|syntax|not (?:mapped|resolve))"), |
| 1423 | + ("Generic HQL/JPQL", r"(?:HQL|JPQL|EJBQL)\b[^\n]{0,100}?(?:error|exception|syntax|not (?:mapped|resolve))"), |
1421 | 1424 | ) |
1422 | 1425 |
|
1423 | 1426 | HQL_ERROR_REGEX = r"(?i)(?:%s)" % '|'.join(regex for _, regex in HQL_ERROR_SIGNATURES) |
|
1484 | 1487 | # too - matching on it alone mislabelled them as RDF4J, so only the package name is kept |
1485 | 1488 | ("RDF4J / GraphDB", r"org\.eclipse\.rdf4j|org\.openrdf\.query"), |
1486 | 1489 | ("Blazegraph", r"com\.bigdata\.rdf|\bBlazegraph\b"), |
1487 | | - ("rdflib", r"rdflib\.plugins\.sparql|\bParseException\b.*?(?:SPARQL|sparql)"), |
| 1490 | + ("rdflib", r"rdflib\.plugins\.sparql|\bParseException\b[^\n]{0,100}?(?:SPARQL|sparql)"), |
1488 | 1491 | ("Stardog", r"com\.(?:complexible\.)?stardog"), |
1489 | 1492 | ) |
1490 | 1493 |
|
|
0 commit comments