mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 10:32:26 +00:00
Bugfix & add check for whether to use custom string or not
Remove local scope variable hiding the one in function scope. Also did not check for the state of the custom characters button.
This commit is contained in:
@@ -106,13 +106,13 @@ static NSString *mergeWithoutDuplicates(NSString* baseCharacters, NSString* cust
|
|||||||
|
|
||||||
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters orCustomCharacters:(NSString *)customCharacters {
|
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters orCustomCharacters:(NSString *)customCharacters {
|
||||||
NSString *characters = nil;
|
NSString *characters = nil;
|
||||||
if(nil == customCharacters) {
|
if([[NSUserDefaults standardUserDefaults] boolForKey:kMPSettingsKeyPasswordUseCustomString] && nil != customCharacters) {
|
||||||
characters = allowedCharactersString(allowedCharacters);
|
characters = mergeWithoutDuplicates(
|
||||||
|
allowedCharactersString(allowedCharacters),
|
||||||
|
customCharacters);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NSString *characters = mergeWithoutDuplicates(
|
characters = allowedCharactersString(allowedCharacters);
|
||||||
allowedCharactersString(allowedCharacters),
|
|
||||||
customCharacters);
|
|
||||||
}
|
}
|
||||||
CGFloat alphabetCount = characters.length;
|
CGFloat alphabetCount = characters.length;
|
||||||
CGFloat passwordLength = self.length;
|
CGFloat passwordLength = self.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user