Repository navigation
Media: a share is refused however it is spelled - #207
Merged
Merged
Conversation
The source resolver's rule (local files only) knew a share as `\..`, `//..` or `file://server/..`. The host knows more spellings: any two leading separators (`/\server\share`), the object manager's prefix (`\??\UNC\server\share`), and a `file:` URL with no host whose path starts with two separators (`file:////server/share`, `file:\server\share`, also percent-encoded). Those fell through as relative paths or drive-less local files and went to the host's resolver unchanged. They are refused now, naming the server. Paths with one leading separator, a drive after the slashes or the prefix, and the path of a URL that names this machine pass as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
muhammed-aksoy
pushed a commit
to muhammed-aksoy/VIctory
that referenced
this pull request
Nov 24, 2026
edsuuu
referenced
this pull request
in edsuuu/VI-BR-PORT
Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Thanks @Maraco91 for adding coverage around share paths that can be disguised by their spelling. I tested commit Both targeted tests passed (2 passed, 0 failed; 86 filtered):
This verifies the tested path classification and host URL conversion cases. It does not open a real remote share or exercise media playback. |
Closed
This was referenced Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
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
The source-resolver proxy lets a title open local files only (
local()), so that Media Foundation cannot fetch over the network pastmodules::net. It recognises a share as\server\..,//server/..orfile://server/... The host recognises more spellings, and these went through to the host's resolver unchanged:local()onmain/\server\share\a.mp4,\/server/share/a.mp4\server\share\a.mp4(GetFullPathNameW)\??\UNC\server\share\a.mp4\?\UNC\..; the host's file calls take the prefix as it isfile:////server/share/a.mp4,file://///server/..\server\share\a.mp4(PathCreateFromUrlW)file:\server\share\a.mp4,file:/%5Cserver/share/a.mp4\server\share\a.mp4file:///%5C%5Cserver/share/a.mp4\\server\share\a.mp4Now refused, naming the server, like the spellings already known:
\??\followed by anything but a drive (the rule\?\already has);file:URL that names no host and whose decoded path starts with two separators and is not a drive path.Unchanged, and checked:
\movies\a.mp4andfile:///movies/a.mp4(one separator),file:////C:/Windows/a.wav(a drive after the slashes: stillC:\Windows\a.wav),\??\C:\.., andfile://localhost//server/share/a.mp4, which the host reads as the local\server\share\a.mp4.What I could not check: that Media Foundation's own resolver reads
file:URLs the wayPathCreateFromUrlWdoes (it would take a share to test against). I have not seen a title pass such a URL (I have no game files); this closes spellings the rule's own contract says are refused.Tested
Windows 11 Pro 10.0.26200, rustc 1.98.1 (
x86_64-pc-windows-msvc), no game data, no GPU, no network involved (all checks are on strings).Two new unit tests over one list of spellings:
the_host_reads_those_spellings_as_shares(Windows only) pins down the right-hand column above on the host:std::path::absolutefor the two path forms,PathCreateFromUrlWfor the five URLs, that a\??\path opens (\??\%SystemRoot%), and the local reading of the three URL controls. It passes onmainand with the fix: it is the reference, not the fix's test.shares_are_refused_however_they_are_spelledcheckslocal()refuses all eight, with the scheme and server it reports, and that the five local look-alikes pass as before.Results:
main(d2a4bae) + the tests only:cargo test -p victory-hle --lib media:::shares_are_refused_however_they_are_spelledfails (/\server\share\a.mp4:left: Ok("/\server\share\a.mp4"),right: Err(("unc", "server"))); the host reference passes.cargo clippy -p victory-hle --tests: nothing inmedia.rs.rustfmt --check media.rs: clean.cargo xtask policy --staged: ok.Not tested: a title run; a real share.
#31 touches the COM release counts in this file, not
local().AI-assisted (Claude Code); the tests above were run on the machine described.
🤖 Generated with Claude Code