All notable changes to the Rick project will be documented in this file.
The format is based on Keep a Changelog.
- Validator
idandidlist: both rules guarded theirint()conversion withstr.isnumeric(), which is true for the whole Unicode numeric family whileint()accepts only decimal digits. Vulgar fractions and superscripts ('½','⅓','²','Ⅷ') passed the guard and madeint()raiseValueErrorfrom insideValidator.is_valid(), where a caller has no opportunity to turn it into a validation failure — in a request pipeline that surfaces as an unhandled error rather than a rejected field. Non-ASCII decimal digits ('٣','๓') did not raise, but were silently accepted as ids. Both rules now accept ASCII digits only, which is the intended set for a database key
- MapLoader:
get()no longer double-constructs an object when the same name is resolved concurrently from multiple threads during a cold start; the loaded-cache check, build, and store now run together under a reentrant lock with a double-checked_loadedcache, so each name is built exactly once (previouslybuild()ran outside the lock, allowing duplicate instances). The unsynchronizedfunctools.lru_cacheonget()was removed in favour of the existing_loadedmemoization, mirroring the 0.8.4Difix
- EventManager: the
dispatch()re-entrancy stack is now thread-local, eliminating false-positive "circular event dependency" errors when the same event is dispatched concurrently from multiple threads (real same-thread cycle detection is preserved) - EventManager:
dispatch()now snapshots the run queue under_handler_lockand releases it before invoking handlers, so handler execution is no longer globally serialized across threads - MapLoader: the
get()circular-dependency stack is now thread-local, eliminating false-positive "circular dependency" errors when the same name is resolved concurrently from multiple threads - Di:
get()/add()are now guarded by a reentrant lock and memoize the resolved object in the registry, replacing the unsynchronizedfunctools.lru_cache; concurrent resolution of a factory dependency now builds exactly once instead of handing out duplicate instances
- CI/tooling: tox now provisions interpreters through
tox-uv(uv-backed), enabling the full py3.10-3.14 test matrix on hosts without every interpreter pre-installed; pinnedtox-uv>=1.13in the dev dependencies
- msgpack
unpackb()/unpack(): documented that reconstructing dataclass/object extension types imports arbitrary modules and instantiates arbitrary classes from the payload, making deserialization unsafe on untrusted input (CWE-502); added warnings to the module/function docstrings and serializer documentation - RedisCache: documented that the default
pickleserializer runspickle.loads()on stored values, allowing arbitrary code execution if the Redis keyspace is writable by untrusted parties (CWE-502); recommendCryptRedisCacheor a non-executing serializer for untrusted backends
- msgpack: the deserialization depth limit is now enforced for nested dataclass/object extension types (previously bypassed by the nested decode path) and is thread-safe (per-thread depth instead of a shared global);
unpack()(stream) is now also depth-limited - BcryptHasher:
hash()now raisesValueErrorfor passwords longer than 72 bytes instead of relying on bcrypt's version-dependent truncation (bcrypt < 5) or error (bcrypt >= 5);is_valid()returnsFalsefor such passwords, giving consistent behaviour across bcrypt versions
- Dependencies updated to latest:
cryptography>=48.0.0(fixes CVE-2026-39892 and CVE-2026-34073),bcrypt>=5.0.0,redis>=8.0.0,setuptools>=82.0.1,wheel==0.47.0; aligneddeprecatedto~=1.3.1and addedmsgpackto the Pipfile[packages] - CI: adopted a unified
ci.ymlworkflow (test matrix py3.10-3.14, Redis integration, lint, build, pip-audit + bandit, success gate) replacingrun-tests.yml; SBOM workflow now runs on release with Dependency-Track upload, grype scanning, and cosign signing; bumped workflow actions tocheckout@v6/setup-python@v6. Annotated the reviewed bcrypt SHA-1 helper andCryptRedisCachepickle call with# nosecfor the bandit gate
- RequestRecord: field value assignment now occurs before custom validator execution, ensuring validators have access to the field value
- RequestRecord: record-level errors now take precedence over validator errors when merging
- CryptRedisCache: key validation now checks byte length instead of string length for correct multi-byte handling
- EventManager: dispatch() now uses try/finally to prevent stack leak on handler exceptions
- EventManager: wakeup() now uses deepcopy to prevent unintended state mutation
- Di: cache_clear() is now performed inside a lock to prevent race conditions with concurrent access
- MapLoader: cache_clear() moved inside lock block; get() now uses try/finally to prevent stack leak on import errors
- BcryptHasher: removed unnecessary SHA-256 pre-hashing; passwords are now hashed directly with bcrypt
- sha1_hash(): now emits DeprecationWarning; SHA-1 is cryptographically broken
- hash_buffer(): restricted to approved algorithms (sha256, sha384, sha512, blake2b, blake2s); raises ValueError for unapproved algorithms
- MultiPartReader: added bounds clamping to prevent reading past stream end
- Between validator: now properly calls parse_options() for default handling
- ListLen validator: added null check for missing options
- Decimal validator: now rejects Infinity and NaN values
- Email validator: added RFC 5321 length limits (64-char user, 255-char domain) and empty user check
- IntRule validator: now rejects Python booleans
- FQDN validator: removed localhost from whitelist
- is_object(): replaced fragile type detection with explicit isinstance checks
- msgpack unpackb(): added depth-limited deserialization (max depth 32) to prevent stack overflow from crafted payloads
- iso8601_now(): now uses explicit datetime.timezone.utc instead of deprecated utcnow()
- Form Control/FieldSet: fixed shared mutable default attributes and NameError in duplicate field check
- Event manager documentation and examples (basic events, class handlers, priority handlers, state serialization)
- Test coverage for crypto, event, and file documentation modules
- Misc bugfixes across multiple modules (container, DI, maploader, event manager, filter, request record, environment config, file config, redis, multipart reader, cast utilities, validator)
- Documentation link fixes
- Test badge fix
0.8.0 - 2025-11-06
- MessagePack serializer with bidirectional encoding/decoding
- RedisCache improvements: custom serializer/deserializer support, key prefix support,
get()hit ratio statistics - Fernet256 additional tests
- Experimental SBOM (Software Bill of Materials) support
- Crypto examples and documentation
- Validator examples
- Form documentation updates
- Dropped Python 3.8 support; added Python 3.13 and 3.14 support
- Migrated repository from git.oddbit.org to GitHub
- Documentation switched to dark theme
- Updated setup/tox configuration
- RedisCache prefix bugfix
- Security: updated requirements.txt to reduce vulnerabilities
0.7.1 - 2025-07-30
- Optional
backendparameter inRedisCacheconstructor to wrap existing Redis client instances - Unit test and documentation updates
0.7.0 - 2024-08-13
- Bugfix release
- GitHub Actions updates
- Pinned
requeststo avoid compatibility issues with tox-docker - tox-docker Redis adjustments
0.6.9 - 2024-08-13
intandidlistvalidators with unit testsseek()support forMultiPartReader
- Redis dependency update; tox-docker updates
- README.md formatting fix
0.6.7 - 2024-01-08
- BREAKING:
RedisCache.has()now returnsboolinstead of integer
- Redis unit tests
0.6.6 - 2023-12-20
- Support for
bytesandmemoryviewtypes inExtendedJsonEncoder
- Test fix
0.6.5 - 2023-12-14
MapLoader.register()bugfix
0.6.4 - 2023-12-14
MapLoader.register()method
0.6.3 - 2023-11-15
- BytesIO BLAKE2 hash helper
- Package include improvements
- Boolean values were not parsed correctly from environment variables in
EnvironmentConfig - Updated GitHub Action
0.6.2 - 2023-10-03
CamelCaseJsonSerializerfor automatic camelCase JSON encoding
0.6.1 - 2023-05-31
Version bump release.
0.6.0 - 2023-05-31
- GitHub Actions CI setup
FileReaderimplementation with custom attribute supportbytesiosliceutility (renamed frombyteslice)- Optional exception raising in
load_class() ClassRegistryimplementationMultiPartReaderfor multipart/form-data stream processinglist_duplicates()utility function- MapLoader cached item cleaning
- BREAKING: Removed
optional()function EventManager: non-existing events are now silently ignored;dispatch()returnsboolindicating if dispatch occurred- Dependency version updates
- Code formatting improvements
- Documentation URL updates
FileReader: removal of problematic attributes- Unit test fixes
0.4.6 - 2022-11-25
ClassRegistryimplementation
0.4.5 - 2022-11-17
RequestRecordfor form-like request validationConsoleWriterandAnsiColorfor terminal outputEnvironmentConfigwith docker-style secrets file supportContainer-based environment configuration- DateTime helper utilities
- JSON serializer (
ExtendedJsonEncoder) - Form filters and custom validation
- Form builder with controls, fieldsets, and readonly support
Runnablemixin- String-case utility functions
- BREAKING:
RequestRecord.get_object()renamed toRequestRecord.bind();bind()only binds non-None attribute values - BREAKING:
field.messagesrenamed tofield.error_message; custom error message is now a string per field instead of a dict - BREAKING:
form.fieldrecordrenamed toform.requestrecord - Removed Injectable/DI from Event Manager
- JSON exception trapping for reliability
- Redis serializer fix
- Various unit test fixes
- Core dependency injection container (
Di) with singleton and factory patterns - Base containers (
Container,MutableContainer,ShallowContainer) Registryclass for dynamic class registrationMapLoaderfor configuration loading- Redis cache support (
RedisCache) - Fernet256 encryption
- BCrypt password hashing (
BcryptHasher) - Buffer hashing (SHA1, SHA256, SHA512, BLAKE2)
- Event manager with priority-based dispatch
- Translation mixin
- Injectable mixin
- Validator framework with string, numeric, network, hash, and misc validators