1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00
nix/src/libutil
Sergei Zimmerman dc1b2012af
libutil: Fix handling of unescaped spaces, quotes and shevrons in queries and fragments
Turns out we didn't have tests for some of the important behavior introduced
for flake reference fragments and url queries [1]. This is rather important
and is relied upon by existing tooling. This fixes up these exact cases before
handing off the URL to the Boost.URL parser.

To the best of my knowledge this implements the same behavior as prior regex-based
parser did [2]:

> fragmentRegex = "(?:" + pcharRegex + "|[/? \"^])*";
> queryRegex = "(?:" + pcharRegex + "|[/? \"])*";

[1]: 9c0a09f09f
[2]: https://github.com/NixOS/nix/blob/2.30.2/src/libutil/include/nix/util/url-parts.hh
2025-08-16 23:00:31 +03:00
..
freebsd meson: Get rid of multiline array formatting hack 2025-08-07 02:57:02 +03:00
include/nix/util libutil: Fix handling of unescaped spaces, quotes and shevrons in queries and fragments 2025-08-16 23:00:31 +03:00
linux meson: Get rid of multiline array formatting hack 2025-08-07 02:57:02 +03:00
pch libutil: Speed up builds by using precompiled headers 2025-07-20 22:01:51 +03:00
signature libutil: Fix i686-linux build on clangStdenv 2025-08-12 22:48:15 +03:00
unix meson: Apply formatting universally 2025-08-07 02:58:29 +03:00
widecharwidth Apply clang-format universally. 2025-07-18 12:47:27 -04:00
windows meson: Get rid of multiline array formatting hack 2025-08-07 02:57:02 +03:00
.version Build nix-util with Meson 2024-06-12 18:31:02 -04:00
archive.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
args.cc treewide: Sprinkle more anonymous namespace for classes private to TUs 2025-08-05 02:25:40 +03:00
base-n.cc Clean up Base* code 2025-08-06 11:51:44 -04:00
base-nix-32.cc Clean up Base* code 2025-08-06 11:51:44 -04:00
canon-path.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
compression.cc Merge pull request #13684 from the-sun-will-rise-tomorrow/identity-compression 2025-08-05 14:07:01 +02:00
compute-levels.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
config-global.cc libutil: Make AbstractConfig::getSettings const 2025-08-11 20:44:23 +03:00
configuration.cc libutil: Make AbstractConfig::getSettings const 2025-08-11 20:44:23 +03:00
current-process.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
english.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
environment-variables.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
error.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
executable-path.cc Drop fs alias in favour of std::filesystem 2025-05-01 14:24:34 +02:00
exit.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
experimental-features.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
file-content-address.cc libutil: Make HashResult a proper struct 2025-08-08 02:06:14 +03:00
file-descriptor.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
file-system.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
fs-sink.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
git.cc libutil: Make HashResult a proper struct 2025-08-08 02:06:14 +03:00
hash.cc Inline printHash16or32 and remove redundant helper (#13716) 2025-08-08 11:47:47 -04:00
hilite.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
json-utils.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
logging.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
memory-source-accessor.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
meson.build libutil: Move references.{hh,cc} to libstore 2025-08-08 10:30:09 +03:00
meson.options meson: Apply formatting universally 2025-08-07 02:58:29 +03:00
mounted-source-accessor.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
nix-meson-build-support rename: build-utils-meson -> nix-meson-build-support 2024-12-09 16:54:42 +01:00
package.nix Fix FreeBSD builds 2025-05-28 12:47:33 -04:00
pos-table.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
position.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
posix-source-accessor.cc Merge branch 'master' (reformat) 2025-07-23 21:22:27 +02:00
serialise.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
source-accessor.cc libutil: Make HashResult a proper struct 2025-08-08 02:06:14 +03:00
source-path.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
strings.cc treewide: Use StringSet alias consistently instead of std::set<std::string> 2025-05-02 17:40:29 +00:00
subdir-source-accessor.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
suggestions.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
tarfile.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
tee-logger.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
terminal.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
thread-pool.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
union-source-accessor.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
unix-domain-socket.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
url.cc libutil: Fix handling of unescaped spaces, quotes and shevrons in queries and fragments 2025-08-16 23:00:31 +03:00
users.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00
util.cc Clean up Base* code 2025-08-06 11:51:44 -04:00
xml-writer.cc Apply clang-format universally. 2025-07-18 12:47:27 -04:00