diff --git a/workflow/engine/classes/LdapAdvanced.php b/workflow/engine/classes/LdapAdvanced.php index 7811ac3f8..3f7f95e79 100644 --- a/workflow/engine/classes/LdapAdvanced.php +++ b/workflow/engine/classes/LdapAdvanced.php @@ -504,7 +504,7 @@ class LdapAdvanced * @param Array $aAuthSource the authsource data * @return Object A object with the resulting ldap bind */ - public function ldapConnection($aAuthSource) + public function ldapConnection($aAuthSource, &$resultLDAPStartTLS = false) { $pass = explode("_", $aAuthSource["AUTH_SOURCE_PASSWORD"]); @@ -522,7 +522,7 @@ class LdapAdvanced ldap_set_option($ldapcnn, LDAP_OPT_REFERRALS, 0); if (isset($aAuthSource["AUTH_SOURCE_ENABLED_TLS"]) && $aAuthSource["AUTH_SOURCE_ENABLED_TLS"]) { - @ldap_start_tls($ldapcnn); + $resultLDAPStartTLS = @ldap_start_tls($ldapcnn); $ldapServer = "TLS " . $ldapServer; //$this->log($ldapcnn, "start tls"); } diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index a5264d7ad..eb3207e04 100755 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -26321,6 +26321,12 @@ msgstr "Start Case" msgid "Unassigned" msgstr "Unassigned" +# TRANSLATION +# LABEL/ID_TLS_CERTIFICATE_IS_NOT_INSTALLED_IN_THE_SERVER +#: LABEL/ID_TLS_CERTIFICATE_IS_NOT_INSTALLED_IN_THE_SERVER +msgid "TLS certificate is not installed in the server." +msgstr "TLS certificate is not installed in the server." + # TRANSLATION # LABEL/ID_TO #: LABEL/ID_TO diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index c82ead8d0..77080b656 100755 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -61343,6 +61343,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_TITLE_REQUIRED','en','Title is required.','2014-10-22') , ( 'LABEL','ID_TITLE_START_CASE','en','Start Case','2014-01-15') , ( 'LABEL','ID_TITLE_UNASSIGNED','en','Unassigned','2014-01-15') , +( 'LABEL','ID_TLS_CERTIFICATE_IS_NOT_INSTALLED_IN_THE_SERVER','en','TLS certificate is not installed in the server.','2020-12-30') , ( 'LABEL','ID_TO','en','To','2014-01-15') , ( 'LABEL','ID_TODAY','en','Today','2014-01-15') , ( 'LABEL','ID_TOOLS','en','Tools','2014-01-15') , diff --git a/workflow/engine/methods/authSources/ldapAdvancedProxy.php b/workflow/engine/methods/authSources/ldapAdvancedProxy.php index a394180e1..1d3662941 100644 --- a/workflow/engine/methods/authSources/ldapAdvancedProxy.php +++ b/workflow/engine/methods/authSources/ldapAdvancedProxy.php @@ -392,10 +392,14 @@ switch ($function) { //Test connection $ldapAdvanced = new LdapAdvanced(); - $ldapcnn = $ldapAdvanced->ldapConnection($arrayAuthenticationSourceData); + $resultLDAPStartTLS = true; + $ldapcnn = $ldapAdvanced->ldapConnection($arrayAuthenticationSourceData, $resultLDAPStartTLS); //Response $response["status"] = "OK"; + if ($resultLDAPStartTLS === false) { + $response["message"] = G::LoadTranslation("ID_TLS_CERTIFICATE_IS_NOT_INSTALLED_IN_THE_SERVER"); + } } catch (Exception $e) { //Response $response["status"] = "ERROR"; diff --git a/workflow/engine/methods/authenticationSources/src/components/formAuthenticationSources.vue b/workflow/engine/methods/authenticationSources/src/components/formAuthenticationSources.vue index a030ae7d8..35cf2acb4 100644 --- a/workflow/engine/methods/authenticationSources/src/components/formAuthenticationSources.vue +++ b/workflow/engine/methods/authenticationSources/src/components/formAuthenticationSources.vue @@ -283,6 +283,15 @@ if (response.data.status === "OK") { this.testStatus = true; this.buttonLabel = this.$root.translation("ID_SAVE"); + if ("message" in response.data) { + this.$bvModal.msgBoxOk(response.data.message, { + title: " ", //is important because title disappear + hideHeaderClose: false, + okTitle: this.$root.translation('ID_OK'), + okVariant: "success", + okOnly: true + }); + } this.$bvModal.msgBoxOk(this.$root.translation('ID_SUCCESSFUL_TEST_CONNECTION'), { title: " ", //is important because title disappear hideHeaderClose: false,