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

Unable to Sign the document in Libresign 4.1.1 #819

Closed
james008super opened this issue May 21, 2022 · 4 comments
Closed

Unable to Sign the document in Libresign 4.1.1 #819

james008super opened this issue May 21, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@james008super
Copy link

Environment information (please complete the following information):*

  • OS: Ubuntu running Nginx and PHP 8.0 , CFSSL in Docker
  • Browser: Chrome
  • LibreSign Version 4.1.1
  • Nextcloud Server Version 23.04
  • Logs (get the entries from nextcloud.log related with LibreSign i.e tail -f data/nextcloud.log|grep libresign)

Describe the bug
Unable to Sign the document in Libresign 4.1.1. Getting error as follows - count() Argument #1 ($value) must be of type Countable array, null given

Error_While-Signing

We were previously using Libresign version 2.5
We upgraded nextcloud to 23.04 and we upgraded the libresign version to 4.1.1
Module couldn't be enabled due to errors.

The error was as follows :

"message":"Undefined variable $install at /var/www/nextcloud/apps/libresign/lib/Migration/Version2040Date20211027183759.php#31","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","version":"24.0.0.12","exception":{"Exception":"Error","Message":"Undefined variable $install at /opt/sharepoint/apps/libresign/lib/Migration/Version2040Date2021102

Then we removed the libresign module and deleted the libresign values from Database table oc_appconfig. Then we removed the entries for libresign from the oc_migrations and oc_filecache.

Then we reinstalled the module and there were no errors.

CFSSL is working on 127.0.0.1:8888 and up and running .
Following is the screenshot from the CFSSL docker.

But then we are unable to sign a document and we get the following error :

Picture:

Error_While-Signing

Then we tried to debug the same via chrome tools and we found the following error:

Picture :
Production systems- Issue on request

The payload being passed is as follows :

Picture:
Production systems- Issue on request - Payload Sent

Out of no luck , we setup a new instance (, Ubuntu 20.04 , Php 8.0 , Nextcloud 23.04 , Libresign : 4.1.1 ) to compare the results.
Surprisingly in the new instance there are no errors and the signature is working correctly.
We compared the files from both the instances and found that all the files inside /app/libresign are the same on both sides.

Following the Signature request call from the Chrome Dev tools :

Picture 1 :
Screenshot from new instance - working - Paylo

Picture 2 :
Screenshot from new instance - working - Request

If you closely observe the request , the new instance is doing a patch call and the production instance is doing a post call on 'Submit Request' - sign/register which gives a 422 error response with message.

  • Logs (get the entries from nextcloud.log related with LibreSign i.e tail -f data/nextcloud.log|grep libresign)

Additional context
Add any other context about the problem here.

@james008super james008super added the bug Something isn't working label May 21, 2022
@flortsch
Copy link

flortsch commented May 26, 2022

I have the same issue with LibreSign 5.1.1 and Nextcloud 24.0.1.

Edit: The issue seems to be caused when using a file that comes from a shared group folder. Selecting a personal file or directly uploading a file during sign request works.

@james008super
Copy link
Author

Please try avoiding spaces in the file name and also in the folder name ,
There is a shell execution happening at line number 39 (check php logs) , so shell execution returns null value if there are spaces in the file link , and Null value cannot be passed as a array and the exception occurs. If you are having issue with a production instance and this has turned to be a nightmare , then i can really understand our situation and help you. Please contact me at 00968 91257536 - I know the entire procedure by heart as i was trying to solve this bug over three weeks and did multiple test instances to finally arrive at the conclusion.

@Iwios
Copy link

Iwios commented Jun 7, 2022

Same for me.
Without sapce in name of file, the signing was ok if I sign into the librsign app

@vitormattos
Copy link
Member

This was fixed in version 5.1.2 and the current version is 5.1.3, update your app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants