Unreviewed changes
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: internal/vuln/url_other.go
Insertions: 1, Deletions: 1.
@@ -1,4 +1,4 @@
-// Copyright 2019 The Go Authors. All rights reserved.
+// Copyright 2026 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
```
```
The name of the file: internal/vuln/url_windows.go
Insertions: 3, Deletions: 3.
@@ -29,7 +29,7 @@
// We do not support that format, but we should at least emit a more
// helpful error message for it.
if filepath.VolumeName(host) != "" {
- return "", errors.New("file URL encodes volume in host field: too few slashes?")
+ return "", errors.New("file URL encodes drive letter in host field (example file:///C:/path)")
}
return `\\` + host + path, nil
}
@@ -37,7 +37,7 @@
// If host is empty, path must contain an initial slash followed by a
// drive letter and path. Remove the slash and verify that the path is valid.
if vol := filepath.VolumeName(path[1:]); vol == "" || strings.HasPrefix(vol, `\\`) {
- return "", errors.New("file URL missing drive letter")
+ return "", errors.New("file URL missing drive letter (e.g., file:///C:/path)")
}
- return path[1:], nil
+ return filepath.Clean(path[1:]), nil
}
```
Change information
Commit message:
internal/vuln: add convertFileURLPath on Windows
This addresses bcmills's comment in CL 508503.
Change-Id: I528465feb074c220ca2fc8a1f50eb6c1376f6b75
Files:
- M internal/vuln/source_test.go
- M internal/vuln/url.go
- A internal/vuln/url_other.go
- M internal/vuln/url_test.go
- A internal/vuln/url_windows.go
Change size: M
Delta: 5 files changed, 65 insertions(+), 18 deletions(-)
Branch: refs/heads/master