From 39f5b5e2cd49fc01607cd4f595e0604a626eeb68 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Tue, 16 Oct 2018 14:44:01 +0200 Subject: [PATCH] LdapConnection: Ensure port and timeout are numbers --- library/Icinga/Protocol/Ldap/LdapConnection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index c009fe62a..dd6c9b161 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -185,8 +185,8 @@ class LdapConnection implements Selectable, Inspectable $this->bindDn = $config->bind_dn; $this->bindPw = $config->bind_pw; $this->rootDn = $config->root_dn; - $this->port = $config->get('port', 389); - $this->timeout = $config->get('timeout', 5); + $this->port = (int) $config->get('port', 389); + $this->timeout = (int) $config->get('timeout', 5); $this->encryption = $config->encryption; if ($this->encryption !== null) {