Fix/catchup (#778)

* Fix: setting auth web_ui token_ttl_mins = 0 fixed.
* Fix: catchup
* New: added playlist update log view
* Fix: Landing Page
New: "Last Page"  added for Landing Page selection
This commit is contained in:
euzu
2026-06-18 16:03:09 +02:00
committed by GitHub
parent 026aa1adb8
commit bfcd66ffcc
49 changed files with 1757 additions and 295 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ pub static CONSTANTS: LazyLock<Constants> = LazyLock::new(|| {
re_ipv4: Regex::new(r"\b((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\b").unwrap(),
re_ipv6: Regex::new(r"\b([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b|\b::([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}\b|\b([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}\b|\b::ffff:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b").unwrap(),
re_stream_url: Regex::new(
r"(?i)^(?P<scheme>(?:https?|batch|provider)://)[^/]+/(?P<ctx>live|video|movie|series|m3u-stream|resource)/[^/]+/[^/]+/"
r"(?i)^(?P<scheme>(?:https?|batch|provider)://)[^/]+/(?P<ctx>live|video|movie|series|m3u-stream|resource|timeshift|streaming|xtream|timeshift\.php)/[^/]+/[^/]+/"
)
.unwrap(),
re_url: Regex::new(r"(.*://).*?/(.*)").unwrap(),
+35
View File
@@ -197,4 +197,39 @@ mod tests {
set_sanitize_sensitive_info(previous);
}
#[test]
fn sanitize_sensitive_info_masks_path_credentials_for_all_xtream_contexts() {
// Regression: only `live|video|movie|series|m3u-stream|resource` were originally
// listed in `re_stream_url`, so URLs like `/timeshift/{user}/{pass}/...` leaked
// the username and password into log lines. The regex was extended to also
// cover `timeshift`, `streaming`, `xtream`, and `timeshift.php`.
let previous = super::is_sanitize_sensitive_info_enabled();
set_sanitize_sensitive_info(true);
let cases: &[(&str, &str)] = &[
(
"http://example/timeshift/myuser/mypass/3/2026-06-17:14-00/449.ts",
"http://***/timeshift/***/3/2026-06-17:14-00/449.ts",
),
("http://example/streaming/myuser/mypass/123.ts", "http://***/streaming/***/123.ts"),
("http://example/xtream/myuser/mypass/123.ts", "http://***/xtream/***/123.ts"),
("http://example/timeshift.php/myuser/mypass/123.ts", "http://***/timeshift.php/***/123.ts"),
("https://provider.example/movie/myuser/mypass/456.ts", "https://***/movie/***/456.ts"),
("https://provider.example/series/myuser/mypass/789.ts", "https://***/series/***/789.ts"),
];
for (input, expected) in cases {
assert_eq!(sanitize_sensitive_info(input).as_ref(), *expected, "input: {input}");
}
// Query-string credentials are masked by `re_credentials`, not by the
// stream-URL rewriter — the host is still masked by `re_url`.
assert_eq!(
sanitize_sensitive_info("http://example/player_api.php?username=foo&password=bar"),
"http://***/player_api.php?username=***&password=***"
);
set_sanitize_sensitive_info(previous);
}
}