RDKB-66901 : Updated parser to preserve additional characters in GET, POST and file metadata - #43
Closed
pavankumar464 wants to merge 2 commits into
Closed
pavankumar464 wants to merge 2 commits into
pavankumar464 wants to merge 2 commits into
Conversation
… POST, and file metadata
Contributor
There was a problem hiding this comment.
🔵 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
∧as unconditional delimiters, butsource/jst_post.c:770-776serializes the multipart filename and other metadata into this string without escaping them. A valid filename such asa&b.txtora;b.txtis therefore split into extra records and$_FILESis 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.
Contributor
There was a problem hiding this comment.
🟡 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
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change: Webui Wi-Fi page 500 Internal Error
Test Procedure: Test Webui actions
Risks: Low
Priority: P1