Skip to content

Commit

Permalink
Merge pull request #231 from tloncorp/ns/genuine-followup
Browse files Browse the repository at this point in the history
Remove dots from serialized %genuine secret
  • Loading branch information
arthyn authored Oct 13, 2023
2 parents 6aa3c97 + fe1d88b commit 8671e37
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions desk/app/genuine.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
++ give-payload
|= [id=@ta =simple-payload:http]
(give-simple-payload:app:server id simple-payload)
:: without removing the dots, there are intermittent mismatches when reading
:: the secret from the URL
++ serialize
|= eny=@uvJ
%- crip
%+ skip (trip (scot %uw eny))
|= =cord
=(cord '.')
+$ card card:agent:gall
+$ versioned-state
$% state-0
Expand Down Expand Up @@ -42,7 +50,7 @@
=/ line i.t.site.full-line
?+ method.request (give-payload id not-found:gen:server)
%'GET'
(give-payload id (json-response:gen:server b+=(line (scot %uw secret))))
(give-payload id (json-response:gen:server b+=(line (serialize secret))))
==
==
::
Expand Down Expand Up @@ -82,6 +90,6 @@
|= =path
^- (unit (unit cage))
?+ path [~ ~]
[%x %secret ~] ``json+!>([%s (scot %uw secret)])
[%x %secret ~] ``json+!>([%s (serialize secret)])
==
--

0 comments on commit 8671e37

Please sign in to comment.