Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
ruby /
vendor_ruby /
rack /
session /
Delete
Unzip
Name
Size
Permission
Date
Action
abstract
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
cookie.rb
5.54
KB
-rwxrwxrwx
2020-07-10 13:18
memcache.rb
2.71
KB
-rwxrwxrwx
2020-07-10 13:18
pool.rb
1.99
KB
-rwxrwxrwx
2020-07-10 13:18
Save
Rename
# AUTHOR: blink <blinketje@gmail.com>; blink#ruby-lang@irc.freenode.net # THANKS: # apeiros, for session id generation, expiry setup, and threadiness # sergio, threadiness and bugreps require 'rack/session/abstract/id' require 'thread' module Rack module Session # Rack::Session::Pool provides simple cookie based session management. # Session data is stored in a hash held by @pool. # In the context of a multithreaded environment, sessions being # committed to the pool is done in a merging manner. # # The :drop option is available in rack.session.options if you wish to # explicitly remove the session from the session cache. # # Example: # myapp = MyRackApp.new # sessioned = Rack::Session::Pool.new(myapp, # :domain => 'foo.com', # :expire_after => 2592000 # ) # Rack::Handler::WEBrick.run sessioned class Pool < Abstract::ID attr_reader :mutex, :pool DEFAULT_OPTIONS = Abstract::ID::DEFAULT_OPTIONS.merge :drop => false def initialize(app, options={}) super @pool = Hash.new @mutex = Mutex.new end def generate_sid loop do sid = super break sid unless @pool.key? sid end end def get_session(env, sid) with_lock(env) do unless sid and session = @pool[sid] sid, session = generate_sid, {} @pool.store sid, session end [sid, session] end end def set_session(env, session_id, new_session, options) with_lock(env) do @pool.store session_id, new_session session_id end end def destroy_session(env, session_id, options) with_lock(env) do @pool.delete(session_id) generate_sid unless options[:drop] end end def with_lock(env) @mutex.lock if env['rack.multithread'] yield ensure @mutex.unlock if @mutex.locked? end end end end