Commit Graph

30669 Commits

Author SHA1 Message Date
Philip Monk
44074ad33b tests: make pass 2022-09-13 17:52:32 -08:00
Philip Monk
c3f5fe923a docket: update to use tire instead of kiln 2022-09-13 16:14:43 -08:00
Liam Fitzgerald
06fc1897b7 @urbit/http-api: update version number 2022-09-13 13:00:30 -05:00
Liam Fitzgerald
6756d5768d @urbit/http-api: update version number 2022-09-13 12:56:47 -05:00
Patrick O'Sullivan
b7abdea619
Update pkg/npm/http-api/src/Urbit.ts
Co-authored-by: Hunter Miller <hunter@tlon.io>
2022-09-13 11:44:31 -05:00
matildepark
400a437b08 http-api: authenticate doesn't enforce insecure connections
Instead of forcing people to connect over http://, fall back gracefully to http if no protocol is given.

This fixes an issue where external clients can't use this method, since SameSite cookies need to be secure as per https://web.dev/samesite-cookies-explained/#samesite=none-must-be-secure
2022-09-13 11:27:38 -05:00
Patrick O'Sullivan
ac6ef65a87 Merge branch 'master' into next/npm 2022-09-13 11:26:22 -05:00
Patrick O'Sullivan
aaebd9c01b npm: bump http-api version number 2022-09-13 10:33:12 -05:00
Philip Monk
c46fb686ff kiln: remove resolve XX's 2022-09-12 20:51:39 -08:00
Philip Monk
4ae324849f kiln: remove |bump 2022-09-12 20:29:59 -08:00
Philip Monk
f61d16965a kiln: fix +vat,+vats 2022-09-12 20:22:22 -08:00
Liam Fitzgerald
5094c3a3c9
Merge pull request #5994 from urbit/lf/hotfix-treaty-json
garden: fix broken treaty JSON
2022-09-12 16:20:58 -05:00
Liam Fitzgerald
3f2d7333e6 garden: fix broken treaty JSON
For some reason, a %uv case was added to the JSON serialiser for $case.
$case has no such case in the union, and so this does not make sense.
2022-09-12 15:55:54 -05:00
Patrick O'Sullivan
08f0e4c281
Merge pull request #5993 from urbit/po/return-rejected-promise-for-scry
http-api: If scry fails, return reject response
2022-09-12 14:23:42 -05:00
fang
b18d8eedd1
Merge branch 'next/arvo' 2022-09-12 16:58:49 +02:00
Patrick O'Sullivan
f5a8d8e937 http-api: If scry fails, return reject response 2022-09-12 09:45:01 -05:00
Philip Monk
18b65a973f kiln: fix |ota and installing locally 2022-09-07 22:45:11 -08:00
Philip Monk
c82b7c4ff2 kiln: fixes 2022-09-07 22:38:35 -08:00
Philip Monk
0d757b4436 kiln: migrate previous OTA state 2022-09-07 21:56:12 -08:00
fang
50ee2eb1c0
Merge pull request #5951 from urbit/pkova/dns-race
dns-address: subscribe before poke and fix wire mismatch
2022-09-07 19:41:14 +02:00
Philip Monk
1102288d75 kiln: remove old |sync, various fixes 2022-09-06 22:52:59 -08:00
xiphiness
2bc2d5a1bb
dojo dir validation: %ct scry at case da+now if imaginary case 0
PR #5840 mostly fixed #1559, but introduced a new bug. before, you could safely `=dir` into a desk without a case, and it would use the nonexistent case `ud+0` as the beam for dojo state, and switch that out for da+now whenever it tries to resolve the current path. but this check causes it to fail, because `ud+0` is a nonexistent case. this uses he-beam to transform the beam in the conditional to see if the case is 0, and if it is, changes the case to da+now before it scries
2022-09-06 16:24:22 -05:00
fang
108c6253d3
Merge branch 'philip/nuke' into next/arvo 2022-09-06 22:25:19 +02:00
fang
f46d8dd557
Merge pull request #5974 from urbit/m/recork-slower
ames: bump recork timer back up to a day
2022-09-06 22:18:14 +02:00
fang
bc597c25ef
Merge pull request #5978 from urbit/philip/nuke
gall: don't add duplicate nonce in +ap-nuke
2022-09-06 22:17:49 +02:00
fang
7a4034f48a
Merge pull request #5977 from urbit/m/cork-undone
ames, gall: no %done on corks
2022-09-06 22:17:34 +02:00
fang
9c931f844b
Merge pull request #5976 from urbit/m/ames-restir
ames: clean & re-set recork timer during %stir
2022-09-06 22:17:18 +02:00
fang
36dd2f8ace
Merge branch 'next/arvo' into m/recork-slower 2022-09-06 22:16:41 +02:00
fang
e22b198dea
Merge pull request #5972 from urbit/ted/grq-test-2
tests: ames+gall subscribe/kick/resubscribe sequence
2022-09-06 22:15:47 +02:00
fang
fec3c45d30
Merge pull request #5971 from urbit/jb/recork-error
ames: handle failed recork timers
2022-09-06 22:15:12 +02:00
Joe Bryan
e4e0c31975 hoon: updates +slew to avoid dynamic eval 2022-09-06 12:50:44 -04:00
Mackenzie Davidson
899e675990
Merge pull request #5984 from urbit/md/notebooks-full-width-images 2022-09-06 11:52:52 -04:00
Joe Bryan
d89c73fc79 hoon: update key virtualization gates to use fully-static formulas 2022-09-06 11:05:08 -04:00
Joe Bryan
657c5c5a03 pill: update +solid formulas to be more static 2022-09-06 11:04:46 -04:00
Joe Bryan
f91c6c54db arvo: update bootstrap/lifecycle formulas to be fully static 2022-09-06 11:03:21 -04:00
Tinnus Napbus
27349c51ab eyre: add auto-https redirects
if a cert is configured and a secure port is live it will set the
redirect flag in http-config.state.

When it gets a ++request it will return a 301 redirect to
https://[host]/[path] if:

  1. not already secure
  2. redirect flag set
  3. secure port live
  4. is not requesting /.well-known/acme-challenge/...
  5. the host is in domains.state

It will not happen if forwarded-secured, localhost, local loopback, ip
addresses or domains not in domains.state.

in ++load it checks the secure port is live and a cert is set and
enables it if so (for people who already use in-urbit letencrypt)

%rule %cert tasks also toggle it (only turning it on if secure port
live)

%live tasks also toggle it (only turning it on if cert set)

Have tested with a couple of ships and seems to work fine.

This is useful in combination with pyry's auto arvo.network dns config
system - can finally get rid of reverse proxies entirely.
2022-09-04 02:58:09 +12:00
Philip Monk
8884e7dfbc kiln: make compile 2022-09-02 16:51:39 -08:00
Philip Monk
093f0ae9de Merge branch 'philip/inline-thread' into philip/agent-clay-wip 2022-09-01 19:03:17 -08:00
Mackenzie Davidson
4174fd6829 interface: full width images for notebook posts 2022-08-31 18:08:07 -04:00
Philip Monk
3aea8220bc kiln: add +sync 2022-08-30 18:32:31 -08:00
fang
53cc33b291
eyre: look for lowercase last-event-id header
Eyre always gets passed request headers in lowercase, so we should search for
the lowercased version of the header.

Arguably `+get-header` should lowercase keys before comparing them, but that's
a more serious behavioral change.
2022-08-30 16:44:11 +02:00
Philip Monk
e3a8cab943 khan: support inline threads
This allows you to pass a thread directly into khan, instead of passing
a filename.  This has several implications:

- The friction for using threads from an app is significantly lower.
  Consider:

    =/  shed
      =/  m  (strand ,vase)
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('there'))
      (pure:m !>('product'))
    [%pass /wire %arvo %k %lard %base shed]

- These threads close over their subject, so you don't need to parse
  arguments out from a vase -- you can just refer to them.  The produced
  value must still be a vase.

    ++  hi-ship
      |=  [=ship msg1=@t msg2=@t]
      =/  shed
        =/  m  (strand ,vase)
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg1))
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg2))
        (pure:m !>('product'))
      [%pass /wire %arvo %k %lard %base shed]

- Inline threads can be added to the dojo, though this PR does not add
  any sugar for this.

    =strandio -build-file %/lib/strandio/hoon
    =sh |=  message=@t
        =/  m  (strand:rand ,vase)
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>(message))
        (pure:m !>('product'))
    |pass [%k %lard %base (sh 'the message')]

Implementation notes:
- Review the commits separately: the first is small and implements the
  real feature.  The second moves the strand types into lull so khan can
  refer to them.

- In lull, I wanted to put +rand inside +khan, but this fails to that
  issue that puts the compiler in a loop.  +rand depends on +gall, which
  depends on +sign-arvo, which depends on +khan.  If +rand is in +khan,
  this spins the compiler.  The usual solution is to either move
  everything into the same battery (very ugly here) or break the
  recursion (which we do here).
2022-08-29 21:04:50 -08:00
Philip Monk
0e14eedb50 spider: accept inline threads 2022-08-29 20:09:08 -08:00
Philip Monk
4bef3277d5 azimuth: remove :azimuth|kick 2022-08-29 10:57:47 -08:00
Philip Monk
fa569cf7f3 kiln: wip 2022-08-29 10:53:36 -08:00
Philip Monk
9a4d754429 clay: add +tire subscription for app state 2022-08-25 19:13:51 -08:00
Philip Monk
1ce53d06ba gall: don't add duplicate nonce in +ap-nuke
This gets added in +ap-handle-peers.  This caused outgoing subscriptions
to not get cleaned up properly.

Issue introduced in c2d77a5d.
2022-08-25 13:29:51 -08:00
fang
ab75e83398
gall: don't enqueue %cork as outstanding
Ames will no longer send acks. Consider it completed immediately, and
clean up the outstanding queue whenever it's empty.
2022-08-25 18:14:40 +02:00
fang
0e5b3b4107
ames: don't give %done on cork
Locally, %cork is guaranteed to succeed instantly. The requesting vane
doesn't need an ack to safely consider the flow "closed".
2022-08-25 18:13:29 +02:00
Ted Blackman
5fb20a57cb tests: give %cork ack to gall 2022-08-25 16:36:14 +03:00