From f10338293513b75cecb02d97977945881ead18bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Sep 2022 00:16:38 +0200 Subject: [PATCH] Debug webhook --- .../triggers/interface_95_modWebhook_WebhookTriggers.class.php | 2 +- htdocs/langs/en_US/admin.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php index a8932934bd1..94b4b861e86 100644 --- a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php @@ -104,7 +104,7 @@ class InterfaceWebhookTriggers extends DolibarrTriggers $actionarray = explode(",", $tmpobject->trigger_codes); if (is_array($actionarray) && in_array($action, $actionarray)) { $jsonstr = '{"triggercode":'.json_encode($action).',"object":'.json_encode($object).'}'; - $response = getURLContent($tmpobject->url, 'POST', $jsonstr); + $response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, array(), array('http', 'https'), 0, -1); if (empty($response['curl_error_no']) && $response['http_code'] >= 200 && $response['http_code'] < 300) { $nbPosts ++; } else { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 46af4f95355..704d9ed238e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2312,4 +2312,4 @@ ScriptIsEmpty=The script is empty ShowHideTheNRequests=Show/hide the %s SQL request(s) DefinedAPathForAntivirusCommandIntoSetup=Define a path for an antivirus program into %s TriggerCodes=Triggerable events -TriggerCodeInfo=Enter here the list of trigger codes that must generate a post of a web request \ No newline at end of file +TriggerCodeInfo=Enter here the trigger code(s) that must generate a post of a web request (only external URL are allowed). You can enter several trigger codes separated by a comma.