Skip to content

Commit be49534

Browse files
committed
Remove self-hosted credentials from keychain when Blog is deleted
1 parent 2e9e096 commit be49534

File tree

1 file changed

+5
-0
lines changed
  • WordPress/Classes/Models

1 file changed

+5
-0
lines changed

WordPress/Classes/Models/Blog.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ - (void)prepareForDeletion
105105
{
106106
[super prepareForDeletion];
107107

108+
// delete stored password in the keychain for self-hosted sites.
109+
if ([self.username length] > 0 && [self.xmlrpc length] > 0) {
110+
self.password = nil;
111+
}
112+
108113
[_xmlrpcApi invalidateAndCancelTasks];
109114
[_wordPressOrgRestApi invalidateAndCancelTasks];
110115
}

0 commit comments

Comments
 (0)