Experimental solution to issue/discussion https://sourceforge.net/p/nocc/discussion/38301/thread/ac827e8c9e/?limit=25
This commit is contained in:
parent
53530d60e5
commit
a03018056e
1 changed files with 6 additions and 6 deletions
|
@ -14,7 +14,7 @@
|
||||||
*
|
*
|
||||||
* @package NOCC
|
* @package NOCC
|
||||||
* @license http://www.gnu.org/licenses/ GNU General Public License
|
* @license http://www.gnu.org/licenses/ GNU General Public License
|
||||||
* @version SVN: $Id: class_smtp.php 3061 2023-03-05 19:10:10Z oheil $
|
* @version SVN: $Id: class_smtp.php 3093 2023-07-21 17:05:24Z oheil $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'exception.php';
|
require_once 'exception.php';
|
||||||
|
@ -92,10 +92,10 @@ class smtp {
|
||||||
if( isset($conf->domains[$domainnum]->smtp_allow_self_signed) && $conf->domains[$domainnum]->smtp_allow_self_signed==true ) {
|
if( isset($conf->domains[$domainnum]->smtp_allow_self_signed) && $conf->domains[$domainnum]->smtp_allow_self_signed==true ) {
|
||||||
stream_context_set_option($context, "ssl", "allow_self_signed", $conf->domains[$domainnum]->smtp_allow_self_signed);
|
stream_context_set_option($context, "ssl", "allow_self_signed", $conf->domains[$domainnum]->smtp_allow_self_signed);
|
||||||
}
|
}
|
||||||
if( isset($conf->domains[$domainnum]->smtp_verify_peer) && $conf->domains[$domainnum]->smtp_verify_peer==true ) {
|
if( isset($conf->domains[$domainnum]->smtp_verify_peer) && $conf->domains[$domainnum]->smtp_verify_peer==false ) {
|
||||||
stream_context_set_option($context, "ssl", "verify_peer", $conf->domains[$domainnum]->smtp_verify_peer);
|
stream_context_set_option($context, "ssl", "verify_peer", $conf->domains[$domainnum]->smtp_verify_peer);
|
||||||
}
|
}
|
||||||
if( isset($conf->domains[$domainnum]->smtp_verify_peer_name) && $conf->domains[$domainnum]->smtp_verify_peer_name==true ) {
|
if( isset($conf->domains[$domainnum]->smtp_verify_peer_name) && $conf->domains[$domainnum]->smtp_verify_peer_name==false ) {
|
||||||
stream_context_set_option($context, "ssl", "verify_peer_name", $conf->domains[$domainnum]->smtp_verify_peer_name);
|
stream_context_set_option($context, "ssl", "verify_peer_name", $conf->domains[$domainnum]->smtp_verify_peer_name);
|
||||||
}
|
}
|
||||||
if( isset($conf->domains[$domainnum]->smtp_peer_name) && $conf->domains[$domainnum]->smtp_peer_name!="" ) {
|
if( isset($conf->domains[$domainnum]->smtp_peer_name) && $conf->domains[$domainnum]->smtp_peer_name!="" ) {
|
||||||
|
@ -166,10 +166,10 @@ class smtp {
|
||||||
&& $conf->domains[$_SESSION['nocc_domainnum']]->smtp_user_without_domain==true
|
&& $conf->domains[$_SESSION['nocc_domainnum']]->smtp_user_without_domain==true
|
||||||
) {
|
) {
|
||||||
$domain_char='@';
|
$domain_char='@';
|
||||||
if( isset($conf->domains[$i]->login_with_domain_character)
|
if( isset($conf->domains[$_SESSION['nocc_domainnum']]->login_with_domain_character)
|
||||||
&& strlen($conf->domains[$i]->login_with_domain_character)>0
|
&& strlen($conf->domains[$_SESSION['nocc_domainnum']]->login_with_domain_character)>0
|
||||||
) {
|
) {
|
||||||
$domain_char=$conf->domains[$i]->login_with_domain_character;
|
$domain_char=$conf->domains[$_SESSION['nocc_domainnum']]->login_with_domain_character;
|
||||||
}
|
}
|
||||||
$user=preg_replace("/".$domain_char.".*?$/","",$user);
|
$user=preg_replace("/".$domain_char.".*?$/","",$user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue