aiwaf 0.1.9.3.1__tar.gz → 0.1.9.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aiwaf might be problematic. Click here for more details.

Files changed (42) hide show
  1. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/PKG-INFO +1 -2
  2. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/README.md +0 -1
  3. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/__init__.py +1 -1
  4. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/middleware.py +2 -14
  5. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf.egg-info/PKG-INFO +1 -2
  6. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/pyproject.toml +1 -1
  7. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/setup.py +1 -1
  8. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/LICENSE +0 -0
  9. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/apps.py +0 -0
  10. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/blacklist_manager.py +0 -0
  11. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/decorators.py +0 -0
  12. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/__init__.py +0 -0
  13. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/__init__.py +0 -0
  14. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/add_exemption.py +0 -0
  15. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/add_ipexemption.py +0 -0
  16. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/aiwaf_diagnose.py +0 -0
  17. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/aiwaf_list.py +0 -0
  18. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/aiwaf_logging.py +0 -0
  19. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/aiwaf_reset.py +0 -0
  20. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/check_dependencies.py +0 -0
  21. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/clear_blacklist.py +0 -0
  22. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/clear_cache.py +0 -0
  23. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/debug_csv.py +0 -0
  24. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/detect_and_train.py +0 -0
  25. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/diagnose_blocking.py +0 -0
  26. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/regenerate_model.py +0 -0
  27. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/setup_models.py +0 -0
  28. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/test_exemption.py +0 -0
  29. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/management/commands/test_exemption_fix.py +0 -0
  30. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/middleware_logger.py +0 -0
  31. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/models.py +0 -0
  32. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/resources/model.pkl +0 -0
  33. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/storage.py +0 -0
  34. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/templatetags/__init__.py +0 -0
  35. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/templatetags/aiwaf_tags.py +0 -0
  36. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/trainer.py +0 -0
  37. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf/utils.py +0 -0
  38. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf.egg-info/SOURCES.txt +0 -0
  39. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf.egg-info/dependency_links.txt +0 -0
  40. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf.egg-info/requires.txt +0 -0
  41. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/aiwaf.egg-info/top_level.txt +0 -0
  42. {aiwaf-0.1.9.3.1 → aiwaf-0.1.9.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiwaf
3
- Version: 0.1.9.3.1
3
+ Version: 0.1.9.3.2
4
4
  Summary: AI-powered Web Application Firewall
5
5
  Home-page: https://github.com/aayushgauba/aiwaf
6
6
  Author: Aayush Gauba
@@ -115,7 +115,6 @@ aiwaf/
115
115
 
116
116
  - **Enhanced Timing-Based Honeypot**
117
117
  Advanced GET→POST timing analysis with comprehensive HTTP method validation:
118
- - POST directly without a preceding GET request
119
118
  - Submit forms faster than `AIWAF_MIN_FORM_TIME` seconds (default: 1 second)
120
119
  - **🆕 Smart HTTP Method Validation** - Comprehensive protection against method misuse:
121
120
  - Blocks GET requests to POST-only views (form endpoints, API creates)
@@ -92,7 +92,6 @@ aiwaf/
92
92
 
93
93
  - **Enhanced Timing-Based Honeypot**
94
94
  Advanced GET→POST timing analysis with comprehensive HTTP method validation:
95
- - POST directly without a preceding GET request
96
95
  - Submit forms faster than `AIWAF_MIN_FORM_TIME` seconds (default: 1 second)
97
96
  - **🆕 Smart HTTP Method Validation** - Comprehensive protection against method misuse:
98
97
  - Blocks GET requests to POST-only views (form endpoints, API creates)
@@ -1,6 +1,6 @@
1
1
  default_app_config = "aiwaf.apps.AiwafConfig"
2
2
 
3
- __version__ = "0.1.9.3.1"
3
+ __version__ = "0.1.9.3.2"
4
4
 
5
5
  # Note: Middleware classes are available from aiwaf.middleware
6
6
  # Import them only when needed to avoid circular imports during Django app loading
@@ -786,22 +786,10 @@ class HoneypotTimingMiddleware(MiddlewareMixin):
786
786
  "message": f"POST not allowed for {request.path}"
787
787
  }, status=405) # Method Not Allowed
788
788
 
789
- # Check if there was a preceding GET request
789
+ # Check if there was a preceding GET request for timing validation
790
790
  get_time = cache.get(f"honeypot_get:{ip}")
791
791
 
792
- if get_time is None:
793
- # No GET request - likely bot posting directly
794
- # But be more lenient for login paths since users might bookmark them
795
- if not any(request.path.lower().startswith(login_path) for login_path in [
796
- "/admin/login/", "/login/", "/accounts/login/", "/auth/login/", "/signin/"
797
- ]):
798
- # Double-check exemption before blocking
799
- if not exemption_store.is_exempted(ip):
800
- BlacklistManager.block(ip, "Direct POST without GET")
801
- # Check if actually blocked (exempted IPs won't be blocked)
802
- if BlacklistManager.is_blocked(ip):
803
- return JsonResponse({"error": "blocked"}, status=403)
804
- else:
792
+ if get_time is not None:
805
793
  # Check timing - be more lenient for login paths
806
794
  time_diff = time.time() - get_time
807
795
  min_time = self.MIN_FORM_TIME
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiwaf
3
- Version: 0.1.9.3.1
3
+ Version: 0.1.9.3.2
4
4
  Summary: AI-powered Web Application Firewall
5
5
  Home-page: https://github.com/aayushgauba/aiwaf
6
6
  Author: Aayush Gauba
@@ -115,7 +115,6 @@ aiwaf/
115
115
 
116
116
  - **Enhanced Timing-Based Honeypot**
117
117
  Advanced GET→POST timing analysis with comprehensive HTTP method validation:
118
- - POST directly without a preceding GET request
119
118
  - Submit forms faster than `AIWAF_MIN_FORM_TIME` seconds (default: 1 second)
120
119
  - **🆕 Smart HTTP Method Validation** - Comprehensive protection against method misuse:
121
120
  - Blocks GET requests to POST-only views (form endpoints, API creates)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "aiwaf"
3
- version = "0.1.9.3.1"
3
+ version = "0.1.9.3.2"
4
4
  description = "AI-powered Web Application Firewall"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.8"
@@ -9,7 +9,7 @@ long_description = (HERE / "README.md").read_text(encoding="utf-8")
9
9
 
10
10
  setup(
11
11
  name="aiwaf",
12
- version="0.1.9.3.1",
12
+ version="0.1.9.3.2",
13
13
  description="AI‑driven, self‑learning Web Application Firewall for Django",
14
14
  long_description=long_description,
15
15
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes