This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix security fix by deleting unused files
- Loading branch information
Showing
7 changed files
with
26 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,62 +31,20 @@ | |
* | ||
* For more information : [email protected] | ||
* | ||
* SVN : $URL$ | ||
* SVN : $Id$ | ||
* | ||
*/ | ||
?> | ||
<script type="text/javascript"> | ||
function mk_pagination() { | ||
} | ||
function mk_paginationFF() { | ||
} | ||
function set_header_title() { | ||
} | ||
|
||
var nextRowId; | ||
var counter = '<?php echo $maxHostId;?>'; | ||
var nbOfInitialRows = '<?php echo $nbOfInitialRows; ?>'; | ||
var o = '<?php echo $o;?>'; | ||
var arId = '<?php echo $arId;?>'; | ||
var templates; | ||
|
||
/* | ||
* Transform our div | ||
*/ | ||
function transformForm() { | ||
var params; | ||
var proc; | ||
var addrXML; | ||
var addrXSL; | ||
function mk_pagination() {} | ||
function mk_paginationFF() {} | ||
function set_header_title() {} | ||
|
||
//var params = '?sid=' + sid; | ||
|
||
if (o == 'w' || o == 'ldap') { | ||
params = '?arId=' + arId; | ||
proc = new Transformation(); | ||
addrXML = './include/options/oreon/generalOpt/ldap/xml/ldap_host.php' + params; | ||
addrXSL = './include/options/oreon/generalOpt/ldap/xsl/ldap_host.xsl'; | ||
proc.setXml(addrXML); | ||
proc.setXslt(addrXSL); | ||
proc.transform("dynamicDiv"); | ||
o = 0; | ||
} else { | ||
params = '?id=' + counter + '&nbOfInitialRows=' + nbOfInitialRows; | ||
proc = new Transformation(); | ||
addrXML = './include/options/oreon/generalOpt/ldap/xml/additionalRowXml.php' + params; | ||
addrXSL = './include/options/oreon/generalOpt/ldap/xsl/additionalRow.xsl'; | ||
proc.setXml(addrXML); | ||
proc.setXslt(addrXSL); | ||
proc.transform(nextRowId); | ||
} | ||
} | ||
let ldapTemplates = []; | ||
|
||
/* | ||
* called when the use _dns is to set at no is clicked | ||
*/ | ||
function toggleParams(checkValue, isInit) { | ||
if (checkValue == true) { | ||
function toggleParams(checkValue) { | ||
if (checkValue === true) { | ||
jQuery('#ldap_dns_use_ssl').fadeOut({duration: 0}); | ||
jQuery('#ldap_dns_use_tls').fadeOut({duration: 0}); | ||
jQuery('#ldap_dns_use_domain').fadeOut({duration: 0}); | ||
|
@@ -110,65 +68,30 @@ function toggleParams(checkValue, isInit) { | |
/* | ||
* called when LDAP is enabled or not | ||
*/ | ||
function toggleParamSync(checkValue, isInit) { | ||
if (checkValue == true) { | ||
function toggleParamSync(checkValue) { | ||
if (checkValue === true) { | ||
jQuery('#ldap_sync_interval').fadeOut({duration: 0}); | ||
} else { | ||
jQuery('#ldap_sync_interval').fadeIn({duration: 0}); | ||
} | ||
} | ||
|
||
/** | ||
* Display or hide custom options | ||
*/ | ||
function toggleCustom(select) { | ||
if (typeof(select) == 'undefined' || typeof(select.selectedIndex) == 'undefined') { | ||
return null; | ||
} | ||
value = select.options[select.selectedIndex].value; | ||
if (value == 0) { | ||
jQuery('#ldap_user_filter').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_uid_attr').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_group').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_name').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_firstname').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_lastname').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_email').fadeIn({duration: 0}); | ||
jQuery('#ldap_user_pager').fadeIn({duration: 0}); | ||
jQuery('#ldap_group_filter').fadeIn({duration: 0}); | ||
jQuery('#ldap_group_gid_attr').fadeIn({duration: 0}); | ||
jQuery('#ldap_group_member').fadeIn({duration: 0}); | ||
} else { | ||
jQuery('#ldap_user_filter').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_uid_attr').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_group').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_name').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_firstname').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_lastname').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_email').fadeOut({duration: 0}); | ||
jQuery('#ldap_user_pager').fadeOut({duration: 0}); | ||
jQuery('#ldap_group_filter').fadeOut({duration: 0}); | ||
jQuery('#ldap_group_gid_attr').fadeOut({duration: 0}); | ||
jQuery('#ldap_group_member').fadeOut({duration: 0}); | ||
} | ||
} | ||
|
||
/* | ||
* Initialises advanced parameters | ||
*/ | ||
function initParams() { | ||
initTemplates(); | ||
let noDns = false; | ||
if (document.getElementById('ldap_srv_dns_n')) { | ||
var noDns = false; | ||
if (document.getElementById('ldap_srv_dns_n').type == 'radio') { | ||
if (document.getElementById('ldap_srv_dns_n').type === 'radio') { | ||
if (document.getElementById('ldap_srv_dns_n').checked) { | ||
noDns = true; | ||
} | ||
} | ||
} | ||
// getting saved synchronization interval's time field state | ||
var loginSync = false; | ||
var loginCheckbox = document.getElementById('ldap_auto_sync_n') | ||
let loginSync = false; | ||
let loginCheckbox = document.getElementById('ldap_auto_sync_n'); | ||
if (loginCheckbox | ||
&& loginCheckbox.type === 'radio' | ||
&& loginCheckbox.checked | ||
|
@@ -177,41 +100,17 @@ function initParams() { | |
} | ||
|
||
// displaying or hiding toggling fields | ||
toggleParams(noDns, true); | ||
toggleParamSync(loginSync, true); | ||
} | ||
|
||
/* | ||
* Function is called when the '+' button is pressed | ||
*/ | ||
function addNewHost() { | ||
nbOfInitialRows++; | ||
nextRowId = 'additionalRow_' + nbOfInitialRows; | ||
transformForm(); | ||
counter++; | ||
} | ||
|
||
/* | ||
* function that is called when the 'x' button is pressed | ||
*/ | ||
function removeTr(trId) { | ||
if (document.getElementById(trId)) { | ||
if (navigator.appName == "Microsoft Internet Explorer") { | ||
document.getElementById(trId).innerText = ""; | ||
} else { | ||
document.getElementById(trId).innerHTML = ""; | ||
} | ||
jQuery('#'+trId).fadeOut({duration: 0}); | ||
} | ||
toggleParams(noDns); | ||
toggleParamSync(loginSync); | ||
} | ||
|
||
/* | ||
* Initializes templates | ||
*/ | ||
function initTemplates() { | ||
ldapTemplates = new Array(); | ||
ldapTemplates = []; | ||
|
||
ldapTemplates['Active Directory'] = new Array(); | ||
ldapTemplates['Active Directory'] = []; | ||
ldapTemplates['Active Directory']['user_filter'] = | ||
'(&(samAccountName=%s)(objectClass=user)(samAccountType=805306368))'; | ||
ldapTemplates['Active Directory']['alias'] = 'samaccountname'; | ||
|
@@ -226,7 +125,7 @@ function initTemplates() { | |
ldapTemplates['Active Directory']['group_name'] = 'samaccountname'; | ||
ldapTemplates['Active Directory']['group_member'] = 'member'; | ||
|
||
ldapTemplates['Posix'] = new Array(); | ||
ldapTemplates['Posix'] = []; | ||
ldapTemplates['Posix']['user_filter'] = '(&(uid=%s)(objectClass=inetOrgPerson))'; | ||
ldapTemplates['Posix']['alias'] = 'uid'; | ||
ldapTemplates['Posix']['user_group'] = ''; | ||
|
@@ -239,7 +138,7 @@ function initTemplates() { | |
ldapTemplates['Posix']['group_name'] = 'cn'; | ||
ldapTemplates['Posix']['group_member'] = 'member'; | ||
|
||
ldapTemplates['Okta'] = new Array(); | ||
ldapTemplates['Okta'] = []; | ||
ldapTemplates['Okta']['user_filter'] = '(&(nickName=%s)(objectclass=inetorgperson))'; | ||
ldapTemplates['Okta']['alias'] = 'nickname'; | ||
ldapTemplates['Okta']['user_group'] = 'memberof'; | ||
|
@@ -259,10 +158,9 @@ function initTemplates() { | |
function applyTemplate(templateValue) { | ||
|
||
jQuery('input[type^=text]').each(function (index, el) { | ||
key = el.getAttribute('name'); | ||
var attr = key; | ||
if (typeof(ldapTemplates[templateValue]) != 'undefined') { | ||
if (typeof(ldapTemplates[templateValue][attr]) != 'undefined') { | ||
let attr = el.getAttribute('name'); | ||
if (typeof(ldapTemplates[templateValue]) !== 'undefined') { | ||
if (typeof(ldapTemplates[templateValue][attr]) !== 'undefined') { | ||
el.value = ldapTemplates[templateValue][attr]; | ||
} | ||
} | ||
|
Oops, something went wrong.