Skip to content

RDKB-66901 : Updated parser to preserve additional characters in GET, POST and file metadata - #43

Closed
pavankumar464 wants to merge 2 commits into
developfrom
bug/RDKB-66901
Closed

pavankumar464 wants to merge 2 commits into
developfrom
bug/RDKB-66901

Conversation

@pavankumar464

Copy link
Copy Markdown
Contributor

Reason for change: Webui Wi-Fi page 500 Internal Error
Test Procedure: Test Webui actions
Risks: Low
Priority: P1

Copilot AI lite review requested due to automatic review settings September 16, 2026 06:03
@pavankumar464
pavankumar464 requested a review from a team as a code owner September 16, 2026 06:03

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.

🔵 Needs a closer look

Unescaped & and ; in metadata can still corrupt $_FILES.

Pull request overview

Updates JST request parsing to preserve = characters in GET, POST, and file metadata.

Changes:

  • Parse key/value pairs using the first = delimiter.
  • Synchronize parser fixtures and regenerate expected outputs.
File summaries
File Summary
tests/parser/jst_prefix.js Synchronizes the parser prefix fixture.
tests/parser/jst_parser_template_block_string.jst.parsed Regenerates parser output.
tests/parser/jst_parser_template_block_content.jst.parsed Regenerates parser output.
tests/parser/jst_parser_skip_whitespace.jst.parsed Regenerates parser output.
tests/parser/jst_parser_single_quotes.jst.parsed Regenerates parser output.
tests/parser/jst_parser_line_feeds.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_unknown.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_runtime.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_once.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_not_if_in_line_comment.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_not_if_in_content.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_not_if_in_block_comment.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_nested.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_malformed_1.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_code_before.jst.parsed Regenerates parser output.
tests/parser/jst_parser_include_code_after.jst.parsed Regenerates parser output.
tests/parser/jst_parser_comment_tag.jst.parsed Regenerates parser output.
tests/parser/jst_parser_backslash.jst.parsed Regenerates parser output.
jsts/jst_prefix.js Updates request parsing; metadata delimiter handling remains unresolved.
Review details

Suppressed comments (1)

jsts/jst_prefix.js:225

  • These splits still treat & and ; as unconditional delimiters, but source/jst_post.c:770-776 serializes the multipart filename and other metadata into this string without escaping them. A valid filename such as a&b.txt or a;b.txt is therefore split into extra records and $_FILES is corrupted; encode the metadata when producing the record (and decode it here), or use an unambiguous serialization format.
      var eqIdx = fileData[j].indexOf('=');
      if(eqIdx != -1)
      {
        if(!fileId)
        {
          fileId = decodeURIComponent(fileData[j].substring(eqIdx + 1));
          $_FILES[fileId]={};
        }
        else
        {
          $_FILES[fileId][decodeURIComponent(fileData[j].substring(0, eqIdx))]=decodeURIComponent(fileData[j].substring(eqIdx + 1));
  • Files reviewed: 19/19 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 16, 2026 08:11

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.

🟡 Changes recommended

The new /var/video_analytics/ lookup path is not accompanied by moving or installing the parser assets, which may cause template loading failures.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 20/20 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread source/jst_parser.c
@pavankumar464
pavankumar464 deleted the bug/RDKB-66901 branch September 16, 2026 12:02
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 16, 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.

2 participants