From 470875243a03adf58cb7cf52e2923626e3a0eda3 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 12 Jan 2012 19:34:40 +0000 Subject: [PATCH] check if SSL and TLS are activated at the same time --- lam/templates/config/confmain.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index d036373d..3d083295 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2011 Roland Gruber + Copyright (C) 2003 - 2012 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -424,6 +424,9 @@ function checkInput() { $errors[] = array("ERROR", _("Server address is invalid!")); } $conf->setUseTLS($_POST['useTLS']); + if ((strpos($_POST['serverurl'], 'ldaps://') !== false) && ($_POST['useTLS'] == 'yes')) { + $errors[] = array("ERROR", _('You cannot use SSL and TLS encryption at the same time. Please use either "ldaps://" or TLS.')); + } /* if (!$conf->set_cacheTimeout($_POST['cachetimeout'])) { $errors[] = array("ERROR", _("Cache timeout is invalid!")); }*/