All notable changes to lua-resty-session
will be documented in this file.
- Avoid use unix socket and redis password with empty string
- Provide session id when closing, otherwise the lock is not deleted
- Added a configuration for session cookie max size (
session.cookie.maxsize
)
- Added pluggable strategies with
default
and a newregenerate
strategy - Added pluggable
hmac
s - Added
session.close
- Added
ttl
tostorages
- Added
session.cookie.discard
, attl
how long to keep old sessions when renewing (used byregenerate
strategy
- Only sets self.cookie.secure if not defined.
- Forgot to bump version number.
- Fixes issue where check addr and check scheme could be faked. See also: bungle#47 Thanks @nielsole
- Fixes small bug where aes could generate invalid salt on invalid input that further crashes Lua with error: bad argument #2 to 'salt' (number expected, got no value)
- Automatically creates exactly 64 bits salt as required by the latest lua-resty-string. See also: bungle#40 Thanks @peturorri
- Added session.hide() function to hide session cookies from upstream on reverse proxy scenarios.
- Delays setting the defaults until needed, allowing users to safely require "resty.session" in different contexts.
- Added a support for chunked cookies. See also: bungle#35 Thanks @zandbelt
- Lua code configuration parsing corrections (especially on boolean options).
- Added a more natural way to pass config arguments to storage adapters and ciphers in Lua code. See also: bungle#34 Thanks @hanxi
- On start we do send cookie now also if the settings have changed and the cookie expiry time needs to be reduced.
- Memcache storage adapter had a missing ngx.null.
- Implemented pluggable session identifier generators.
- Implemented random session idenfier generator.
- Now checks if headers were already sent before trying to set the cookie headers.
- SSL session identifier is not checked by default anymore.
- Lua session.identifier.length changed to session.random.length.
- Nginx $session_identifier_length changed to $session_random_length.
- Just another OPM release to correct the name.
- Support for the official OpenResty package manager (opm).
- Changed the change log format to keep-a-changelog.
- Bugfix: Weird bug where RAND_bytes was not working on Windows platform. Code changed to use resty.random. See Also: bungle#31 Thanks @gtuxyco
- Bugfix: AES Cipher used a wrong table for cipher sizes. See Also: bungle#30 Thanks @pronan
- Redis storage adapter now supports Redis authentication. See Also: bungle#28 Thanks @cheng5533062
- Just cleanups and changed _VERSION to point correct version.
- session.save close argument was not defaulting to true.
- Cookie will now have SameSite attribute set as "Lax" by default. You can turn it off or set to "Strict" by configuration.
- Calling save will now also set session.id if the save was called without calling start first. See Also: bungle#27 Thanks @hcaihao
- Fixes issue #19 where regenerating session would throw an error when using cookie storage. See Also: bungle#19 Thanks @hulu1522
- Removed all session_cipher_* deprecated settings (it was somewhat broken in 2.1).
- Changed session secret to be by default 32 bytes random data See Also: bungle#18 Thanks @iain-buclaw-sociomantic
- Added documentation about removed features and corrected about session secret size accordingly.
- Added architecture for Cipher adapter plugins. See Also: bungle#16 Thanks @mingfang
- Implemented AES cipher adapter (just like it was before)
- Implemented None cipher adapter (no encryption)
- Added documentation about pluggable ciphers
- Changed JSON serializer to use cjson.safe instead
- Added architecture for Storage adapter plugins. See Also: bungle#13
- Implemented Client Side Cookie storage adapter.
- Implemented Memcache storage adapter. See Also: bungle#14 Thanks @zandbelt
- Implemented Redis storage adapter.
- Implemented Shared Dictionary (shm) storage adapter.
- Added architecture for Encoder and Decoder plugins.
- Implemented Base 64 encoder / decoder.
- Implemented Base 16 (hex) encoder / decoder.
- Added architecture for Serializer plugins
- Implemented JSON serializer.
- Persistent cookies will now also contain Max-Age in addition to Expires.
- Cookie domain attribute is not set anymore if not specified.
- Added notes about using lua-resty-session with Lua code cache turned off. See also: bungle#15 Thanks @BizShuk
- Added session.open() function that only opens a session but doesn't send the cookie (until start is called). See also: bungle#12 Thanks @junhanamaki
- Fixed cookie expiration time format on Firefox bug: bungle#10 Thanks @junhanamaki
- Bugfix: Fixed an issue of overwriting a variable: bungle#11 Thanks @junhanamaki
- Fixed truncated cookie value bug: bungle#8 Thanks @kipras
- Cookies are not always "secure": bungle#5 Thanks @vladimir-smirnov-sociomantic
- Added documentation about Nginx SSL/TLS configuration settings related to session lifetime and ssl session ids.
- Bugfix: Fixed an issue where session configurations did get cached on a module level. This issue is discussed in pull-request #4: bungle#4 Thanks @kipras.
- Added session.new function.
- Added documentation about Nginx configuration used as defaults (not read on every request), and documented session.new.
- session.start{ ... } (a call with config parameters) works now as expected.
- session.start now returns additional extra boolean parameter that can be used to check if the session is s new session (false) or a previously started one (true).
- Added support for persistent sessions. See issue #2.
- Added session.check.ssi, session.cookie.persistent and the related Nginx configuration variables.
- Added Max-Age=0 to expiration code.
- Changed encode and decode functions to operate with correct number of arguments. See issue #1.
- There was a bug where additional user agent, scheme, and remote addr (disabled by default) was not checked.
- Added _VERSION field.
- Simplied a code a lot (e.g. internal setcookie and getcookie functions are now cleaner). Removed a lot of unneccessary lines from session.start by adding configs directly to session prototype.
- LuaRocks Support via MoonRocks.