VDB
Sign up
MEDIUM5.3

GO-2023-2186

Incorrect detection of reserved device names on Windows in path/filepath

Quick fix

GO-2023-2186 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.20.11

Details

On Windows, The IsLocal function does not correctly detect reserved device names in some cases.

Reserved names followed by spaces, such as "COM1 ", and reserved names "COM" and "LPT" followed by superscript 1, 2, or 3, are incorrectly reported as local.

With fix, IsLocal now correctly reports these names as non-local.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.20.11
Fixgo get stdlib@v1.20.11

References