When i try to sign a hybrid PDF, i get a variation of the following error message - '/home/rathodsa/Documents/lu166643uvpj7.tmp does not exist'. the variation is in temp file name. Background LinuxMint 19.3, 64 bit The error occurs whether the PDF is a regular, hybrid, archive, single or multi page, form, etc. I am using a GPG certificate. Confirm that I can sign a document in ODT format. This is reproducible at least in 6.3.2. i don't know if it happened before that version.
Thank you for reporting the bug. Please attach a sample PDF, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for further details.)
Created attachment 157991 [details] Sample of the hybrid PDF which i could not sign using a As requested, I have added a sample PDF that i created in LibreOffice 6.3.2.
Hi, I have the same problem on arch linux. If I try to sign a just exported pdf file I'll get the same error. Version: 6.4.1.2 Build ID: 6.4.1-1 CPU threads: 8; OS: Linux 5.5; UI render: default; VCL: kf5; Locale: de-DE (en_US.UTF-8); UI-Language: en-US
Created attachment 158381 [details] sign test
(In reply to moritz.herrmann from comment #3) > Hi, > I have the same problem on arch linux. > If I try to sign a just exported pdf file I'll get the same error. => NEW
I experience the same bug on Opensuse Tumbleweed with PDFs generated with LaTeX and any other PDF I tried. Information for package libreoffice-draw: ----------------------------------------- Repository : openSUSE-Tumbleweed-Oss Name : libreoffice-draw Version : 6.4.3.2-1.2 Arch : x86_64 Vendor : openSUSE Installed Size : 583.0 KiB Installed : Yes Status : up-to-date Source package : libreoffice-6.4.3.2-1.2.src Summary : LibreOffice Draw
Created attachment 161038 [details] libreoffice draw screenshot with the error I get I am also affected by the bug. I cannot sign an existing PDF. Furthermore, I cannot view existing digital signatures, although LO Draw reports: "This document is digitally signed and the signature is valid". In the attached PNG, you can see the error I get when I click on "Show Signatures". Regards, Yannis For me, "lsb_release -a" gives LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal and "dpkg -l | grep '^ii *libreoffice'" gives libreoffice-base 1:6.4.3-0ubuntu0.20.04.1 libreoffice-base-core 1:6.4.3-0ubuntu0.20.04.1 libreoffice-base-drivers 1:6.4.3-0ubuntu0.20.04.1 libreoffice-calc 1:6.4.3-0ubuntu0.20.04.1 libreoffice-common 1:6.4.3-0ubuntu0.20.04.1 libreoffice-core 1:6.4.3-0ubuntu0.20.04.1 libreoffice-draw 1:6.4.3-0ubuntu0.20.04.1 libreoffice-emailmerge 1:5.0.3~rc2-0ubuntu1~trusty2 libreoffice-gnome 1:6.4.3-0ubuntu0.20.04.1 libreoffice-gtk2 1:6.4.3-0ubuntu0.20.04.1 libreoffice-gtk3 1:6.4.3-0ubuntu0.20.04.1 libreoffice-help-common 1:6.4.3-0ubuntu0.20.04.1 libreoffice-help-en-gb 1:6.4.3-0ubuntu0.20.04.1 libreoffice-help-en-us 1:6.4.3-0ubuntu0.20.04.1 libreoffice-impress 1:6.4.3-0ubuntu0.20.04.1 libreoffice-java-common 1:6.4.3-0ubuntu0.20.04.1 libreoffice-l10n-en-gb 1:6.4.3-0ubuntu0.20.04.1 libreoffice-l10n-en-za 1:6.4.3-0ubuntu0.20.04.1 libreoffice-math 1:6.4.3-0ubuntu0.20.04.1 libreoffice-ogltrans 1:6.4.3-0ubuntu0.20.04.1 libreoffice-pdfimport 1:6.4.3-0ubuntu0.20.04.1 libreoffice-presentation-minimizer 1:5.0.3~rc2-0ubuntu1~trusty2 libreoffice-presenter-console 1:5.0.3~rc2-0ubuntu1~trusty2 libreoffice-sdbc-firebird 1:6.4.3-0ubuntu0.20.04.1 libreoffice-style-breeze 1:6.4.3-0ubuntu0.20.04.1 libreoffice-style-colibre 1:6.4.3-0ubuntu0.20.04.1 libreoffice-style-elementary 1:6.4.3-0ubuntu0.20.04.1 libreoffice-style-tango 1:6.4.3-0ubuntu0.20.04.1 libreoffice-writer 1:6.4.3-0ubuntu0.20.04.1
AFAIK, since I used that a long ago, PDF sign works with X509 and not with GPG/OpenPGP. Bug 113278 and Bug 115884. Either I miss something or you reported and confirmed a duplicate.
Let me give more details: - I use LibreOffice 6.4 - I create an ODT file with Write: foo.odt - I export it to PDF which I sign with my x509 certificate: foo.pdf - I check foo.pdf using e.g. Adobe acrobat on another computer, and the signature is OK. - I open foo.pdf with LibreOffice Draw, and face the errors I described in my previous comment. I remember having problems with pdf files in the past, trying to add an access password, and it was related to "policy" issues not allowing to access the pdf file. Could the signing problem be due to something like this?
Reporter akrathod used GPG anf that's likely a duplicate. moritz and Robert said "the same", but without conforming the cert. Ioannis, I didn't understand, you say you sign with X509 and bug happens after that, when you just open in Draw, or sign again, please clarify.
There seem to be a problem somewhere in tempfile generation when attempting to start digital signing. I've also tried LibreOffice 7.0alpha1 (LibreOfficeDev 7.0.0.0.alpha1 6a03b2a54143a9bc0c6d4c7f190b77cdc5a14733) and it behaves the same as LibreOffice 6.4.3 on Ubuntu 20.04 and the 18.04 (LibreOffice 6.4.3.2 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8). Attempting to sign *any* existing PDF works behaves exactly the same: * libreoffice6.4 --view /tmp/a.pdf * Click on "Sign document" * I get a pop-up saying "/tmp/lu12004kv2p7v.tmp does not exist" * Without closing the pop-up, I can see a /tmp/lu12004kv2p7t.tmp directory containing lu12004kv2p7u.tmp file — note how it complains about not finding path with "v" in the name, there is a directory with "t" containing a file with "u". * After closing it, it pops-up another 4 times with exactly the same message (for a total of 5 times). * Attempting to re-sign it seems to use the same temporary file paths (i.e. the pop-up message remains the same). (FWIW, attempting to "touch /tmp/lu12004kv2p7v.tmp" or "mkdir /tmp/lu12004kv2p7v.tmp" does not make it continue working, but it was probably already too late to "fix it up", i.e. the file handle is open already)
I've started following the tempfile creation logic would guess some tempfile creation logic around https://cgit.freedesktop.org/libreoffice/core/tree/xmlsecurity/source/helper/documentsignaturemanager.cxx#n227 https://cgit.freedesktop.org/libreoffice/core/tree/xmlsecurity/source/helper/pdfsignaturehelper.cxx#n123 https://cgit.freedesktop.org/libreoffice/core/tree/unotools/source/ucbhelper/ucbstreamhelper.cxx#n46 is related, but for someone unfamiliar with LibreOffice code and without a dev environment, it's hard to test any hypothesis, and it's quickly turning into a rabbit hole. Is there a debug build for x64 Linux system with which I can see SAL_INFO/SAL_WARN messages on the console? FWIW, my Firefox has a security token device set up (AET SafeSign smart card), but signing an ODF file works well, so the problem seems to strictly be in some of the temp streams being created and then wrong file paths being used.
And I have a strong suspicion is that the error being thrown is ERRCODE_IO_NOTEXISTS (error message matches) — https://cgit.freedesktop.org/libreoffice/core/tree/uui/inc/ids.hrc#n83 Forgot to mention that the number of times a pop-up shows up seems to depend on the PDF file size (on smaller PDF file like http://africau.edu/images/default/sample.pdf, I only got it twice).
Another data point: signing works with older LibreOffice version (LibreOffice 6.3.6.2 2196df99b074d8a661f4036fca8fa0cbfa33a497) from https://downloadarchive.documentfoundation.org/libreoffice/old/6.3.6.2/deb/x86_64/LibreOffice_6.3.6.2_Linux_x86-64_deb.tar.gz I guess people can use this as a work-around. (And I'll stop spamming now :))
Danilo, thank you for getting me to this direction. I downloaded the libreoffice source code and think I found the file where the buggy code is: libreoffice/sal/osl/unx/tempfile.cxx Checking the "sign document" behaviour, I saw that after the first error pops up, if I touch the reported file in /tmp instead of the path suggested, no more error popups come out! It seems that the temporary file in question should be created as /tmp/lu<PID number><some letters>.tmp instead of being searched in the PDF location path. So, I guess that the problem is the way the prepended path is handled in the suspicious file (libreoffice/sal/osl/unx/tempfile.cxx).
The file link in GIT is https://cgit.freedesktop.org/libreoffice/core/tree/sal/osl/unx/tempfile.cxx?h=distro/collabora/cp-6.4
*** Bug 132821 has been marked as a duplicate of this bug. ***
Same problem here, With version 7.x and 6.4.x. Thanks in advance.
(In reply to Danilo Šegan from comment #11) > Attempting to sign *any* existing PDF works behaves exactly the same: > > * libreoffice6.4 --view /tmp/a.pdf > * Click on "Sign document" > * I get a pop-up saying "/tmp/lu12004kv2p7v.tmp does not exist" > * Without closing the pop-up, I can see a /tmp/lu12004kv2p7t.tmp directory > containing lu12004kv2p7u.tmp file — note how it complains about not finding > path with "v" in the name, there is a directory with "t" containing a file > with "u". > * After closing it, it pops-up another 4 times with exactly the same > message (for a total of 5 times). > * Attempting to re-sign it seems to use the same temporary file paths (i.e. > the pop-up message remains the same). > > (FWIW, attempting to "touch /tmp/lu12004kv2p7v.tmp" or "mkdir > /tmp/lu12004kv2p7v.tmp" does not make it continue working, but it was > probably already too late to "fix it up", i.e. the file handle is open > already) Bibisected with Linux 6.4 repo to https://git.libreoffice.org/core/+/9112c18524c9f5e67d6cbb282586a439e3020cdb%5E!/ Don't create unnecessary tempfiles for opened doc Adding Cc: to Samuel Mehrbrodt
(In reply to Danilo Šegan from comment #12) > Is there a debug build for x64 Linux system with which I can see > SAL_INFO/SAL_WARN messages on the console? Yes, seen on https://dev-builds.libreoffice.org/daily/master/current.html.
I'll take a look.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/058caeef45f9abf12e4e243aafbbb1c2ebcbc057 tdf#130354 sfx2: make PDF signing UI work again It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/35ec66f8766bd3d8f17c9e0ea68d1e260a9fbc32 tdf#130354 sfx2: make PDF signing UI work again It will be available in 7.0.0.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thanks very much, is working in 7.1 dev edition, but take care it doesn't work on certain PDFs, I think they are the compressed ones.
Héctor, please attach a pdf where it doesn't work, if not private.
*** Bug 132866 has been marked as a duplicate of this bug. ***
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/b52d304969a15e00d82745f4d2f96c04f188eb97 tdf#130354 sfx2: make PDF signing UI work again It will be available in 6.4.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 161609 [details] A PDF that can't be signed. A PDF that can't be signed, this PDF can't be signed, If You export It to a LibreOffice PDF and Re-Sign I works.
(In reply to Timur from comment #27) > *** Bug 132866 has been marked as a duplicate of this bug. *** Attached, Thanks.
Please open a separate bug for that. Thanks.
(In reply to Héctor Alexis Pérez Cifuentes from comment #25) > Thanks very much, is working in 7.1 dev edition, but take care it doesn't > work on certain PDFs, I think they are the compressed ones. Bug 104815.
(In reply to akrathod@protonmail.com from comment #0) > When i try to sign a hybrid PDF Bug 108808. > I am using a GPG certificate. Bug 113278 and Bug 115884.
unfortunately, this bug complicates my life really much :-/ (app-office/libreoffice-6.4.3.2 on gentoo)
(In reply to JohnBlbec from comment #34) > unfortunately, this bug complicates my life really much :-/ > (app-office/libreoffice-6.4.3.2 on gentoo) Please, update to the latest version of Libreoffice 6.4 or 7.0. Cheers