push-hook: hold subscription open after validating access

When we receive a watch-nack on a versioned subscription, we attempt to
resubscribe on an unversioned path. However, if we receive an unversioned
subscription request for which we are not compatible, we hold the
subscription open and never send any facts on unversioned subscriptions.
As the check for unversioned compatiblility occurs before retrieving the
initial-watch, subscriptions which are supposed to nack never do. Fixed
by moving the conditional.

Fixes urbit/landscape#795
This commit is contained in:
Liam Fitzgerald 2021-05-04 10:56:45 +10:00
parent c73e2b95b5
commit dcf858ccf9
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -297,14 +297,14 @@
:: ::
++ unversioned ++ unversioned
?> ?=([%ship @ @ *] t.path) ?> ?=([%ship @ @ *] t.path)
?. =(min-version.config 0)
~& >>> "unversioned req from: {<src.bowl>}, nooping"
`this
=/ =resource =/ =resource
(de-path:resource t.path) (de-path:resource t.path)
=/ =vase =/ =vase
(initial-watch:og t.t.t.t.path resource) (initial-watch:og t.t.t.t.path resource)
:_ this :_ this
?. =(min-version.config 0)
~& >>> "unversioned req from: {<src.bowl>}, nooping"
~
[%give %fact ~ (convert-to:ver update-mark.config vase)]~ [%give %fact ~ (convert-to:ver update-mark.config vase)]~
-- --
:: ::