player: preserve Deobfuscation error class through map_url wrapping
Followup to audit CRIT-1. The original audit added Deobfuscation to the switch_client whitelist but missed that map_url re-wraps the cipher_to_url_params error into ExtractionError::InvalidData on line ~727 — InvalidData is NOT switchable, so when a cipher stream appears on Mobile/Desktop (where our sig fn is unavailable), the player chain still died instead of falling through to the next client. Caught by the full integration suite: get_player_from_client::case_2_mobile panicked with InvalidData wrapping our "sig fn unavailable" error. Now stays as Deobfuscation through the wrap so switch_client trips and iOS / Tv handle the request instead.
This commit is contained in:
parent
1211f601df
commit
7d20913d56
1 changed files with 13 additions and 4 deletions
|
|
@ -725,10 +725,19 @@ impl<'a> StreamsMapper<'a> {
|
|||
None => match signature_cipher {
|
||||
Some(signature_cipher) => {
|
||||
self.cipher_to_url_params(signature_cipher).map_err(|e| {
|
||||
ExtractionError::InvalidData(
|
||||
format!("Could not deobfuscate signatureCipher `{signature_cipher}`: {e}")
|
||||
.into(),
|
||||
)
|
||||
// Audit follow-up to CRIT-1: keep the Deobfuscation
|
||||
// error class through the wrapper so `switch_client`
|
||||
// still trips when a cipher stream surfaces on a
|
||||
// client whose deobf is unavailable. The previous
|
||||
// `InvalidData(...)` wrapping silently demoted this
|
||||
// to a non-switchable error and killed the whole
|
||||
// player_from_clients chain on Mobile/Desktop sig paths.
|
||||
ExtractionError::Deobfuscation(
|
||||
format!(
|
||||
"signatureCipher `{signature_cipher}`: {e}"
|
||||
)
|
||||
.into(),
|
||||
)
|
||||
})
|
||||
}
|
||||
None => Err(ExtractionError::InvalidData(
|
||||
|
|
|
|||
Reference in a new issue