GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — url: fix case-insensitive extended UNC paths in pathToFileURL by ShakilUrRehman21 · Pull Request #67178 · nodejs/node ConversationDescriptionWindows paths and namespaces are case-insensitive. When using As a result:
Additionally, extended UNC paths with empty servernames (e.g. This PR:
Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsWindows paths and namespaces are case-insensitive. Extended UNC paths prefixed with `\\?\unc\` or mixed case like `\\?\Unc\` were not recognized by `pathToFileURL` because it only checked for uppercase `\\?\UNC\`. As a result, the UNC prefix was incorrectly handled as a standard UNC path with an empty hostname, causing `fileURLToPath` to throw ERR_INVALID_FILE_URL_PATH on the resulting URL. Additionally, extended UNC paths with empty servernames (such as `\\?\UNC\\share`) were bypassing validation because the empty servername check was hardcoded to `hostnameEndIndex === 2` instead of checking against `prefixLength`. This commit updates `pathToFileURL` to: - Match `\\?\UNC\` case-insensitively using `StringPrototypeToUpperCase`. - Validate that `hostnameEndIndex !== prefixLength` before slicing the hostname, properly throwing ERR_INVALID_ARG_VALUE when the extended UNC servername is empty. - Add test coverage for lowercase and mixed-case extended UNC paths and empty extended UNC servernames. Signed-off-by: shakilurrehman21 <[email protected]>
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
4 tasks done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
needs-ci
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |