Fix decryption flags for created WC24 tasks - #6
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjust WC24 task flag derivation for created AES-OFB channel-content tasks and reconcile existing tasks by repairing mismatched flags rather than assuming they are correctly configured. Sequence diagram for WC24 task creation and flag reconciliationsequenceDiagram
actor User
participant provision
participant _write_task
participant _created_task_flags
User->>provision: provision(path, manifest, apply)
provision->>_write_task: _write_task(data, manifest, task)
_write_task->>_created_task_flags: _created_task_flags(task)
_created_task_flags-->>_write_task: flags (UNSIGNED_FLAG | ENCRYPTED_CHANNEL_FLAGS | 0)
_write_task-->>provision: task entry written
provision->>_created_task_flags: _created_task_flags(task)
_created_task_flags-->>provision: expected_flags
provision-->>User: [current.flags == expected_flags and task.mode == create]
provision-->>User: [bool(current.flags & UNSIGNED_FLAG) == task.unsigned and task.mode != create]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
_created_task_flagshelper currently special-cases onlyunsignedandwc24-aes-ofbenvelopes; consider making the envelope values an explicit enum/constant set and documenting or handling other envelope types to avoid silently defaulting to0for future encrypted modes. - The flag reconciliation condition in
provisioncombines full equality forcreatemode with a bitwise UNSIGNED_FLAG check for other modes, which is a bit hard to read; you could refactor this into named helper functions or intermediate variables to make the different matching strategies clearer.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `_created_task_flags` helper currently special-cases only `unsigned` and `wc24-aes-ofb` envelopes; consider making the envelope values an explicit enum/constant set and documenting or handling other envelope types to avoid silently defaulting to `0` for future encrypted modes.
- The flag reconciliation condition in `provision` combines full equality for `create` mode with a bitwise UNSIGNED_FLAG check for other modes, which is a bit hard to read; you could refactor this into named helper functions or intermediate variables to make the different matching strategies clearer.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
0xAchannel-content flags when JWC24 creates an AES-OFB WC24 taskRoot cause
The new daily
header.bintask was created with flags0x0, while HBNJ'sworking native
epg.binandstr.bintasks both use0xA. Dolphin downloadedthe header but wrote its AES ciphertext directly into the VFF, so TV no Tomo
could not parse the new 12-entry genre table.
Validation
0x0to0xA0xASummary by Sourcery
Correct WC24 task flag handling for newly created AES-encrypted channel-content tasks and their reconciliation.
Bug Fixes:
Enhancements: