Merge pull request #231 from tloncorp/ns/genuine-followup

Remove dots from serialized %genuine secret
This commit is contained in:
Hunter Miller 2023-10-13 10:20:02 -05:00 committed by GitHub
commit 8671e372d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -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))))
==
==
::
@ -82,6 +90,6 @@
|= =path
^- (unit (unit cage))
?+ path [~ ~]
[%x %secret ~] ``json+!>([%s (scot %uw secret)])
[%x %secret ~] ``json+!>([%s (serialize secret)])
==
--