diff options
Diffstat (limited to 'docs/lang')
-rw-r--r-- | docs/lang/ruby/rack_session_cookie.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/lang/ruby/rack_session_cookie.rb b/docs/lang/ruby/rack_session_cookie.rb new file mode 100644 index 0000000..5b0a62a --- /dev/null +++ b/docs/lang/ruby/rack_session_cookie.rb @@ -0,0 +1,12 @@ +require 'base64' +require 'cgi' + +# 'SessionId' class possibly not provided by import. +# A dummy definition is needed for the Marshal.load() +#require 'rack' +class Rack::Session::SessionId +end + +cookie = "....." + +obj = Marshal.load(Base64.decode64(CGI.unescape(cookie.split("\n").join).split('--').first)) |