logicexpertise / moodle-mod_onlyoffice

Moodle ONLYOFFICE Document Server online editor integration
7 stars 12 forks source link

Fix decode jwt token #12

Closed MansouriAymen closed 2 years ago

MansouriAymen commented 3 years ago

New issue: When upgrading onlyoffice document server with last release. I have this problems when i opened the file: image And when i modified the file : image

The problem is in callback function, because onlyoffice now encode the data before sending for moodle, so the solution is to decode the data before using it.

logicexpertise commented 3 years ago

Hi @MansouriAymen Thanks for your contribution. Could you please clarify which version of Onlyoffice Document Server your PR relates to? Thanks, Muyi

MansouriAymen commented 3 years ago

Hi Muyi, This PR is for OnlyOffice Document Server release version 6.2, the last one. Thanks. Aymen

ThomasFeroul commented 2 years ago

Hi all,

i have installed this onlyoffice plugin on my moodle server (v3.10.1) and i have applied all the commits but i got the same error as Aymen.

My onlyoffice server is a v6.4. It doesn't work even if we don't use secret.

Do you have any solution for moodle server which is running on 3.10.1 version or later ?

Thanks all.

logicexpertise commented 2 years ago

Hi All,

I haven't had time to look at @MansouriAymen's PR or update the plugin for later versions of Moodle. I'm planning to pick up work on it again during the second and third weeks of November - FYI @ThomasFeroul

Muyi

logicexpertise commented 2 years ago

@MansouriAymen Apologies for taking so long to get back to you on this.

I've been unable to reproduce your issue. I tested with Documentserver 6.2 and Moodle 3.8.

I suspect you may have inconsistency between the plugin secret key and the secret/token settings on the Documentserver. Refer to this page - https://api.onlyoffice.com/editors/signature/

Check that the values of services.CoAuthoring.secret.inbox.string and services.CoAuthoring.secret.outbox.string are both set to the same string as the plugin's Document Server Secret.

If you are not using a secret in the plugin, set those values to an empty string, and set the token.enable.* values on the server to false.

Hope that helps.

logicexpertise commented 2 years ago

@ThomasFeroul I'll aim to test with Documentserver 6.4 and Moodle 3.10 & later in the next week or so.

ThomasFeroul commented 2 years ago

Hi @logicexpertise, I want to know if you have worked on the problem with Documentserver 6.4 and Moodle 3.10 ? Thanks you.

logicexpertise commented 2 years ago

Hi @logicexpertise, I want to know if you have worked on the problem with Documentserver 6.4 and Moodle 3.10 ? Thanks you.

Hi @ThomasFeroul I released an update, tested with Documentserver 6.4 and Moodle 3.10. Download that and see if your issue is resolved.

Note that if you are not using a secret, the values of ervices.CoAuthoring.secret.inbox.string and services.CoAuthoring.secret.outbox.string in the Document server should be set to empty strings, and the token.enable.* should be set to false. Refer to Refer to this page - https://api.onlyoffice.com/editors/signature/ for instructions on how to set those values.

If you are using a secret, ensure that the above .secret values are set to the same as the plugin, and the token.enable.* values are set to true.

If you are still experiencing issues, please create a new issue.