Commit Graph

6797 Commits

Author SHA1 Message Date
Alex Shelkovnykov
3537ef56c3 Fix JSON parser decoding for UTF8
JSON supports Unicode as both UTF8 sequences and escaped UTF16. UTF8 is
encoded as between 2 and 4 bytes, the first byte of which governs the
length. The JSON parser was previously accepting any non-ASCII bytes as
UTF8 in any order.

See:
- https://www.crockford.com/mckeeman.html
- https://www.json.org/json-en.html
- https://en.wikipedia.org/wiki/UTF-8#Encoding
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
1472dadf4d Add validation functions for UTF8 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
3d93e9f527 Fix JSON parser decoding for escaped unicode
JSON supports Unicode as both UTF8 sequences and escaped UTF16. Unicode
points U+10000 to U+10FFFF are encoded as two consecutive escaped UTF16
units known as a surrogate pair. The JSON decoder was previously
treating surrogate pairs as two individual escaped UTF16 units. In
addition, the JSON standard allows hexadecimal letters to be either
uppercase or lowercase, which the parser was not respecting.

See:
- https://www.crockford.com/mckeeman.html
- https://www.json.org/json-en.html
- https://en.wikipedia.org/wiki/UTF-16#Code_points_from_U+010000_to_U+10FFFF

Git issue: #1776
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
e4ddd6994c Fix JSON parser decoding for ASCII in strings
The JSON standard rejects all un-escaped, un-printable characters EXCEPT
for the delete character (ID 127, i.e. 0x7F).

See: https://www.crockford.com/mckeeman.html
Via: https://www.json.org/json-en.html
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
2580dfbce3 Fix JSON parser decoding for numbers
\#1775
2023-04-11 14:59:15 -06:00
Ted Blackman
365a1d5af9
Merge pull request #6447 from urbit/jb/drip-hurl
behn: propagate errors in deferred moves
2023-04-11 11:28:20 -04:00
Josh Lehman
af3ad860e7
Merge pull request #6454 from urbit/ted/arvo-bout
arvo: print module compilation times
2023-04-07 08:38:08 -07:00
Ted Blackman
b273f3091b arvo: print module compilation times 2023-04-06 23:52:53 -04:00
Joe Bryan
d2eda084ac
Merge branch 'develop' into ted/ames-ping-2 2023-04-06 15:07:38 -04:00
Ted Blackman
eddbe86d69 ames: fix syntax error 2023-04-06 11:58:34 -04:00
fang
e300fa2d6b
dill: exclude wrapped-task from most +call traces
Instead of including wrapped-task as-is in most call traces, we now only
include it in traces for crashing (harden task) calls. For everything
else, we include only the tag of the resulting $task.

Closes #6444.
2023-04-06 15:58:12 +02:00
Ted Blackman
056ff35b89 app/ping: lower timeout to ~s25 2023-04-05 12:04:14 -04:00
Ted Blackman
66678acd3e ames: ping faster to sponsors 2023-04-05 11:59:06 -04:00
Joe Bryan
b6194711c3 behn: hurl errors on %drip %crud 2023-04-04 15:07:27 -04:00
Joe Bryan
9ae28a985c clay: %pass %drip with context, expect and handle errors in +take 2023-04-04 15:06:51 -04:00
midden-fabler
d8ad34f0fc update scry path listing 2023-04-04 03:06:22 -04:00
midden-fabler
bacbfd71ac add last-contact scry endpoint 2023-04-04 02:50:09 -04:00
Ted Blackman
90970469d0
Merge pull request #6427 from playfulpachyderm/i/6426/expand-new-desk
arvo: add more files to |new-desk generator
2023-04-03 12:09:26 -04:00
Alessio
38ace43ca0 arvo: change |new-desk to be minimal by default 2023-03-29 14:20:23 -03:00
Josh Lehman
fab329799f
Merge branch 'develop' into i/6297/vats 2023-03-29 08:43:07 -07:00
James D. Amberger
821f99a351 hood: options for +vats generator
This commit refactors `sur/hood.hoon` and changes the signature of the
`+vats` generator thus:

```hoon
|=  $:  [now=@da eny=@uvJ bec=beak]
        $@(~ [?(%suspended %running %blocking %nonexistent) ~])
        $:  verb=?
            show-suspended=?
            show-running=?
            show-blocking=?
            show-nonexistent=?
        ==
    ==
```

Called with a single positional argument, `+vats` will show only those
desks fitting the description given, while keyword parameters allow
finer-grained control over which desks are described. The `verb`
parameter determines whether the full load of desk information be shown,
or a subset thereof.

Resolves #6297.
2023-03-27 23:09:41 -04:00
Alessio
00b7ace08d arvo: add more files to |new-desk generator 2023-03-27 23:58:19 -03:00
Pyry Kovanen
6d80191aef
Merge pull request #6417 from urbit/release/urbit-os-v2.136
Merge urbit-os-v2.136-rc2 back to develop
2023-03-24 21:51:17 +02:00
Pyry Kovanen
cb819b2091
Merge pull request #6413 from urbit/i/6407/zeal
clay: stop failed kelvin upgrades from retrying immediately
2023-03-24 18:36:09 +02:00
Philip Monk
89500460f7 clay: stop failed kelvin upgrades from retrying immediately
We were retrying failed kelvin upgrades as many times as we had apps
that needed to be suspended, because suspending an app triggers an
attempt to run the next kelvin upgrade.  This suspends all those apps in
one batch move, and then tries the next kelvin upgrade only once at the
end.

Fixes #6407

Partially addresses #6285
2023-03-24 18:19:48 +02:00
Josh Lehman
5506236311
Merge branch 'develop' into pill-lists 2023-03-20 08:24:31 -07:00
yosoyubik
1144fb3f28 ames: use the %rcv flag when hearing a packet 2023-03-18 19:16:10 +01:00
yosoyubik
d645fcc862 ames: always ack %hear tasks on corked bones 2023-03-18 19:06:16 +01:00
silnem2
978e0eb2bd revert /sys filter in aqua 2023-03-17 12:00:13 -06:00
yosoyubik
80914289b2 ames: fix %snub queued evet update 2023-03-17 18:51:27 +01:00
yosoyubik
003613d1d5 Merge branch 'develop' into yu/ames-snub-whitelist 2023-03-17 14:05:38 +01:00
silnem2
904c40719e fix aqua style and add return type annotation to lib/pill 2023-03-17 03:18:33 -06:00
silnem2
a01aaa531d Update aqua fix to filter /sys 2023-03-16 18:29:12 -06:00
silnem2
102bfb5571 remove trailing whitespace 2023-03-16 12:00:48 -06:00
silnem2
13ce5754fe Clean up lib/pill and fix %aqua 2023-03-16 11:49:29 -06:00
tadad
328a3d687d
Merge branch 'develop' into i/6303/eyre-verbose 2023-03-16 09:36:27 -06:00
Josh Lehman
dbe6f7fd20
Merge branch 'develop' into i/6264/ames-snub-whitelist 2023-03-16 08:30:57 -07:00
yosoyubik
02f01cf14c Merge branch 'develop' into i/6103/ames-refactor 2023-03-16 09:27:22 +01:00
Ted Blackman
61b3545682
Merge pull request #6382 from urbit/i/6242/kiln-fix-uninstall
kiln: fix uninstall
2023-03-15 16:58:43 -04:00
Ted Blackman
d81fc6e519
Merge pull request #6373 from urbit/m/dumb-apes
hoon: in +ape:ag, make zero a plain atom
2023-03-15 15:00:30 -04:00
silnem2
d3e788148c
Merge branch 'urbit:develop' into pill-lists 2023-03-15 12:10:51 -06:00
silnem2
877a00baf8 lib/gen: update pill lib/gens not to use whitelist 2023-03-15 11:43:10 -06:00
dachus
0286ca7b5b dome:clay => domo, moved to lull, full scry enabled 2023-03-15 08:35:59 -04:00
dachus
540a4948ca flue added to cone 2023-03-15 08:35:58 -04:00
dachus
9c2c128b69 and moved to lull 2023-03-15 08:35:58 -04:00
pkova
ce4da6db65 lull: burn kelvin 326 -> 325 2023-03-15 08:35:58 -04:00
pkova
d9c9b4150b lull, eyre: remove scry adapters for /~/name endpoint 2023-03-15 08:35:58 -04:00
pkova
2874c09e30 zuse: burn kelvin 415 -> 414 2023-03-15 08:35:58 -04:00
yosoyubik
3654431f3a ames: sanity check abetting the sink core 2023-03-15 10:35:08 +01:00
Ted Blackman
3ba5adfffd
Merge pull request #6383 from urbit/i/6371/no-op-if-corked
ames: no-op if bone has been corked on the sender
2023-03-13 11:59:13 -04:00