From 995d6bfccb58d787eef8d30532204f38e2acb732 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 21 Apr 2021 19:00:08 +0200 Subject: [PATCH] Update to 2021-04-21 19:00 --- roles/dolibarr/files/dolibarr_token.patch | 10 ++++++++++ roles/dolibarr/tasks/install.yml | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 roles/dolibarr/files/dolibarr_token.patch diff --git a/roles/dolibarr/files/dolibarr_token.patch b/roles/dolibarr/files/dolibarr_token.patch new file mode 100644 index 0000000..7313e2b --- /dev/null +++ b/roles/dolibarr/files/dolibarr_token.patch @@ -0,0 +1,10 @@ +--- htdocs/main.inc.php.orig 2021-04-09 19:02:49.957818778 +0200 ++++ htdocs/main.inc.php 2021-04-21 18:10:31.597094173 +0200 +@@ -455,6 +455,7 @@ + } + } + ++ $_GET['token'] = $_SESSION['token']; // Tmp workaround for https://github.com/Dolibarr/dolibarr/issues/16096 + if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $_SESSION['token']) + { + dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused due to invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING); diff --git a/roles/dolibarr/tasks/install.yml b/roles/dolibarr/tasks/install.yml index 5725e52..f162323 100644 --- a/roles/dolibarr/tasks/install.yml +++ b/roles/dolibarr/tasks/install.yml @@ -6,6 +6,7 @@ - tar - mariadb - acl + - patch tags: dolibarr - name: Download Dolibarr @@ -34,6 +35,16 @@ when: dolibarr_install_mode != 'none' tags: dolibarr +- name: Apply local patches + patch: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + backup: True + loop: + - src: dolibarr_token.patch + dest: "{{ dolibarr_root_dir }}/web/htdocs/main.inc.php" + tags: dolibarr + # Custom dir is where custom modules are installed. # This dir was in data previously, but this is not working with # some modules which use relative path for their includes