From a69d0a19b02485fff8939a336e181e23f61b8301 Mon Sep 17 00:00:00 2001 From: "dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Wed, 31 Mar 2004 21:07:44 +0000 Subject: [PATCH] BUILD : 1.7.0 (20) BUGS : none NOTES : Fixed MySQL double encryption if using MD5. git-svn-id: svn://svn.anope.org/anope/trunk@20 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@13 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + encrypt.h | 3 +-- extern.h | 4 ++++ mysql.c | 5 +++++ version.log | 6 +++++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 8657ff9c8..12327e3f6 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Anope Version 1.7.0 -------------------- Provided by Anope Dev. +2004/03/31 Fixed MySQL double encryption if using MD5. 2004/03/31 Implemented MySQL Phase2 (see docs/MYSQL file) 2004/03/31 Modules can now add Commands/Messages from outside of AnopeInit 2004/03/31 Fixed a bug with recersive module callbacks. diff --git a/encrypt.h b/encrypt.h index 7f449cf0c..e31e44ea7 100644 --- a/encrypt.h +++ b/encrypt.h @@ -8,10 +8,9 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: encrypt.h,v 1.4 2003/07/20 01:15:49 dane Exp $ + * $Id$ * */ extern int encrypt(const char *src, int len, char *dest, int size); -extern int encrypt_in_place(char *buf, int size); extern int check_password(const char *plaintext, const char *password); diff --git a/extern.h b/extern.h index b006a4c52..88999e855 100644 --- a/extern.h +++ b/extern.h @@ -863,5 +863,9 @@ E void db_mysql_load_exceptions(void); E void db_mysql_load_news(void); #endif +#ifdef USE_ENCRYPTION +extern int encrypt_in_place(char *buf, int size); +#endif + #endif /* EXTERN_H */ diff --git a/mysql.c b/mysql.c index 44eb07397..ff23c0b5f 100644 --- a/mysql.c +++ b/mysql.c @@ -208,6 +208,10 @@ void db_mysql_save_ns_req(NickRequest * nr) char *db_mysql_secure(char *pass) { +#ifdef USE_ENCRYPTION + /* If we use the builtin encryption don't double encrypt! */ + return sstrdup(pass); +#else char epass[BUFSIZE]; if (!pass) { @@ -226,6 +230,7 @@ char *db_mysql_secure(char *pass) } return sstrdup(epass); +#endif } diff --git a/version.log b/version.log index d484fdba0..4b78645bd 100644 --- a/version.log +++ b/version.log @@ -8,11 +8,15 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="0" -VERSION_BUILD="19" +VERSION_BUILD="20" VERSION_EXTRA="" # $Log$ # +# BUILD : 1.7.0 (20) +# BUGS : none +# NOTES : Fixed MySQL double encryption if using MD5. +# # BUILD : 1.7.0 (19) # BUGS : none # NOTES : Refixed compile error if no RDB :(