aiwaf 0.1.9.2.6__py3-none-any.whl → 0.1.9.2.7__py3-none-any.whl

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.

aiwaf/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  default_app_config = "aiwaf.apps.AiwafConfig"
2
2
 
3
- __version__ = "0.1.9.2.6"
3
+ __version__ = "0.1.9.2.7"
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
aiwaf/middleware.py CHANGED
@@ -85,6 +85,7 @@ class IPAndKeywordBlockMiddleware:
85
85
  self.safe_prefixes = self._collect_safe_prefixes()
86
86
  self.exempt_keywords = self._get_exempt_keywords()
87
87
  self.legitimate_path_keywords = self._get_legitimate_path_keywords()
88
+ self.malicious_keywords = set(STATIC_KW) # Initialize malicious keywords
88
89
 
89
90
  def _get_exempt_keywords(self):
90
91
  """Get keywords that should be exempt from blocking"""
@@ -439,6 +440,7 @@ class AIAnomalyMiddleware(MiddlewareMixin):
439
440
  super().__init__(get_response)
440
441
  # Use the safely loaded global MODEL instead of loading again
441
442
  self.model = MODEL
443
+ self.malicious_keywords = set(STATIC_KW) # Initialize malicious keywords
442
444
 
443
445
  def _is_malicious_context(self, request, keyword):
444
446
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiwaf
3
- Version: 0.1.9.2.6
3
+ Version: 0.1.9.2.7
4
4
  Summary: AI-powered Web Application Firewall
5
5
  Home-page: https://github.com/aayushgauba/aiwaf
6
6
  Author: Aayush Gauba
@@ -1,8 +1,8 @@
1
- aiwaf/__init__.py,sha256=vgc-dT-AtR3_k84Wpmujg4ZRwl6EuU7IR2_KW2B0tBU,220
1
+ aiwaf/__init__.py,sha256=TCY7zgvfazGCir552LTRiAfLBZcCfJGYpVD1eAuN9Pk,220
2
2
  aiwaf/apps.py,sha256=nCez-Ptlv2kaEk5HenA8b1pATz1VfhrHP1344gwcY1A,142
3
3
  aiwaf/blacklist_manager.py,sha256=LYCeKFB-7e_C6Bg2WeFJWFIIQlrfRMPuGp30ivrnhQY,1196
4
4
  aiwaf/decorators.py,sha256=IUKOdM_gdroffImRZep1g1wT6gNqD10zGwcp28hsJCs,825
5
- aiwaf/middleware.py,sha256=cpxOI6W45A6qRa9Ulk1StqCTSJjCoBx387FegZB0iMA,31889
5
+ aiwaf/middleware.py,sha256=ThR0Bxw_VbGcOsRMIXMmQ5OMOIAy19z4SulsK7rZ_NM,32053
6
6
  aiwaf/middleware_logger.py,sha256=LWZVDAnjh6CGESirA8eMbhGgJKB7lVDGRQqVroH95Lo,4742
7
7
  aiwaf/models.py,sha256=vQxgY19BDVMjoO903UNrTZC1pNoLltMU6wbyWPoAEns,2719
8
8
  aiwaf/storage.py,sha256=5ImrZMRn3u7HNsPH0fDjWhDrD2tgG2IHVnOXtLz0fk4,10253
@@ -29,8 +29,8 @@ aiwaf/management/commands/test_exemption_fix.py,sha256=ngyGaHUCmQQ6y--6j4q1viZJt
29
29
  aiwaf/resources/model.pkl,sha256=5t6h9BX8yoh2xct85MXOO60jdlWyg1APskUOW0jZE1Y,1288265
30
30
  aiwaf/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  aiwaf/templatetags/aiwaf_tags.py,sha256=XXfb7Tl4DjU3Sc40GbqdaqOEtKTUKELBEk58u83wBNw,357
32
- aiwaf-0.1.9.2.6.dist-info/licenses/LICENSE,sha256=Ir8PX4dxgAcdB0wqNPIkw84fzIIRKE75NoUil9RX0QU,1069
33
- aiwaf-0.1.9.2.6.dist-info/METADATA,sha256=iaCG43PeSHGu16Jawzelh5Qi0PoGysvi_BYfWFIcvbA,26824
34
- aiwaf-0.1.9.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
- aiwaf-0.1.9.2.6.dist-info/top_level.txt,sha256=kU6EyjobT6UPCxuWpI_BvcHDG0I2tMgKaPlWzVxe2xI,6
36
- aiwaf-0.1.9.2.6.dist-info/RECORD,,
32
+ aiwaf-0.1.9.2.7.dist-info/licenses/LICENSE,sha256=Ir8PX4dxgAcdB0wqNPIkw84fzIIRKE75NoUil9RX0QU,1069
33
+ aiwaf-0.1.9.2.7.dist-info/METADATA,sha256=tT2a7bhytbNJ5nvi1X7R6-9Xef7liJYQL-G8RMM3Oa8,26824
34
+ aiwaf-0.1.9.2.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
+ aiwaf-0.1.9.2.7.dist-info/top_level.txt,sha256=kU6EyjobT6UPCxuWpI_BvcHDG0I2tMgKaPlWzVxe2xI,6
36
+ aiwaf-0.1.9.2.7.dist-info/RECORD,,