Skip to content

Commit a0f249b

Browse files
authored
Merge pull request #19756 from wordpress-mobile/fix/delete-credentials-when-blog-removed
Remove self-hosted credentials from keychain when the site is removed
2 parents 249927c + be49534 commit a0f249b

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)