From 777ba279e76f6d30de4d64948930ae0d0d17833c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 16 Apr 2009 19:12:12 -0400 Subject: Cookie signing working for forms --- tests/cookieSec.ur | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/cookieSec.ur (limited to 'tests/cookieSec.ur') diff --git a/tests/cookieSec.ur b/tests/cookieSec.ur new file mode 100644 index 00000000..ea5c9116 --- /dev/null +++ b/tests/cookieSec.ur @@ -0,0 +1,24 @@ +table t : {Id : int} + +cookie c : int + +fun setter r = + setCookie c (readError r.Id); + return Done + +fun writer () = + ido <- getCookie c; + case ido of + None => error No cookie + | Some id => dml (INSERT INTO t (Id) VALUES ({[id]})); + return Done + +fun main () = return +
+ + + +
+ + +
-- cgit v1.2.3