mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
masked value should not be cached since it might include references
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
|
||||
@interface MPAutotypeContext () {
|
||||
NSString *_evaluatedCommand;
|
||||
NSString *_maskedEvaluatedCommand;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -71,13 +70,10 @@
|
||||
}
|
||||
|
||||
- (NSString *)maskedEvaluatedCommand {
|
||||
if(!_maskedEvaluatedCommand) {
|
||||
NSString *passwordPlaceholder = [NSString stringWithFormat:@"{%@}",kKPKPasswordKey];
|
||||
NSString *normalized = self.normalizedCommand;
|
||||
NSString *masked = [normalized stringByReplacingOccurrencesOfString:passwordPlaceholder withString:@"•••••" options:NSCaseInsensitiveSearch range:NSMakeRange(0, normalized.length)];
|
||||
_maskedEvaluatedCommand = [[masked kpk_finalValueForEntry:self.entry] copy];
|
||||
}
|
||||
return _maskedEvaluatedCommand;
|
||||
NSString *passwordPlaceholder = [NSString stringWithFormat:@"{%@}",kKPKPasswordKey];
|
||||
NSString *normalized = self.normalizedCommand;
|
||||
NSString *masked = [normalized stringByReplacingOccurrencesOfString:passwordPlaceholder withString:@"•••" options:NSCaseInsensitiveSearch range:NSMakeRange(0, normalized.length)];
|
||||
return [[masked kpk_finalValueForEntry:self.entry] copy];
|
||||
}
|
||||
|
||||
- (NSString *)description {
|
||||
|
||||
Reference in New Issue
Block a user