-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrading
A edited this page Aug 19, 2026
·
4 revisions
pip install -U "nai-security==1.12.2"
python manage.py migrate- PyPI / docs / wiki link NEMATI AI to https://nemati.ai
- Docs JSON-LD includes Organization + WebSite for search engines
- PyPI Documentation URL now points at https://nematiai.github.io/nai-security/
- Wiki whitelist example uses
description(the realWhitelistedIPfield)
Security and honesty fixes (no model/migration break):
-
Breaking if you are behind a reverse proxy:
X-Forwarded-For/X-Real-IPare ignored unless you setNAI_SECURITY_TRUST_PROXY_HEADERS = True. Default isFalseso clients cannot spoof IP. - Axes cooloff/attempt-expiry now re-read from
SecuritySettingson each lockout check (multi-worker safe). - Any active
WhitelistedUserclears axes lockout on save (not onlyexemption_type='all'). -
AccessLog/AccessFailureLogstay in admin (onlyAccessAttemptis customized). - Default bot sync no longer includes
python-requests,curl/,wget/,Go-http-client. -
GEOIP_PATHmay be a directory or the.mmdbfile. - Classifiers: Django 6.1, Python 3.14.
- Docs: email/domain blocking are helpers;
RateLimitRuleis storage only.
Dependency pin updates (no app API break):
- Required:
requests>=2.28,geoip2>=5,<6,redis>=5,<9 - Optional: import-export 4.x, unfold >= 0.90, ratelimit >= 4.1
- Axes remains
>=8.3.1,<9
Axes whitelist bypass fixes:
- Whitelisted IPs respected by axes handler
- Any active
WhitelistedUserbypasses axes (not onlyexemption_type='all') - Email login forms work when
USERNAME_FIELD='username' - Whitelisted failed logins no longer pollute
AccessAttempt
-
SecurityMiddlewaremust be afterAuthenticationMiddleware -
NAI_SECURITY_USER_RESOLVERremoved - User-agent OS/browser detection fixes (Android/iOS/Opera)
pip install -U nai-security[...]python manage.py migrate- Restart web workers
- Smoke-test login + one blocked IP/country path