mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 10:21:31 +03:00
Merge pull request #6929 from urbit/pkova/eauth-localhost
eyre: do not store localhost as eauth-url
This commit is contained in:
commit
2c27b7a83d
@ -1306,7 +1306,13 @@
|
||||
o(session-id session.fex)
|
||||
:: store the hostname used for this login, later reuse it for eauth
|
||||
::
|
||||
=? endpoint.auth.state ?=(^ host)
|
||||
=? endpoint.auth.state
|
||||
:: avoid overwriting public domains with localhost
|
||||
::
|
||||
?& ?=(^ host)
|
||||
?| ?=(~ auth.endpoint.auth.state)
|
||||
!=('localhost' (fall (rush u.host host-sans-port) ''))
|
||||
== ==
|
||||
%- (trace 2 |.("eauth: storing endpoint at {(trip u.host)}"))
|
||||
=/ new-auth=(unit @t)
|
||||
`(cat 3 ?:(secure 'https://' 'http://') u.host)
|
||||
|
Loading…
Reference in New Issue
Block a user