Skip to content

RDKB-63902 : Unable to access MSO login page#108

Merged
GoutamD2905 merged 1 commit intodevelopfrom
XF10_611
Mar 13, 2026
Merged

RDKB-63902 : Unable to access MSO login page#108
GoutamD2905 merged 1 commit intodevelopfrom
XF10_611

Conversation

@Leela-Charumathi
Copy link
Copy Markdown
Contributor

RDKB-63902 : Unable to access MSO login page

Reason for change: Added interface handling for WANOE, EPON, and XGSPON - XF10
Test Procedure: Verify MSO Login is successfull
Priority: P1
Risks: Low

Signed-off-by: Leela Charumathi M LeelaCharumathi_M@comcast.com

Reason for change: Added interface handling for WANOE, EPON, and XGSPON - XF10
Test Procedure: Verify MSO Login is successfull
Priority: P1
Risks: Low

Signed-off-by: Leela Charumathi M <LeelaCharumathi_M@comcast.com>
@Leela-Charumathi Leela-Charumathi requested review from a team as code owners March 12, 2026 11:33
Copilot AI review requested due to automatic review settings March 12, 2026 11:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses RDKB-63902 (“Unable to access MSO login page”) by extending WAN interface detection logic so the UI correctly classifies requests when WAN is active over WANOE, EPON, or XGSPON (XF10).

Changes:

  • Read WAN Manager InterfaceActiveStatus to detect WANOE/EPON/XGSPON active states.
  • When detected, use CurrentActiveInterface to compute interface IPs and apply the existing remote-access / bridge-static gating logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +561 to +562
$currentIface = getStr("Device.X_RDK_WanManager.CurrentActiveInterface");
$remote_ip=get_ips($currentIface);
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$currentIface comes from a TR-181 string and is passed directly into get_ips(), which builds a shell command via string concatenation (see get_ips() using ip addr show + $if_name). This introduces a command-injection/argument-injection risk (e.g., whitespace or shell metacharacters in CurrentActiveInterface) and can also cause ip addr show to run without an interface when the value is empty. Please validate/whitelist the interface name (and fail closed if empty/invalid) before calling get_ips() (or escape the argument safely).

Suggested change
$currentIface = getStr("Device.X_RDK_WanManager.CurrentActiveInterface");
$remote_ip=get_ips($currentIface);
$currentIface = trim(getStr("Device.X_RDK_WanManager.CurrentActiveInterface"));
// Validate interface name before using it in get_ips(), which builds a shell command.
if ($currentIface === "" || !preg_match('/^[a-zA-Z0-9_.:-]+$/', $currentIface)) {
// Fail closed: treat as no remote IPs if interface name is empty/invalid.
$remote_ip = array();
} else {
$remote_ip = get_ips($currentIface);
}

Copilot uses AI. Check for mistakes.
Comment on lines +560 to +572
}else if(strstr($wanStatus,"WANOE,1") || strstr($wanStatus,"EPON,1") || strstr($wanStatus,"XGSPON,1")){
$currentIface = getStr("Device.X_RDK_WanManager.CurrentActiveInterface");
$remote_ip=get_ips($currentIface);
if (in_array($server_ip,$remote_ip)){
$adminOnlyMode= "false";
if( $remoteAcess && ($httpRemoteEnable || $httpsRemoteEnable) && (($server_port==$httpRemotePort)|| ($server_port==$httpsRemotePort))){
return "rm_ip";
}
}
if(($lanMode=="bridge-static")&&($adminOnlyMode=="true")){
return "rm_ip";
}
return "eth_ip";
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new WANOE/EPON/XGSPON branch duplicates the same remote-access/bridge-static logic used in the ethernet branch, but with different indentation (spaces vs tabs) and trailing whitespace. This makes the control flow harder to read and increases the chance of the branches drifting over time. Consider factoring the common logic into a shared path (e.g., compute the upstream interface once, then run the same checks) and align indentation with the surrounding code style.

Copilot uses AI. Check for mistakes.
@GoutamD2905 GoutamD2905 merged commit 226895f into develop Mar 13, 2026
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants