From 027b437d5a47aa27fc63411dfb735324de72dfd1 Mon Sep 17 00:00:00 2001 From: rfm Date: Wed, 4 Dec 2013 15:06:24 +0000 Subject: [PATCH] fixup credential equality check git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37430 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 +++++++- Source/NSURLCredential.m | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8131a636..b0210abac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ +2013-12-04 Richard Frith-Macdonald + + * Source/NSURLCredential.m: ([-isEqual:]) needs to take the password + and persistence into account, not just the username. + 2013-11-29 Riccardo Mottola * Headers/ObjectiveC2/objc/runtime.h * Headers/Foundation/NSObjCRuntime.h - Insert some kludge for PTR stuff on systems with fake C99 compatible headers. + Insert some kludge for PTR stuff on systems with fake C99 + compatible headers. 2013-11-26 Riccardo Mottola diff --git a/Source/NSURLCredential.m b/Source/NSURLCredential.m index 0dad0acec..f8fcbc1b7 100644 --- a/Source/NSURLCredential.m +++ b/Source/NSURLCredential.m @@ -132,7 +132,9 @@ typedef struct { { return NO; } - return [[(NSURLCredential*)other user] isEqualToString: this->user]; + return [[(NSURLCredential*)other user] isEqualToString: this->user] + && [[(NSURLCredential*)other password] isEqualToString: this->password] + && [(NSURLCredential*)other persistence] == this->persistence; } - (NSString *) password