<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/path/filepath/path.go, branch json-isValidNumber</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-02-14T16:51:16Z</updated>
<entry>
<title>path/filepath: do not Clean("a/../c:/b") into c:\b on Windows</title>
<updated>2023-02-14T16:51:16Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-12-13T00:43:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=95eb5abd6340b271ae728f99986eeccbc0354ab1'/>
<id>urn:sha1:95eb5abd6340b271ae728f99986eeccbc0354ab1</id>
<content type='text'>
Do not permit Clean to convert a relative path into one starting
with a drive reference. This change causes Clean to insert a .
path element at the start of a path when the original path does not
start with a volume name, and the first path element would contain
a colon.

This may introduce a spurious but harmless . path element under
some circumstances. For example, Clean("a/../b:/../c") becomes `.\c`.

This reverts CL 401595, since the change here supersedes the one
in that CL.

Thanks to RyotaK (https://twitter.com/ryotkak) for reporting this issue.

Fixes #57274
Fixes CVE-2022-41722

Change-Id: I837446285a03aa74c79d7642720e01f354c2ca17
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1675249
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Julie Qiu &lt;julieqiu@google.com&gt;
TryBot-Result: Security TryBots &lt;security-trybots@go-security-trybots.iam.gserviceaccount.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/468123
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: add IsLocal</title>
<updated>2022-11-16T23:17:58Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-11-10T01:49:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6d0bf438e302afcb0db5422ea2da59d1995e08c1'/>
<id>urn:sha1:6d0bf438e302afcb0db5422ea2da59d1995e08c1</id>
<content type='text'>
IsLocal reports whether a path lexically refers to a location
contained within the directory in which it is evaluated.
It identifies paths that are absolute, escape a directory
with ".." elements, and (on Windows) paths that reference
reserved device names.

For #56219.

Change-Id: I35edfa3ce77b40b8e66f1fc8e0ff73cfd06f2313
Reviewed-on: https://go-review.googlesource.com/c/go/+/449239
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Joedian Reid &lt;joedian@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: detect all forms of \\ volume paths on Windows</title>
<updated>2022-11-09T22:06:00Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-10-19T21:41:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=be9d78c9c5905fbc10d8cd6a4714dd4ad1c91674'/>
<id>urn:sha1:be9d78c9c5905fbc10d8cd6a4714dd4ad1c91674</id>
<content type='text'>
Previously, the volumeNameLen function checked for UNC paths starting
with two slashes, a non-'.' character, and another slash. This misses
volume names such as "\\.\C:\".

The previous check for volume names rejects paths beginning
with "\\.". This is incorrect, because while these names are not
UNC paths, "\\.\C:\" is a DOS device path prefix indicating the
C: device. It also misses UNC path prefixes in the form
"\\.\UNC\server\share\".

The previous check for UNC paths also rejects any path with an
empty or missing host or share component. This leads to a number
of possibly-incorrect behaviors, such as Clean(`\\a`) returning `\a`.
Converting the semantically-significant `\\` prefix to a single `\`
seems wrong.

Consistently treat paths beginning with two separators as having
a volume prefix.

Update VolumeName to detect DOS device paths (`\\.\` or `\\?\`),
DOS device paths linking to UNC paths (`\\.\UNC\Server\Share`
or `\\?\UNC\Server\Share`), and UNC paths (`\\Server\Share\`).

	Clean(`\\a`) = `\\a`
	Join(`\\`, `a`, `b`) = `\\a\b`

In addition, normalize path separators in VolumeName for consistency
with other functions which Clean their result.

Fixes #56336

Change-Id: Id01c33029585bfffc313dcf0ad42ff6ac7ce42fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/444280
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Quim Muntal &lt;quimmuntal@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: document that WalkDir uses OS paths</title>
<updated>2022-09-14T14:19:13Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-05-10T23:16:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ebbaba281393de259b751779185855001876090a'/>
<id>urn:sha1:ebbaba281393de259b751779185855001876090a</id>
<content type='text'>
Fixes #52812

Change-Id: Idb70d0540bbf9ecdc64293c62a23f07ee3be883c
Reviewed-on: https://go-review.googlesource.com/c/go/+/405615
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Caleb Spare &lt;cespare@gmail.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath, io/fs: add SkipAll</title>
<updated>2022-08-25T18:50:37Z</updated>
<author>
<name>Paschalis Tsilias</name>
<email>paschalis.tsilias@gmail.com</email>
</author>
<published>2021-11-13T00:18:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=95a786da1265d84290c1a0d1186352f71475ff9f'/>
<id>urn:sha1:95a786da1265d84290c1a0d1186352f71475ff9f</id>
<content type='text'>
Fixes #47209

Change-Id: If75b0dd38f2c30a23517205d80c7a6683a5c921c
Reviewed-on: https://go-review.googlesource.com/c/go/+/363814
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>path/filepath: do not remove prefix "." when following path contains ":".</title>
<updated>2022-05-24T21:52:14Z</updated>
<author>
<name>Yasuhiro Matsumoto</name>
<email>mattn.jp@gmail.com</email>
</author>
<published>2022-04-22T01:07:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9cd1818a7d019c02fa4898b3e45a323e35033290'/>
<id>urn:sha1:9cd1818a7d019c02fa4898b3e45a323e35033290</id>
<content type='text'>
Fixes #52476

Change-Id: I9eb72ac7dbccd6322d060291f31831dc389eb9bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/401595
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: gofmt main repo</title>
<updated>2022-04-11T16:34:30Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-02-03T19:12:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=19309779ac5e2f5a2fd3cbb34421dafb2855ac21'/>
<id>urn:sha1:19309779ac5e2f5a2fd3cbb34421dafb2855ac21</id>
<content type='text'>
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.

For #51082.

Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>all: replace `` and '' with “ (U+201C) and ” (U+201D) in doc comments</title>
<updated>2022-04-05T17:52:29Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-02-03T19:05:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=81431c7aa7c5d782e72dec342442ea7664ef1783'/>
<id>urn:sha1:81431c7aa7c5d782e72dec342442ea7664ef1783</id>
<content type='text'>
go/doc in all its forms applies this replacement when rendering
the comments. We are considering formatting doc comments,
including doing this replacement as part of the formatting.
Apply it to our source files ahead of time.

For #51082.

Change-Id: Ifcc1f5861abb57c5d14e7d8c2102dfb31b7a3a19
Reviewed-on: https://go-review.googlesource.com/c/go/+/384262
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>io/fs, path/filepath: honor SkipDir on second WalkDirFunc error call</title>
<updated>2022-03-28T22:03:07Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-03-13T00:18:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=460fd63cccd2f1d16fc4b1b761545b1649e14e28'/>
<id>urn:sha1:460fd63cccd2f1d16fc4b1b761545b1649e14e28</id>
<content type='text'>
Fixes #51617

Change-Id: I03e9e575d9bad1481e7e4f051b50a077ba5f2fe0
Reviewed-on: https://go-review.googlesource.com/c/go/+/392154
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
</content>
</entry>
<entry>
<title>path/filepath: fix documentation typo (was "each each")</title>
<updated>2021-05-02T18:13:38Z</updated>
<author>
<name>Vitaly Zdanevich</name>
<email>zdanevich.vitaly@ya.ru</email>
</author>
<published>2021-05-01T21:13:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=352a322a8356ef5f7d9392c401cd9f181a1cf80b'/>
<id>urn:sha1:352a322a8356ef5f7d9392c401cd9f181a1cf80b</id>
<content type='text'>
Change-Id: I8dcf6c4489e16e91b8685c31569297cfeb700f9d
GitHub-Last-Rev: f6b40e029874230789a7ae2b750a42a355ae42cf
GitHub-Pull-Request: golang/go#45905
Reviewed-on: https://go-review.googlesource.com/c/go/+/316009
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Kevin Burke &lt;kev@inburke.com&gt;
Trust: Kevin Burke &lt;kev@inburke.com&gt;
</content>
</entry>
</feed>
