/[smecontribs]/rpms/smeserver-onlyoffice/contribs10/smeserver-onlyoffice-0.0.5-bz12234-secret.patch
ViewVC logotype

Contents of /rpms/smeserver-onlyoffice/contribs10/smeserver-onlyoffice-0.0.5-bz12234-secret.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Nov 21 05:14:49 2022 UTC (2 years ago) by jpp
Branch: MAIN
CVS Tags: smeserver-onlyoffice-0_0_5-8_el7_sme, smeserver-onlyoffice-0_0_5-4_el7_sme, smeserver-onlyoffice-0_0_5-5_el7_sme, smeserver-onlyoffice-0_0_5-6_el7_sme, smeserver-onlyoffice-0_0_5-7_el7_sme, smeserver-onlyoffice-0_0_5-3_el7_sme, HEAD
* Mon Nov 21 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.0.5-3.sme
- fix nginx not starting with onlyoffice 7.2 [SME: 12234]

1 diff -Nur --no-dereference smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/db/configuration/migrate/50onlyoffice smeserver-onlyoffice-0.0.5/root/etc/e-smith/db/configuration/migrate/50onlyoffice
2 --- smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/db/configuration/migrate/50onlyoffice 2022-06-23 21:21:31.000000000 -0400
3 +++ smeserver-onlyoffice-0.0.5/root/etc/e-smith/db/configuration/migrate/50onlyoffice 2022-11-21 00:10:15.610000000 -0500
4 @@ -1,6 +1,7 @@
5 {
6 my $onlyoffice = $DB->get('onlyoffice') || $DB->new_record('onlyoffice', {type => 'configuration'});
7 my $token = $onlyoffice->prop('token') || '';
8 + my $secretString = $onlyoffice->prop('secretString') || '';
9 # If the management interface is already defined, return nothing
10
11 if ($token eq '') {
12 @@ -9,6 +10,13 @@
13 $onlyoffice->set_prop('token',"$pass");
14 }
15
16 + if ($secretString eq '') {
17 + # Else, we generate a random password
18 + my $pass=`/usr/bin/openssl rand -base64 60 | tr -c -d '[:alnum:]'`;
19 + $onlyoffice->set_prop('secretString',"$pass");
20 + }
21 +
22 +
23 #dbpass
24 my $dbpass = $onlyoffice->prop('dbpass') || '';
25 if ($dbpass eq '') {
26 diff -Nur --no-dereference smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf smeserver-onlyoffice-0.0.5/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf
27 --- smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf 2022-07-06 00:05:44.000000000 -0400
28 +++ smeserver-onlyoffice-0.0.5/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf 2022-11-21 00:10:39.660000000 -0500
29 @@ -10,7 +10,7 @@
30 export fqdn=$(/sbin/e-smith/config getprop onlyoffice VirtualHost || echo `config get SystemName`.`config get DomainName`)
31 export dshost=$fqdn
32 export dsport=$(/sbin/e-smith/config getprop onlyoffice TCPPort || echo "8082")
33 -
34 +secretString=$(/sbin/e-smith/config getprop onlyoffice secretString || /usr/bin/openssl rand -base64 60 | tr -c -d '[:alnum:]' )
35 fulladdress="$dshost:$dsport"
36 [ $(/sbin/e-smith/config getprop onlyoffice VirtualHost) ] && fulladdress=$(/sbin/e-smith/config getprop onlyoffice VirtualHost)
37
38 @@ -93,6 +93,8 @@
39 # Allow unauthorized SSL if enabled
40 jq -r ".services.CoAuthoring.requestDefaults.rejectUnauthorized = ${REJECT_UNAUTHORIZED}" $DEFAULT_CONFIG > temp.json && mv -f temp.json $DEFAULT_CONFIG
41
42 +#add very secret string https://forum.onlyoffice.com/t/onlyoffice-7-2-secure-link-secret-error/2806/4
43 +jq -r ".storage.fs.secretString = \"${secretString}\"" $DEFAULT_CONFIG > temp.json && mv -f temp.json $DEFAULT_CONFIG
44
45 # configure nextcloud
46 if [ -f /usr/share/nextcloud/occ ]; then # check if nextcloud is installed
47 diff -Nur --no-dereference smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/templates/etc/nginx/conf.d/ds.conf/10base smeserver-onlyoffice-0.0.5/root/etc/e-smith/templates/etc/nginx/conf.d/ds.conf/10base
48 --- smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/templates/etc/nginx/conf.d/ds.conf/10base 2022-07-05 23:25:04.000000000 -0400
49 +++ smeserver-onlyoffice-0.0.5/root/etc/e-smith/templates/etc/nginx/conf.d/ds.conf/10base 2022-11-21 00:09:18.851000000 -0500
50 @@ -43,7 +43,7 @@
51 ## sudo openssl dhparam -out dhparam.pem 4096
52 ##
53 # ssl_dhparam /etc/ssl/certs/dhparam.pem;
54 -
55 + set $secure_link_secret { $onlyoffice{'secretString'} || "how-to-configure-ocsp-stapling-on-apache" };
56 include /etc/nginx/includes/ds-*.conf;
57
58 \}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed