New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Invalid char ':'" error when building with GO111MODULE=on #39
Comments
I can appreciate why a colon is a reserved character in MS Windows file names. It also has special meaning on other non-UNIX operating systems (many of which are of historical interest only). But looking at https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#naming-conventions I'm left shaking my head in disbelief. They also disallow Regardless, we should probably rename those unit test support files and modify this module to support both colons and some other separator char for IPv6 addresses. |
Does anyone have an opinion on the optimal alternative separator char for IPv6 addresses? Underscore? Hyphen? Dollar-sign? Hash(sharp)-sign? Something else? I'd prefer not using periods due to ambiguity with IPv4 addresses. |
🍺, tbh. But seriously, is confusion with IPv4 addresses likely? That said, |
We need to go with an alternative character, hyphens sounds okay .. I guess, any thoughts ? |
I can't speak for how MS Windows file APIs work but dots, even two consecutive dots, are valid in a UNIX file name. A double dot only has special significance when that is the entire file name.
There isn't any ambiguity in practice but using periods does make it marginally harder for a human to tell at a glance whether it's an IPv4 or IPv6 address.
It should be a char that doesn't have special-meaning when used in a shell bare word. So that rules out dollar-sign, hash-mark, etc. I'm leaning towards |
|
@pyed Do you want to take care of this or would you prefer I do so since I wrote the code in question? |
@krader1961 I'd really appreciate it if you write the fix for this as you know your way around this part of the code better than I do. |
@krader1961 Any estimate on when you'll open a PR to fix this issue? I can't build Caddy from source because of this problem. |
@whalehub I will try fix it this weekend; i.e., the next 48 hours. But I'll need to send a P.R. for review and that could take a couple more days before it is merged. |
Go doesn't allow colons in file names when module support is enabled. This restriction is to acommodate systems like MS Windows where colons in file names may have special meaning. So allow the use of equal-signs in place of colons in file names that represent IPv6 addresses. Resolves pyed#39
Go doesn't allow colons in file names when module support is enabled. This restriction is to acommodate systems like MS Windows where colons in file names may have special meaning. So allow the use of equal-signs in place of colons in file names that represent IPv6 addresses. Resolves #39
@krader1961 Thank you! @pyed Can you please push a v1.1.2 release which includes this commit? |
Windows doesn't like filename ending in a dot. Yup, it's technically valid in UNIX filenames, but code to mitigate filesystem traversal vulns doesn't always know that and may reject any path with |
@pyed Thank you for the v1.1.2 release! |
Go v1.12.4 on macOS High Sierra.
When trying to build caddy v1.0.0-beta1 or master with GO111MODULE=on, go fails to extract this plugin due to colons in filenames:
It seems the Go team do not plan to allow colons in filenames, as it's a reserved character on Windows.
The text was updated successfully, but these errors were encountered: