Major enhancement to directly connect to the dbms without passing via a sql injection: adapted code accordingly - see #158. This feature relies on python third-party libraries to be able to connect to the database. For the moment it has been implemented for MySQL (with python-mysqldb module) and PostgreSQL (with python-psycopg2 module).

Minor layout adjustments.
This commit is contained in:
Bernardo Damele
2010-03-26 23:23:25 +00:00
parent 4ca1adba2c
commit 1416cd0d86
32 changed files with 791 additions and 122 deletions

View File

@@ -32,6 +32,8 @@ import sys
import struct
import urllib
from lib.core.data import conf
def base64decode(string):
return string.decode("base64")
@@ -77,6 +79,9 @@ def urldecode(string):
return result
def urlencode(string, safe=":/?%&=", convall=False):
if conf.direct:
return string
result = None
if string is None: