]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2006/005154.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2006 / 005154.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] ircservices-5.0.57 convert-db utility crashes when
5 converting from anope db.
6 </TITLE>
7 <LINK REL="Index" HREF="index.html" >
8 <LINK REL="made" HREF="mailto:ircservices%40ircservices.esper.net?Subject=%5BIRCServices%5D%20ircservices-5.0.57%20convert-db%20utility%20crashes%20when%0A%09converting%20from%20anope%20db.&In-Reply-To=2614.24.179.41.151.1150771401.squirrel%40www.solid-ircd.com">
9 <META NAME="robots" CONTENT="index,nofollow">
10 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
11 <LINK REL="Previous" HREF="005153.html">
12 <LINK REL="Next" HREF="005155.html">
13 </HEAD>
14 <BODY BGCOLOR="#ffffff">
15 <H1>[IRCServices] ircservices-5.0.57 convert-db utility crashes when
16 converting from anope db.</H1>
17 <B>Andrew Church</B>
18 <A HREF="mailto:ircservices%40ircservices.esper.net?Subject=%5BIRCServices%5D%20ircservices-5.0.57%20convert-db%20utility%20crashes%20when%0A%09converting%20from%20anope%20db.&In-Reply-To=2614.24.179.41.151.1150771401.squirrel%40www.solid-ircd.com"
19 TITLE="[IRCServices] ircservices-5.0.57 convert-db utility crashes when
20 converting from anope db.">achurch at achurch.org
21 </A><BR>
22 <I>Wed Jun 21 12:49:17 PDT 2006</I>
23 <P><UL>
24 <LI>Previous message: <A HREF="005153.html">[IRCServices] ircservices-5.0.57 convert-db utility crashes
25 when converting from anope db.
26 </A></li>
27 <LI>Next message: <A HREF="005155.html">[IRCServices] ircservices-5.0.57 convert-db utility crashes
28 when converting from anope db.
29 </A></li>
30 <LI> <B>Messages sorted by:</B>
31 <a href="date.html#5154">[ date ]</a>
32 <a href="thread.html#5154">[ thread ]</a>
33 <a href="subject.html#5154">[ subject ]</a>
34 <a href="author.html#5154">[ author ]</a>
35 </LI>
36 </UL>
37 <HR>
38 <!--beginarticle-->
39 <PRE> Okay, I took a look and (with a pointer from Craig McLure) discovered
40 that Anope still has the bug present in old versions of IRC Services (and
41 fixed in Services 4.5) which causes passwords to be encrypted incorrectly.
42 Try applying the patch below to your copy of Services; if it works, I'll
43 release a new version of Services with the patch included.
44
45 --Andrew Church
46 <A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices">achurch at achurch.org</A>
47 <A HREF="http://achurch.org/">http://achurch.org/</A>
48
49 ---------------------------------------------------------------------------
50
51 Index: defs.h
52 ===================================================================
53 RCS file: /var/local/cvsroot/ircservices/defs.h,v
54 retrieving revision 2.29.2.3
55 diff -u -r2.29.2.3 defs.h
56 --- defs.h 8 Jan 2006 16:48:11 -0000 2.29.2.3
57 +++ defs.h 21 Jun 2006 04:05:47 -0000
58 @@ -41,6 +41,14 @@
59 * only). These commands are undocumented; &quot;use the source, Luke!&quot; */
60 #define DEBUG_COMMANDS
61
62 +
63 +/******** Other configuration ********/
64 +
65 +/* Define this to enable compatibility mode for encrypted passwords as
66 + * used in the Epona and Anope (through at least version 1.7.14) programs.
67 + * Note that this may have a detrimental effect on password security. */
68 +#define ANOPE_MD5_HACK
69 +
70 /*************************************************************************/
71 /******************* END OF USER-CONFIGURABLE SECTION ********************/
72 /*************************************************************************/
73 Index: modules/encryption/md5.c
74 ===================================================================
75 RCS file: /var/local/cvsroot/ircservices/modules/encryption/md5.c,v
76 retrieving revision 2.11.2.4
77 diff -u -r2.11.2.4 md5.c
78 --- modules/encryption/md5.c 8 Jan 2006 16:48:13 -0000 2.11.2.4
79 +++ modules/encryption/md5.c 21 Jun 2006 04:05:47 -0000
80 @@ -16,6 +16,10 @@
81
82 static Module *module;
83
84 +#ifdef ANOPE_MD5_HACK
85 +# define XTOI(c) ((c)&gt;9 ? (c)-'A'+10 : (c)-'0')
86 +#endif
87 +
88 /*************************************************************************/
89
90 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
91 @@ -335,8 +339,6 @@
92
93 /* Our own high-level routines. See encrypt.h for documentation. */
94
95 -#define XTOI(c) ((c)&gt;9 ? (c)-'A'+10 : (c)-'0')
96 -
97 static int md5_encrypt(const char *src, int len, char *dest, int size)
98 {
99 MD5_CTX context;
100 @@ -376,11 +378,21 @@
101 static int md5_check_password(const char *plaintext, const char *password)
102 {
103 char buf[BUFSIZE];
104 +#ifdef ANOPE_MD5_HACK
105 + char tmpbuf[8];
106 + int i;
107 +#endif
108
109 if (encrypt(plaintext, strlen(plaintext), buf, sizeof(buf)) &lt; 0)
110 return -1;
111 if (memcmp(buf, password, 16) == 0)
112 return 1;
113 +#ifdef ANOPE_MD5_HACK
114 + for (i = 0; i &lt; 16; i += 2)
115 + tmpbuf[i/2] = XTOI(buf[i])&lt;&lt;4 | XTOI(buf[i+1]);
116 + if (memcmp(tmpbuf, password, 8) == 0)
117 + return 1;
118 +#endif
119 return 0;
120 }
121
122 </PRE>
123
124
125 <!--endarticle-->
126 <HR>
127 <P><UL>
128 <!--threads-->
129 <LI>Previous message: <A HREF="005153.html">[IRCServices] ircservices-5.0.57 convert-db utility crashes
130 when converting from anope db.
131 </A></li>
132 <LI>Next message: <A HREF="005155.html">[IRCServices] ircservices-5.0.57 convert-db utility crashes
133 when converting from anope db.
134 </A></li>
135 <LI> <B>Messages sorted by:</B>
136 <a href="date.html#5154">[ date ]</a>
137 <a href="thread.html#5154">[ thread ]</a>
138 <a href="subject.html#5154">[ subject ]</a>
139 <a href="author.html#5154">[ author ]</a>
140 </LI>
141 </UL>
142
143 </body></html>