summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kim/agent/mac/AuthenticationController.h2
-rw-r--r--src/kim/agent/mac/AuthenticationController.m24
2 files changed, 26 insertions, 0 deletions
diff --git a/src/kim/agent/mac/AuthenticationController.h b/src/kim/agent/mac/AuthenticationController.h
index b443d8a73..ba0b21223 100644
--- a/src/kim/agent/mac/AuthenticationController.h
+++ b/src/kim/agent/mac/AuthenticationController.h
@@ -114,5 +114,7 @@
- (void) swapView: (NSView *) aView;
- (void) showSpinny;
- (void) hideSpinny;
+- (void) clearSensitiveInputs;
+- (void) clearAllInputs;
@end
diff --git a/src/kim/agent/mac/AuthenticationController.m b/src/kim/agent/mac/AuthenticationController.m
index 07449f876..8df6396fe 100644
--- a/src/kim/agent/mac/AuthenticationController.m
+++ b/src/kim/agent/mac/AuthenticationController.m
@@ -223,6 +223,23 @@
forKeyPath:accepting_input_keypath];
}
+- (void) clearSensitiveInputs
+{
+ [glueController setValue:@""
+ forKeyPath:prompt_response_keypath];
+}
+
+- (void) clearAllInputs
+{
+ [glueController setValue:@""
+ forKeyPath:old_password_keypath];
+ [glueController setValue:@""
+ forKeyPath:new_password_keypath];
+ [glueController setValue:@""
+ forKeyPath:verify_password_keypath];
+ [self clearSensitiveInputs];
+}
+
- (void) showEnterIdentity: (NSWindow *) parentWindow
{
kim_error err = KIM_NO_ERROR;
@@ -288,6 +305,7 @@
forKeyPath:message_keypath];
[self hideSpinny];
+ [self clearAllInputs];
[self swapView:identityView];
@@ -302,6 +320,8 @@
[self hideSpinny];
+ [self clearSensitiveInputs];
+
switch (type) {
case kim_prompt_type_password :
[self showEnterPassword: parentWindow]; break;
@@ -407,6 +427,10 @@
[self hideSpinny];
+ if (![[self window] isVisible]) {
+ [self clearAllInputs];
+ }
+
[self swapView:changePasswordView];
[self showWithParent:parentWindow];