Ticket #3266: secret_same_as_extension.patch

File secret_same_as_extension.patch, 1.4 kB (added by kgarrison, 3 years ago)
  • amp_conf/htdocs/admin/modules/core/functions.inc.php

    old new  
    41144114 
    41154115    // sip 
    41164116    $tmparr = array(); 
    4117     $tmparr['secret'] = array('value' => '', 'level' => 0, 'jsvalidation' => 'isEmpty() && !confirm("'.$msgConfirmSecret.'")', 'failvalidationmsg' => $msgInvalidSecret); 
     4117    $tmparr['secret'] = array('value' => '', 'level' => 0, 'jsvalidation' => '(' . $_REQUEST['extdisplay'] . ' == document.frm_extensions.devinfo_secret.value && !confirm("Your device secret and your extension number should not be the same. There are automated scripts that look for this exact thing and if your system is found by these scripts they can login to your extensions and start making massive amounts of phone calls. Only use matching passwords on systems that do not have any connection to the internet")) || isEmpty() && !confirm("'.$msgConfirmSecret.'")', 'failvalidationmsg' => $msgInvalidSecret); 
    41184118    $tmparr['dtmfmode'] = array('value' => 'rfc2833', 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidDTMFMODE ); 
    41194119    $tmparr['canreinvite'] = array('value' => 'no', 'level' => 1); 
    41204120    $tmparr['context'] = array('value' => 'from-internal', 'level' => 1);