Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 41 additions & 40 deletions source/Styles/xb3/jst/actionHandler/ajax_remote_management.jst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?%
/*
If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 3 in source/Styles/xb3/jst/actionHandler/ajax_remote_management.jst

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/Styles/xb3/jst/actionHandler/ajax_remote_management.jst' (Match: rdkb/components/opensource/ccsp/webui/rdkb/components/opensource/ccsp/webui/1, 179 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/webui/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/Styles/xb3/code/actionHandler/ajax_remote_management.php)
following copyright and licenses apply:
Copyright 2016 RDK Management
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -26,7 +26,6 @@
$result='';
function PORTTEST($port,$arraySp,$arrayEp){
if ( (parseInt($port)>=parseInt($arraySp)) && (parseInt($port)<=parseInt($arrayEp)) ) return 1;

else return 0;
}
if($_POST['http'] == 'false' || $_POST['https'] == 'false'){
Expand Down Expand Up @@ -60,47 +59,49 @@
if($validation && ($_POST['httpport'] != 'notset') && !($_POST['httpport'] >= 1025 && $_POST['httpport'] <= 65535))
$validation = false;
if($validation) {
$httpsport=$_POST['httpsport'];
$httpport=$_POST['httpport'];
$rootObjName = "Device.NAT.PortMapping.";
$paramNameArray = ["Device.NAT.PortMapping."];
$mapping_array = ["Enable","ExternalPort", "ExternalPortEndRange"];
$portMappingValues = getParaValues($rootObjName, $paramNameArray, $mapping_array);
for(var $keytmp in $portMappingValues) {
$key=$portMappingValues[$keytmp];
if($key["Enable"]=="true"){
$arraySPort = $key["ExternalPort"];
$arrayEPort = $key["ExternalPortEndRange"];
$httpsportvalidation = PORTTEST($httpsport,$arraySPort,$arrayEPort);
$httpportvalidation = PORTTEST($httpport,$arraySPort,$arrayEPort);
if( ($httpportvalidation == 1) || ($httpsportvalidation == 1)){
$result ="Conflict with other port. Please use a different port!";
break;
}
$gotHttpPort = getStr("Device.X_CISCO_COM_DeviceControl.HTTPPort");
$gotHttpsPort = getStr("Device.X_CISCO_COM_DeviceControl.HTTPSPort");
$httpport = (($_POST['httpport'] == 'notset') && ($_POST['http'] == 'true')) ? $gotHttpPort : $_POST['httpport'];
$httpsport = (($_POST['httpsport'] == 'notset') && ($_POST['https'] == 'true')) ? $gotHttpsPort : $_POST['httpsport'];

}
}
$rootObjName = "Device.NAT.PortMapping.";
$paramNameArray = ["Device.NAT.PortMapping."];
$mapping_array = ["Enable","ExternalPort", "ExternalPortEndRange"];
$portMappingValues = getParaValues($rootObjName, $paramNameArray, $mapping_array);
for(var $keytmp in $portMappingValues) {
$key=$portMappingValues[$keytmp];
if($key["Enable"]=="true"){
$arraySPort = $key["ExternalPort"];
$arrayEPort = $key["ExternalPortEndRange"];
$httpsportvalidation = PORTTEST($httpsport,$key["ExternalPort"],$key["ExternalPortEndRange"]);
$httpportvalidation = PORTTEST($httpport,$key["ExternalPort"],$key["ExternalPortEndRange"]);
if( ($httpportvalidation == 1) || ($httpsportvalidation == 1)){
$result = "Conflict with other port. Please use a different port!";
break;
}
}
}

$rootObjName = "Device.NAT.X_CISCO_COM_PortTriggers.Trigger.";
$paramNameArray = ["Device.NAT.X_CISCO_COM_PortTriggers.Trigger."];
$mapping_array = ["Description", "TriggerProtocol", "TriggerPortStart", "TriggerPortEnd", "ForwardPortStart", "ForwardPortEnd"];
$portTriggerValues = getParaValues($rootObjName, $paramNameArray, $mapping_array);
for(var $keytmp in $portTriggerValues) {
$key=$portTriggerValues[$keytmp];
$arrayFsp = $key["TriggerPortStart"];
$arrayFep = $key["TriggerPortEnd"];
$arrayTsp = $key["ForwardPortStart"];
$arratTep = $key["ForwardPortEnd"];
$fphttptest=PORTTEST($httpport,$arrayFsp,$arrayFep);
$tphttptest=PORTTEST($httpport,$arrayTsp,$arratTep);
$fphttpstest=PORTTEST($httpsport,$arrayFsp,$arrayFep);
$tphttpstest=PORTTEST($httpsport,$arrayTsp,$arratTep);
//echo $fptest;
if ($fphttptest==1 || $tphttptest==1 || $fphttpstest==1 || $tphttpstest==1) {
$result = "Conflict with other port123. Please use a different port!";
break;
}
}
$rootObjName = "Device.NAT.X_CISCO_COM_PortTriggers.Trigger.";
$paramNameArray = ["Device.NAT.X_CISCO_COM_PortTriggers.Trigger."];
$mapping_array = ["Description", "TriggerProtocol", "TriggerPortStart", "TriggerPortEnd", "ForwardPortStart", "ForwardPortEnd"];
$portTriggerValues = getParaValues($rootObjName, $paramNameArray, $mapping_array);
for(var $keytmp in $portTriggerValues) {
$key=$portTriggerValues[$keytmp];
$arrayFsp = $key["TriggerPortStart"];
$arrayFep = $key["TriggerPortEnd"];
$arrayTsp = $key["ForwardPortStart"];
$arratTep = $key["ForwardPortEnd"];
$fphttptest=PORTTEST($httpport,$arrayFsp,$arrayFep);
$tphttptest=PORTTEST($httpport,$arrayTsp,$arratTep);
$fphttpstest=PORTTEST($httpsport,$arrayFsp,$arrayFep);
$tphttpstest=PORTTEST($httpsport,$arrayTsp,$arratTep);
//echo $fptest;
if ($fphttptest==1 || $tphttptest==1 || $fphttpstest==1 || $tphttpstest==1) {
$result = "Conflict with other port. Please use a different port!";
break;
}
}

if($result==""){
if ($_POST['allowtype']!="notset") setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.FromAnyIP",$_POST['allowtype'],true);
Expand Down
4 changes: 3 additions & 1 deletion source/Styles/xb6/jst/network_setup.jst
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ function sec2dhm($sec)
}
$partnerId = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.PartnerId");
$fistUSif = getFirstUpstreamIpInterface();
if($jsMapEnable == "true")
if($jsMapEnable == "true") {
$WANIPv4 = getStr($dhcp_client_interface_v6+".X_RDKCENTRAL-COM_RcvOption.MapIpv4Address");
$WANIPv4 += '<span id="shrdMpT_ns"> (Shared using MAP-T)</span>';
}
else
$WANIPv4 = getStr($fistUSif+"IPv4Address.1.IPAddress");
$ids = explode(",", getInstanceIds($fistUSif+"IPv6Address."));
Expand Down
Loading