mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +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 {
|
- (void)copyObjectsWithoutTimeout:(NSArray<id<NSPasteboardWriting>> *)objects {
|
||||||
|
if(@available(macOS 10.12, *)) {
|
||||||
|
[NSPasteboard.generalPasteboard prepareForNewContentsWithOptions:NSPasteboardContentsCurrentHostOnly];
|
||||||
|
}
|
||||||
|
else {
|
||||||
[NSPasteboard.generalPasteboard clearContents];
|
[NSPasteboard.generalPasteboard clearContents];
|
||||||
|
}
|
||||||
[NSPasteboard.generalPasteboard writeObjects:objects];
|
[NSPasteboard.generalPasteboard writeObjects:objects];
|
||||||
self.isEmpty = NO;
|
self.isEmpty = NO;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user