add session name to oryx data

This commit is contained in:
Anton Dyudin 2016-09-09 16:31:25 -07:00
parent c784e64b6c
commit 481f1f547b

View File

@ -118,7 +118,8 @@
== :: == ::
:: ::
++ stem :: client view ++ stem :: client view
$: him/ship :: static identity $: ses/hole :: associated session
him/ship :: static identity
ude/(unit {p/duct q/?}) :: stream long-poll? ude/(unit {p/duct q/?}) :: stream long-poll?
era/@da :: next wake era/@da :: next wake
die/@da :: collection date die/@da :: collection date
@ -1074,9 +1075,13 @@
?. &(?=({$~ $json} p.pok) ?=($post mef) ?=(^ bod) !is-anon) & ?. &(?=({$~ $json} p.pok) ?=($post mef) ?=(^ bod) !is-anon) &
=+ oxe=grab-oryx =+ oxe=grab-oryx
?~ oxe | ?~ oxe |
?: (~(has in vew.cyz:for-client) u.oxe) =/ ses (session-from-cookies cookie-prefix maf)
?~ ses ~&(%oryx-no-cookie &) :: XX security
=/ cyz (~(get by wix) u.oxe)
?~ cyz ~&(%bad-oryx+u.oxe &) :: XX security?
?. =(u.ses ses.u.cyz)
~&(oryx-ses-mismatch+[orx=u.oxe u.ses ses.u.cyz] &) :: XX security
& &
~&(bad-oryx+[u.oxe vew.cyz:for-client] &) :: XX security
:: ::
++ grab-json ++ grab-json
?. ?=(?($post $put $delt) mef) ?. ?=(?($post $put $delt) mef)
@ -1098,7 +1103,7 @@
=+ hem=as-aux-request =+ hem=as-aux-request
?^ hem ?^ hem
?. check-oryx ?. check-oryx
~|(%bad-oryx ~|([grab-oryx vew.cyz:for-client] !!)) ~|(%bad-oryx ~|([grab-oryx ses:for-client] !!))
[%& u.hem] [%& u.hem]
=+ bem=as-beam =+ bem=as-beam
?^ bem [%& %beam u.bem] ?^ bem [%& %beam u.bem]
@ -1506,7 +1511,7 @@
=+ orx=`@t`(rsh 3 1 (scot %p (shaf %orx eny))) =+ orx=`@t`(rsh 3 1 (scot %p (shaf %orx eny)))
=. vew (~(put in vew) orx) =. vew (~(put in vew) orx)
=+ ire=(oryx-to-ixor orx) =+ ire=(oryx-to-ixor orx)
=. ..ix ~(init ix ire %*(. *stem him him, p.eve 1)) =. ..ix ~(init ix ire %*(. *stem ses ses, him him, p.eve 1))
:: ~& stat-ire+`@t`ire :: ~& stat-ire+`@t`ire
[orx abet] [orx abet]
:: ::