summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_sqlauth.cpp6
-rwxr-xr-xsrc/svn-rev.sh2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp
index 0f5fde5f3..6a760e198 100644
--- a/src/modules/extra/m_sqlauth.cpp
+++ b/src/modules/extra/m_sqlauth.cpp
@@ -64,6 +64,10 @@ class ModuleSQLAuth : public Module
// define, but leave blank if no encryption is to be used.
WallOperFail = Conf->ReadFlag("sqlauth","verbose",0); // set to 1 if failed connects should be reported to operators
allowpattern = Conf->ReadValue("sqlauth","allowpattern",0); // allow nicks matching the pattern without requiring auth
+ if (encryption.find("(") == std::string::npos)
+ {
+ encryption.append("(");
+ }
delete Conf;
SQLModule = Srv->FindModule("m_sql.so");
if (!SQLModule)
@@ -126,7 +130,7 @@ class ModuleSQLAuth : public Module
password = temp;
// Create a request containing the SQL query and send it to m_sql.so
- std::string querystr("SELECT * FROM "+usertable+" WHERE "+userfield+"='"+username+"' AND "+passfield+"="+encryption+"('"+password+"')");
+ std::string querystr("SELECT * FROM "+usertable+" WHERE "+userfield+"='"+username+"' AND "+passfield+"="+encryption+"'"+password+"')");
Srv->Log(DEBUG, "m_sqlauth.so: Query: " + querystr);
diff --git a/src/svn-rev.sh b/src/svn-rev.sh
index a55b557e7..14c28d3b3 100755
--- a/src/svn-rev.sh
+++ b/src/svn-rev.sh
@@ -1 +1 @@
-echo 3546
+echo 3548