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