Skip to content

RDKB-66188: add CSRF token initialization in parental reports ajaxDo() - #79

Merged
pavankumar464 merged 5 commits into
developfrom
bug/XB10-2904-ParentalControlReports
Jul 29, 2026
Merged

RDKB-66188: add CSRF token initialization in parental reports ajaxDo()#79
pavankumar464 merged 5 commits into
developfrom
bug/XB10-2904-ParentalControlReports

Conversation

@pavankumar464

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 23, 2026 14:37
@pavankumar464
pavankumar464 requested review from a team as code owners July 23, 2026 14:37
@github-actions

Copy link
Copy Markdown

📋 PR Format Reminder

  • Description missing:
    • Reason for change
    • Test Procedure
    • Risks (Low / Medium / High)
    • Priority (P0 / P1 / P2)

Expected:

TICKET-123 : brief description

Reason for change: why
Test Procedure: how to verify
Risks: Low / Medium / High
Priority: P0 / P1 / P2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds CSRF token initialization for the parental reports AJAX request so the existing headers: { csrfp_token: token } code sends a valid token.

Changes:

  • Initialize token from $_SESSION['Csrf_token'] inside ajaxDo() before issuing the AJAX request.

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

Copilot AI review requested due to automatic review settings July 24, 2026 03:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

source/Styles/xb3/jst/parental_reports.jst:304

  • The CSRF token is only sent as a request header, but the in-repo CSRFProtector implementation validates GET requests using $_GET[csrfp_token] (and its POST helper only checks $_POST, not headers). If this endpoint is protected for GET, the header alone won’t satisfy validation; include the token in the query params (or switch this endpoint to POST to avoid putting tokens in URLs).
	ajaxrequest=$.ajax({
		type:"GET",
		url:"actionHandler/ajax_parental_reports.jst",
		data:{mode:mode,timef:timef},
		dataType:"json",
		headers: { csrfp_token: token },
		success:function(results){

Comment thread source/Styles/xb3/jst/parental_reports.jst
Copilot AI review requested due to automatic review settings July 24, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@pavankumar464 pavankumar464 changed the title XB10-2904: add CSRF token initialization in parental reports ajaxDo() RDKB-66188: add CSRF token initialization in parental reports ajaxDo() Jul 24, 2026
@pavankumar464
pavankumar464 merged commit fb91bbc into develop Jul 29, 2026
8 of 9 checks passed
@pavankumar464
pavankumar464 deleted the bug/XB10-2904-ParentalControlReports branch July 29, 2026 14:41
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 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.

3 participants