tvl-depot/users
Profpatsch ed68ba6751 feat(users/Profpatsch/netencode): ignore earlier record entries
It turns out that the netencode spec requiring to ignore *later*
entries meant that every parser has to do an extra check for each
element, instead of just overriding the key in the hash map.

This leads to a situation where the simple implementation is the wrong
one, which would lead to very subtle problems in parsers (see also the
infamous “json duplicate record entry” problem which has been used for
various exploits in the past).

To be fair, exploits are still possible, but at least a `Map.fromList`
will be the right implementation (provided it folds from the left) now
instead of the wrong one.

Examples of the trivial implementation being now right:

Python:

    > dict([("foo", 1), ("foo", 2)])
    {'foo': 2}

Rust:

    > println!("{:?}", HashMap::from([
      ("foo", 1),
      ("foo", 2)
    ]));
    {"foo": 2}

Haskell:

    > Data.Map.fromList [ ("foo", 1), ("foo", 2) ]
    fromList [("foo",2)]

Change-Id: Ife9593956f4718e5e720f4f348c227e4f3a71e2d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5108
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: Profpatsch <mail@profpatsch.de>
2022-02-14 14:12:19 +00:00
..
cynthia style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
edef style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
ericvolp12 chore(users/ericvolp12): Create ericvolp12 user directory and OWNERS file 2020-06-16 02:37:07 +00:00
eta style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
firefly feat(users/firefly): initialize with key for as 2020-09-28 13:41:40 +00:00
flokli feat(ops/nixos/whitby): add flokli user 2021-03-26 20:31:48 +00:00
grfn feat(grfn/home): Add function for git show -s --pretty=reference 2022-02-08 16:59:56 +00:00
isomer chore(whitby): Move isomer's SSH key to user directory 2020-07-23 19:32:15 +00:00
lukegb chore(lukegb): add keys.clouvider-lon01-nix 2020-11-30 23:18:39 +00:00
Profpatsch feat(users/Profpatsch/netencode): ignore earlier record entries 2022-02-14 14:12:19 +00:00
qyliss feat(whitby): Add SSH key for qyliss 2020-07-23 19:37:09 +00:00
riking style(rust): Format all Rust code with rustfmt 2022-02-08 12:06:39 +00:00
sterni refactor(rust-crates-advisory): move report generation into script 2022-02-13 18:42:44 +00:00
tazjin fix(tazjin/emacs): Correctly pass through additional attributes 2022-02-08 18:06:06 +00:00
wpcarro feat(wpcarro/emacs): support avy 2022-02-13 19:09:39 +00:00
zseri refactor(zseri/s-r-sc): use inner while loop to improve perf 2021-12-30 02:00:12 +00:00
tvlbot.jpg chore(users/tazjin): Add avatar for tvlbot 2020-06-14 22:23:04 +00:00