mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
eyre: prevent binding in reserved namespaces
Disallows registering bindings (through %connect and %serve) that would capture
traffic on paths starting with /~ (Eyre's) or /~_~ (runtime's, as of cc389c5
).
Note that we don't touch +insert-binding, which is used by Eyre internally to
set up bindings in its own namespace.
This commit is contained in:
parent
a208387a72
commit
a1e43e02a0
@ -1772,6 +1772,12 @@
|
||||
|= [=binding =action]
|
||||
^- [(list move) server-state]
|
||||
=^ success bindings.state
|
||||
:: prevent binding in reserved namespaces
|
||||
::
|
||||
?: ?| ?=([%'~' *] path.binding) :: eyre
|
||||
?=([%'~_~' *] path.binding) :: runtime
|
||||
==
|
||||
[| bindings.state]
|
||||
(insert-binding [binding duct action] bindings.state)
|
||||
:_ state
|
||||
[duct %give %bound success binding]~
|
||||
|
Loading…
Reference in New Issue
Block a user