| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
file:// and phar:// were built without URI path percent encoding, so any reserved character in a path segment (ex: '#', '?') could corrupt the URIs and break LSP clients
There was a problem hiding this comment.
Possible performance regression was detected for benchmark 'Phpactor Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.
| Benchmark suite | Current: 0481eb8 | Previous: 7eb622f | Ratio |
|---|---|---|---|
| ConfigLoaderBench::benchJsonPlainPhp | 0.015499726027397454 ms (± 1.52%) | 0.007512211350293557 ms (± 3.28%) | 2.06 |
This comment was automatically generated by workflow using github-action-benchmark.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue
TextDocumentUri::__toString() builds file and phar URIs by splitting the path directly on '/'. Any filesyste m path that contains reserved characters will corrupt the URI if they are not encoded/decoded.
For example, a file within a directory that contains a '#' character would cause other clients to stop parsing at that symbol, thus truncating that path. In NeoVim, if you have a file under /home/#foo/baz.php and you run vim.lsp.buf.definition() on a symbol within baz.php, would cause the opening of a buffer in /home.
TextDocument::fromString() had the same issue but in reverse.
Fix