Commit Graph

31849 Commits

Author SHA1 Message Date
pkova
3792ba5cc7 Merge branch 'next/kelvin/413' of https://github.com/urbit/urbit into pkova/fix-eyre-clog 2023-04-24 13:43:36 +03:00
pkova
a1fd3a6792 lull, eyre: actually send events on clogged channel reconnect 2023-04-24 13:38:14 +03:00
Ted Blackman
6e793dfe39 Merge branch 'develop' into next/kelvin/413 2023-04-22 14:33:01 -04:00
Ted Blackman
d8ce64b76e
Merge pull request #6492 from urbit/i/6491
sss: add `+fork` and `+copy`
2023-04-20 11:43:16 -04:00
Ted Blackman
281084af9c
Merge pull request #6481 from urbit/i/6469
sss: Fix memory leak on publisher
2023-04-20 11:42:45 -04:00
Ted Blackman
5661bfed74
Merge pull request #6467 from urbit/dr/clean-up-test-thread
ted/test.hoon: repair vestigial select-by-prefix feature
2023-04-19 11:35:58 -04:00
~wicrum-wicrun
e0904c105c sss: add +fork and +copy 2023-04-18 21:54:17 +02:00
Josh Lehman
888bad3551
Merge pull request #6487 from urbit/master
Merge master back to develop after urbit-os-v2.137-hotfix1
2023-04-17 08:48:54 -07:00
Pyry Kovanen
d6f7524b72
Merge pull request #6484 from urbit/release/urbit-os-v2.137-hotfix1
Hotfix broken old %ames loads
2023-04-14 22:17:39 +03:00
pkova
de44780981 ames: properly migrate old %snub tasks 2023-04-14 21:56:55 +03:00
Ted Blackman
9ce37f0d71
Merge pull request #6483 from urbit/pkova/fix-ames-load
ames: properly migrate old %snub tasks
2023-04-14 14:20:22 -04:00
Josh Lehman
1d1a81b90e
Merge pull request #6471 from urbit/pkova/fix-eyre-unacked
eyre: do not clear unacked events in +on-get-request
2023-04-14 11:14:29 -07:00
pkova
24f7f3549f ames: properly migrate old %snub tasks 2023-04-14 20:41:57 +03:00
Ted Blackman
4cf5193294
Merge pull request #6461 from urbit/i/6451/reset-naxplanations
ames: reset timer for naxplanations on corked bones
2023-04-14 13:16:49 -04:00
~wicrum-wicrun
802cdb0c2a sss: fix memory leak on publisher 2023-04-14 10:08:32 +02:00
yosoyubik
69a5c5e6df ames: factor out is-corked logic into a gate 2023-04-14 09:12:16 +02: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
yosoyubik
898ed99863 ames: no-op on naxplanation acks for corked bones 2023-04-13 08:53:01 +02: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
pkova
fa40fd7f35 eyre: do not clear unacked events in +on-get-request 2023-04-12 19:36:26 +03:00
yosoyubik
4c2bc332e0 Merge branch 'develop' into i/6451/reset-naxplanations 2023-04-12 06:49:57 +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
dr-frmr
0f4be5245e
ted/test.hoon: repair vestigial select-by-prefix feature 2023-04-11 15:55:13 -04:00
fang
4b68139c40
Merge branch 'next/kelvin/413' into x/json-bgon 2023-04-11 21:54:43 +02:00
Pyry Kovanen
4c954a8f8a
Merge pull request #6465 from urbit/release/urbit-os-v2.137
Release urbit-os-v2.137
2023-04-11 18:57:29 +03: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
Ted Blackman
db93df0c33 +vats: fix crash on nonexistent desks 2023-04-11 17:19:30 +03: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
yosoyubik
4840b2aed2 ames: simplify reset timer 2023-04-11 14:24:05 +02:00
yosoyubik
48a60d602c ames: reset timer for naxplanation on corked bones 2023-04-09 08:13:21 +02: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