Skip to content

Skip passwords based on full set of pasteboard types#117

Merged
TermiT merged 1 commit intoTermiT:masterfrom
unkhz:skip-any-pasteboard-type
Dec 24, 2020
Merged

Skip passwords based on full set of pasteboard types#117
TermiT merged 1 commit intoTermiT:masterfrom
unkhz:skip-any-pasteboard-type

Conversation

@unkhz
Copy link
Copy Markdown
Contributor

@unkhz unkhz commented Oct 16, 2016

Some applications E.g 1password and keepassx use special identifiers to mark the data copied into the clipboard as special. By doing this, they're essentially telling that consumers like clipboard managers should handle the data differently. This common convention is documented in http://nspasteboard.org/.

This PR modifies how the "Don't copy from password fields > Pasteboard types" option is handled, so that this convention is taken into account. Rather than relying on the main type only, the full list of data identifiers is checked against the types to skip.

This should alleviate the pains documented in #22 and #64. Together with PR #105, we should have pretty good control over the situations where we want to skip adding the clipboard contents to Flycut.

AppController.m Outdated
{
NSString *type = [jcPasteboard availableTypeFromArray:[NSArray arrayWithObject:NSStringPboardType]];
// main type
NSString *type = [jcPasteboard availableTypeFromArray:[NSArray arrayWithObject:NSStringPboardType]];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we even need to keep this type variable. The only place it is used after this change is in a optional log, which should probably print out [pboardTypes componentsJoinedByString:@","] anyway.

Since the useful type to ignore will most likely not be the first one in the list.
Line 785: [clippingStore addClipping:type ofType:type fromAppLocalizedName:@"Flycut" fromAppBundleURL:nil atTimestamp:0];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, I had to make a suggestion that doesn't compile. But using [pboardTypes description] ofType:@"NSStringPboardType" would still be good I think.

p3l6 added a commit to p3l6/Flycut that referenced this pull request Jan 31, 2017
@cconeill
Copy link
Copy Markdown

I'm very unclear what I should type into the Pasteboard types text box to exclude 1Password. The default value did not exclude 1Password 6 from Flycut.

Love the work you guys do on Flycut but I can't use it unless it excludes passwords copied from 1Password.

@MarkJerde
Copy link
Copy Markdown
Collaborator

@cconeill - You can use the "Include pasteboard types in clippings list" checkbox, two lines below the text box, to insert the types in the clippings list so you can identify the correct value to type in there.

Other options for avoiding passwords are the length / content filter via the checkbox on the line between the text box and checkbox mentioned above, or you can Option-Click the Flycut icon in your menu bar to disable / enable Flycut as needed. Some people prefer the latter option so they can manually "go dark" when working with things that shouldn't be recorded and then manually switch back to normal happy clipboard recording when done.

Hope this helps.

  • Mark

@cconeill
Copy link
Copy Markdown

cconeill commented Jun 26, 2017

Thanks for the help @MarkJerde ! Got it working, love FlyCut!

Spoke too soon, evidently NSStringPboardType includes everything copied, whether it's from 1Password or anywhere else. So excluding that Pasteboard type excludes all copies period rendering FlyCut useless.

Bummer, it's a super useful app.

@unkhz
Copy link
Copy Markdown
Contributor Author

unkhz commented Jun 28, 2017

@cconeill the fix in this branch makes it possible for you to exclude clippings specifically from the password managers that mark the copied data as sensitive. 1password should work with the default settings as com.agilebits.onepassword is included in the list. You'll have to build it from this branch of course.

@ramesaliyev
Copy link
Copy Markdown

Any update on this?

@Benderr-TP
Copy link
Copy Markdown

Anything that can be done to help this along?

@darkwebdev
Copy link
Copy Markdown

darkwebdev commented Nov 1, 2019

I'm using the 1.8.3 version from unkhz fork, works great. Please merge it into the master.

@unkhz could you please resolve the conflicts?

@TermiT @MarkJerde 👆

Thanks!

@Enricoza Enricoza mentioned this pull request Aug 30, 2020
@Enricoza
Copy link
Copy Markdown

Enricoza commented Sep 4, 2020

Hi @TermiT @MarkJerde
Any clue on why this was not merged back then?
May we help you in anyway to make this work again in the new versions?
Or is there a reason I'm missing about why this fix will never see the light of day?

@TermiT
Copy link
Copy Markdown
Owner

TermiT commented Sep 4, 2020

Need to review it again and come back to it

@karlhorky
Copy link
Copy Markdown

That would be great @TermiT :)

Maybe in the meantime @unkhz or someone else could resolve the conflicts here...?

@unkhz unkhz force-pushed the skip-any-pasteboard-type branch from 1e7c762 to 2402068 Compare September 12, 2020 18:47
@unkhz
Copy link
Copy Markdown
Contributor Author

unkhz commented Sep 12, 2020

Happy to help if there's a chance of getting this merged. I've rebased the branch.

@unkhz unkhz force-pushed the skip-any-pasteboard-type branch from 2402068 to b166296 Compare September 12, 2020 19:42
…p against the full list of pasteboard typesAdd common types from nspasteboard.org as defaults
@unkhz unkhz force-pushed the skip-any-pasteboard-type branch from b166296 to fdfa500 Compare September 12, 2020 20:34
@karlhorky
Copy link
Copy Markdown

@TermiT did you have a chance to take a look?

I've been using this and it's pretty great! Would love to have it in the main repo here.

@TermiT
Copy link
Copy Markdown
Owner

TermiT commented Dec 24, 2020

For now, I think it works, but in feature, this would be a better option: #105 (comment)

@karlhorky
Copy link
Copy Markdown

Thanks @TermiT ! Will this be released in 1.10.0?

@TermiT
Copy link
Copy Markdown
Owner

TermiT commented Dec 27, 2020

@karlhorky yes, in the next release, whatever version it will be.

@trptcolin
Copy link
Copy Markdown

I'm excited about this and would love to start recommending this update to teammates! Any idea when the next release might come out? No pressure, thanks for this great software!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.