mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 22:52:26 +00:00
Pin potential sensitive clipboard content to local machine
This commit is contained in:
@@ -105,7 +105,12 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
|
||||
}
|
||||
|
||||
- (void)copyObjectsWithoutTimeout:(NSArray<id<NSPasteboardWriting>> *)objects {
|
||||
[NSPasteboard.generalPasteboard clearContents];
|
||||
if(@available(macOS 10.12, *)) {
|
||||
[NSPasteboard.generalPasteboard prepareForNewContentsWithOptions:NSPasteboardContentsCurrentHostOnly];
|
||||
}
|
||||
else {
|
||||
[NSPasteboard.generalPasteboard clearContents];
|
||||
}
|
||||
[NSPasteboard.generalPasteboard writeObjects:objects];
|
||||
self.isEmpty = NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user