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