diff --git a/MacPass/AutotypeCandidateSelectionViewController.xib b/MacPass/AutotypeCandidateSelectionView.xib
similarity index 82%
rename from MacPass/AutotypeCandidateSelectionViewController.xib
rename to MacPass/AutotypeCandidateSelectionView.xib
index d66ccf74..a48f3fb5 100644
--- a/MacPass/AutotypeCandidateSelectionViewController.xib
+++ b/MacPass/AutotypeCandidateSelectionView.xib
@@ -23,14 +23,14 @@
-
+
-
+
@@ -41,16 +41,21 @@
-
+
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -58,7 +63,8 @@
-
+
+
@@ -72,14 +78,14 @@
-
+
-
+
-
+
@@ -101,6 +107,9 @@
Gw
+
+
+
@@ -130,4 +142,7 @@ DQ
+
+
+
diff --git a/MacPass/Base.lproj/AutotypeCandidateSelectionWindow.xib b/MacPass/Base.lproj/AutotypeCandidateSelectionWindow.xib
deleted file mode 100644
index 882289ee..00000000
--- a/MacPass/Base.lproj/AutotypeCandidateSelectionWindow.xib
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MacPass/MPAutotypeContext.h b/MacPass/MPAutotypeContext.h
index 0def87e9..a100789b 100644
--- a/MacPass/MPAutotypeContext.h
+++ b/MacPass/MPAutotypeContext.h
@@ -44,6 +44,10 @@
* Command with placeholders and references resolved
*/
@property (nonatomic, readonly, copy) NSString *evaluatedCommand;
+/**
+ @return command with placeholders and references resolved but masked password placeholder
+ */
+@property (nonatomic, readonly, copy) NSString *maskedEvaluatedCommand;
/**
* @return YES if valid, NO otherwise
*/
diff --git a/MacPass/MPAutotypeContext.m b/MacPass/MPAutotypeContext.m
index 074fd2fe..2603cf31 100644
--- a/MacPass/MPAutotypeContext.m
+++ b/MacPass/MPAutotypeContext.m
@@ -26,6 +26,7 @@
@interface MPAutotypeContext () {
NSString *_evaluatedCommand;
+ NSString *_maskedEvaluatedCommand;
}
@end
@@ -69,6 +70,16 @@
return _evaluatedCommand;
}
+- (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 *)description {
return [NSString stringWithFormat:@"command:%@\nnormalized:%@\nevaluated:%@\nentry.title:%@\nentry.uuid:%@\n",
self.command,