Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OS X] Copied link has bogus Pasted-Contact.vcf #3300

Closed
scansec opened this issue Jun 1, 2015 · 12 comments
Closed

[OS X] Copied link has bogus Pasted-Contact.vcf #3300

scansec opened this issue Jun 1, 2015 · 12 comments
Assignees
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Milestone

Comments

@scansec
Copy link

scansec commented Jun 1, 2015

Hello,

When using the copy share-link in the client, and pasting into another program (ex mail-client), it paste the content as a object called: Pasted-Contact.vcf, instead of a text-link

@scansec
Copy link
Author

scansec commented Jun 1, 2015

Using client 1.8.1 build 2335

@dragotin
Copy link
Contributor

dragotin commented Jun 2, 2015

hmm, I am not sure if I understand correctly. Please try to explain a bit more in detail what you are doing and expecting. Thanks

@razyr
Copy link

razyr commented Jun 15, 2015

When creating a link from the Mac OwnCloud client, select the "Copy Link" button and paste that link into an email. The expected behaviour is that a hyperlink would be pasted from the clipboard. What you get is a vcard contact as shown in the first image below.

owncloud-link-bug-1

Testing this further by looking at the received email, the "link" is presented as a vcard, consistent with what the Mac mail client showed above. If you click the vcard, it downloads into your Contacts. What we would expect is for the link to be displayed as hypertext and clicking that link would take you to the Owncloud instance to download the file.

owncloud-link-bug-2

@razyr
Copy link

razyr commented Jun 15, 2015

More info on the above.

If you paste the copied link into an application such as TextEdit, you get the expected URL. You can then copy/paste that URL from TextEdit into Mac Mail and you get the expected behaviour of a clickable link.

As an app which is purely an ASCII editor, TextEdit would have a limited understanding/view of the possible data types in the pasteboard, so it's probably more forgiving of what it's seeing copied in from the OwnCloud client. Mac Mail on the other hand would handle a wider variety of pasted types and thus mistake the text url for a vcard, based on the UTI.

It seems as if this is a QT bug where the UTI isn't being set correctly by QClipboard::setText(). I would think it should be forced to public.plaintext. Other apps such as SlickEdit have had the same problem reported. https://community.slickedit.com/index.php?topic=10962.0. SlickEdit users were able to work around the problem by turning off the html clipboard feature.

UTI docs are here: https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE

Docs on how UTI is implemented by OSX pasteboards is here: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/PasteboardGuide106/Articles/pbConcepts.html

@stevenbuehner
Copy link

@razyr is right. I examined the clipboard with ClipboardViewer and found out, that when I copy a plain text from another application than it is only stored in the cliboard-spaces "public.utf8-plain-text" and "NSStringPBoardType". Which is absolutely enough.
bildschirmfoto 2015-10-15 um 16 25 34

But when I copy the link via owncloud-client (rightclick ...) than the link is stored in 10 different clipboard-spaces. One of them (I guess the problematic one) is called public.vcard. So whenever I paste my clipboard into another application, it is up to the application to decide which clipboard space to use. Apple Mail apperently chooses "public.vcard" or "Apple VCard pasteboard type". (See attached image)
bildschirmfoto 2015-10-15 um 16 24 49

There must be a way to copy the string into only the plain-text section...

@razyr
Copy link

razyr commented Oct 15, 2015

I think the "Needs Info" label could have been removed on this ticket back in June. Not much more we can document as users, but as it stands this functionality is essentially broken for Mac users.

@danimo danimo removed the Needs info label Oct 15, 2015
@danimo danimo added this to the 2.1-next milestone Oct 15, 2015
@guruz guruz added the type:bug label Oct 20, 2015
@guruz guruz assigned guruz and unassigned jturcotte Oct 20, 2015
@guruz guruz changed the title MAC Client, copy share link [OS X] Copied link has bogus Pasted-Contact.vcf Oct 20, 2015
@guruz guruz added the ReadyToTest QA, please validate the fix/enhancement label Oct 20, 2015
@Dianafg76
Copy link

@guruz, I tested this issue, and now:
The steps:

  1. Select the Copy link with a vcard contact
  2. Paste into the email, now I see the URL:
    screen shot 2015-10-22 at 09 27 17
  3. Send the e-mail, when you open the e-mail, you see the URL:
    screen shot 2015-10-22 at 09 29 06
  4. If you click on the URL, I see this:
    screen shot 2015-10-22 at 09 30 23
  5. If you download the .vcf, I see this:
    screen shot 2015-10-22 at 09 32 18

@guruz, my question is: This is correct?, Thanks

I tested this issue with:
Desktop v ownCloud-2.1.0.2821-nightly20151022.pkg
Server v {"installed":true,"maintenance":false,"version":"8.1.4.0","versionstring":"8.1.4 RC1","edition":""}

@Dianafg76 Dianafg76 added Needs info and removed ReadyToTest QA, please validate the fix/enhancement labels Oct 22, 2015
@szujak
Copy link

szujak commented Oct 23, 2015

It is a bug reported in QT today https://bugreports.qt.io/browse/QTBUG-48953 maybe it help you

@guruz
Copy link
Contributor

guruz commented Oct 23, 2015

@szujak It's worked around in our nightly builds. Feel free to try (but they contain quite some untested code, so as usual be cautious and have backups..)

http://download.owncloud.com/desktop/daily/

@guruz guruz added ReadyToTest QA, please validate the fix/enhancement and removed Needs info labels Oct 26, 2015
@guruz
Copy link
Contributor

guruz commented Nov 3, 2015

Nobody reported back, but I'm assuming this is fixed now in the builds mentioned above

@guruz guruz closed this as completed Nov 3, 2015
ckamm added a commit to ckamm/owncloud-client that referenced this issue Jun 23, 2017
@srhuddle
Copy link

I'm seeing this same behavior with Mojave (10.14.3), Mail.App and Microsoft Remote Desktop -- Ctrl-C copy from MRD pastes as a VCF in Mail.app.

@michaelstingl
Copy link
Contributor

@srhuddle Please open a new issue with the relevant information (steps to reproduce, version etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Projects
None yet
Development

No branches or pull requests