ObjXMPP  Diff

Differences From Artifact [11a4e71066]:

To Artifact [3fc8922722]:


180
181
182
183
184
185
186
187
188


189
190
191
192
193
194
195
180
181
182
183
184
185
186


187
188
189
190
191
192
193
194
195







-
-
+
+







	OFString *chal = [OFString stringWithCString: [challenge cArray]
					      length: [challenge count] *
						      [challenge itemSize]];

	enumerator =
	    [[chal componentsSeparatedByString: @","] objectEnumerator];
	while ((comp = [enumerator nextObject]) != nil) {
		OFString *entry = [comp substringFromIndex: 2
						   toIndex: [comp length]];
		OFString *entry = [comp substringWithRange:
		    of_range(2, [comp length] - 2)];

		if ([comp hasPrefix: @"r="]) {
			if (![entry hasPrefix: cNonce])
				@throw [XMPPAuthFailedException
				    newWithClass: isa
				      connection: nil
					  reason: @"Received wrong nonce"];
329
330
331
332
333
334
335
336
337


338
339
340
341
342
343
344
329
330
331
332
333
334
335


336
337
338
339
340
341
342
343
344







-
-
+
+








- (void)parseServerFinalMessage: (OFDataArray*)message
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFString *mess = [OFString stringWithCString: [message cArray]
					      length: [message count] *
						      [message itemSize]];
	OFString *value = [mess substringFromIndex: 2
					   toIndex: [mess length]];
	OFString *value = [mess substringWithRange:
	    of_range(2, [mess length] - 2)];

	if ([mess hasPrefix: @"v="]) {
		if (![value isEqual: [serverSignature stringByBase64Encoding]])
			@throw [XMPPAuthFailedException
			    newWithClass: isa
			      connection: nil
				  reason: @"Received wrong ServerSignature"];