mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-29 12:39:20 +08:00
Fixes CI/CD issues
This commit is contained in:
@@ -20,7 +20,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.10.6"
|
||||
VERSION = "1.10.10.7"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
||||
@@ -257,7 +257,7 @@ class TestCustomSqlFile(_GenericBase):
|
||||
handle, filename = tempfile.mkstemp(suffix=suffix)
|
||||
os.close(handle)
|
||||
self.addCleanup(os.unlink, filename)
|
||||
with io.open(filename, "w", encoding="utf-8") as f:
|
||||
with io.open(filename, "w", encoding="utf-8", newline="") as f:
|
||||
f.write(content)
|
||||
|
||||
set_dbms("MySQL")
|
||||
@@ -290,6 +290,10 @@ class TestCustomSqlFile(_GenericBase):
|
||||
query = u"SELECT 'a;\n b'"
|
||||
self.assertEqual(self._runSqlFile(query), [query])
|
||||
|
||||
def test_sqlfile_preserves_crlf_literal(self):
|
||||
query = u"SELECT 'a;\r\n b'"
|
||||
self.assertEqual(self._runSqlFile(query + u";\r\nSELECT 2;"), [query, "SELECT 2"])
|
||||
|
||||
def test_sqlfile_newline_separated_selects(self):
|
||||
self.assertEqual(self._runSqlFile(u"SELECT 'a;b'\nSELECT 2\n"), ["SELECT 'a;b'", "SELECT 2"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user