Commit Graph

31826 Commits

Author SHA1 Message Date
pkova
a1fd3a6792 lull, eyre: actually send events on clogged channel reconnect 2023-04-24 13:38:14 +03:00
Ted Blackman
f3d2df087a
Merge pull request #6463 from ashelkovnykov/json-new
zuse: changes in preparation for JSON jets
2023-04-13 11:58:55 -04:00
Joe Bryan
f8305dee4b Merge branch 'develop' into next/kelvin/413 2023-04-13 11:21:18 -04:00
Josh Lehman
03e85551f6
Merge pull request #6472 from urbit/x/json-bgon
eyre: add support for noun-based channels
2023-04-12 12:32:12 -07:00
fang
4bc88f2825
tests: patch eyre tests for channel modes
Since the tests call arms from eyre directly, these had to be updated
alongside it, to now specify the channel mode in light of which the
request should be parsed.

Includes smoke tests for jam-mode channels.
2023-04-12 19:33:05 +02:00
fang
171142fd31
eyre: use jam mime type for PUT mode detection
Making this consistent with the mime type used for GET requests.
2023-04-12 19:19:13 +02:00
fang
d32527ba19
eyre: further refactor +load logic
Co-authored by: joemfb <joemfb@gmail.com>
2023-04-12 18:53:44 +02:00
fang
132299f278
eyre, mar: use x-urb-jam mime type for jams 2023-04-12 18:42:35 +02:00
Alex Shelkovnykov
30044fbc1e Add jet hints 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
e61d84d57b Replace +en:json:html code with cord version
Encode JSON to cord instead of tape. Code copied from @joemfb 's
version.
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
ac1a0ffdee Change JSON parser arms to match |base16:html 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
28ed583d29 Fix bug in .en-json:html (missing escaped char)
The backspace character was not being escaped like other invisible
characters.
2023-04-11 14:59:15 -06:00
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
Alex Shelkovnykov
345c4a8ae5 Refactor unit tests for JSON decoding/encoding
The unit tests for de-json:html and en-json:html in zuse.hoon were
copied from the JSON Test Suite (https://github.com/nst/JSONTestSuite).
While a good test suite if usable as-is, it has a lot of problems with
it, namely: inconsistent test names; repeated tests; and mixing tests
for multiple cases into one file. Since the tests need to be manually
added to Urbit anyway, this commit uses the opportunity to clean up the
test suite by making the following changes:
- Renaming tests to use a consistent naming scheme
- Removing repetetive test cases
- Splitting multi-case tests into multiple single-purpose tests
2023-04-11 14:59:15 -06:00
fang
4b68139c40
Merge branch 'next/kelvin/413' into x/json-bgon 2023-04-11 21:54:43 +02: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
Pyry Kovanen
6b5a836f8f
Merge pull request #6458 from urbit/ted/fix-vats
+vats: fix crash on nonexistent desks
2023-04-11 17:18:42 +03:00
Ted Blackman
cd161a5492 +vats: fix crash on nonexistent desks 2023-04-07 15:19:24 -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
Josh Lehman
59567b9e51
Merge pull request #6449 from urbit/ted/ames-ping-2
ames: ping faster to sponsors
2023-04-07 08:36:05 -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
Ted Blackman
0223cf9f59
Merge pull request #6452 from urbit/i/6444/lesser-dill-call-trace
dill: exclude wrapped-task from most +call traces
2023-04-06 11:39:10 -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
Josh Lehman
c1ce41e494
Merge pull request #6445 from urbit/master
Merge master back to develop after urbit-os-v2.136 release
2023-04-05 08:13:50 -07:00
Josh Lehman
938319ea87
Merge pull request #6443 from midden-fabler/i/6442/ames-add-last-contact-scry
ames: add last-contact scry endpoint
2023-04-05 08:11:58 -07: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
Pyry Kovanen
88406f9aab
Merge pull request #6428 from urbit/release/urbit-os-v2.136
Release urbit-os-v2.136
2023-04-04 19:09:16 +03:00
Pyry Kovanen
a4888fd444
Merge branch 'master' into release/urbit-os-v2.136 2023-04-04 18:35:55 +03: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
Ted Blackman
726cda9d26
Merge pull request #6425 from urbit/i/6409/sss-unsubscribe
sss: Unsubscribing and permissions
2023-03-31 12:50:28 -04:00
Ted Blackman
dca3713a26
Merge pull request #6395 from hoclun-rigsep/i/6297/vats
+vats options
2023-03-31 11:31:24 -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
Josh Lehman
6a1f38130d
Merge pull request #5927 from lukechampine/eyre-cache
eyre: Add cache
2023-03-29 08:38:42 -07:00
lukechampine
e0ff3b4d5f eyre: add cache 2023-03-28 17:01:31 -04:00
Matthew LeVan
a037acd8db ci: use doqs 2023-03-28 16:21:24 -04:00
Matthew LeVan
d8802de44b ci: use github.head_ref 2023-03-28 16:11:39 -04:00
Matthew LeVan
a4a7f7f5ee ci: use ref_name 2023-03-28 15:55:21 -04:00
Matthew LeVan
c78067209a
Merge pull request #6435 from urbit/ci-fix-nk-prs
ci: fix prs from `next/kelvin/*`
2023-03-28 15:40:04 -04:00