django-restit 4.2.76__py3-none-any.whl → 4.2.78__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.
account/models/member.py CHANGED
@@ -884,8 +884,8 @@ class Member(User, RestModel, MetaDataModel):
884
884
  if token is None:
885
885
  token = AuthToken(member=self, role="default")
886
886
  token.generateToken()
887
- elif action == "refresh_keys":
888
- self.refreshSecurityToken()
887
+ elif action == "refresh_keys" or action == "force_logout":
888
+ self.forceLogout()
889
889
 
890
890
  def set_full_name(self, value):
891
891
  self.set_name(value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.76
3
+ Version: 4.2.78
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -28,7 +28,7 @@ account/models/device.py,sha256=TloXvvrx3khF3BeGFuVYn6DhXjOW0AMZb4F9Fl5nBII,5491
28
28
  account/models/feeds.py,sha256=vI7fG4ASY1M0Zjke24RdnfDcuWeATl_yR_25jPmT64g,2011
29
29
  account/models/group.py,sha256=iDD_oSgswKV_t_gXZuVK80MvICrZZqdANm2jtGtOFy8,21985
30
30
  account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
31
- account/models/member.py,sha256=tQDJjGEx0a0Diw6jMWfItD8PN76m0OSLWOsYaHcn8_s,52941
31
+ account/models/member.py,sha256=v2cM7g5XoOQi_ZAlGcOcKn24zZCfAFokxUFIqNshDxc,52960
32
32
  account/models/membership.py,sha256=90EpAhOsGaqphDAkONP6j_qQ0OWSRaQsI8H7E7fgMkE,9249
33
33
  account/models/notify.py,sha256=Qzi8gLsVi8nDx8gpL4dyr0MPExYYGIDxZvHFUdCs7H4,15072
34
34
  account/models/passkeys.py,sha256=TJxITUi4DT4_1tW2K7ZlOcRjJuMVl2NtKz7pKQU8-Tw,1516
@@ -114,7 +114,7 @@ incident/models/ossec.py,sha256=p1ptr-8lnaj1EP_VmPR58b2LmaYBGaYYKAMqhWK5yZM,2227
114
114
  incident/models/rules.py,sha256=SMlDRw_r3fGv-vmRojRLmsklqRRxDcjrSLVBIz-gadA,6884
115
115
  incident/models/ticket.py,sha256=S3kqGQpYLE6Y4M9IKu_60sgW-f592xNr8uufqHnvDoU,2302
116
116
  incident/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
- incident/parsers/ossec.py,sha256=jBvZh5RAYSIRSm-sLrvwdIVDfJxNULxzanoaYI-Z2Tw,7881
117
+ incident/parsers/ossec.py,sha256=uh9LFLUa0uL7a-3l9w3Kd7YmTZGYbS24uoDwPWM_s58,8415
118
118
  incident/periodic.py,sha256=eX1rQK6v65A9ugofTvJPSmAWei6C-3EYgzCMuGZ03jM,381
119
119
  incident/rpc.py,sha256=3y0rfxRR9DikmCmj3IRcMaCLtzLCMrtH64lrjY1w2Og,7992
120
120
  incident/templates/email/incident_change.html,sha256=tQYphypwLukkVdwH0TB2Szz2VEJ7GnsfRS3_ZJ-MYeE,13895
@@ -502,7 +502,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
502
502
  ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
503
503
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
504
504
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
505
- django_restit-4.2.76.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
506
- django_restit-4.2.76.dist-info/METADATA,sha256=TDbMoKB6NsKygIh8djiwAhiRCiwq1leZO159_oW-oZs,7645
507
- django_restit-4.2.76.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
508
- django_restit-4.2.76.dist-info/RECORD,,
505
+ django_restit-4.2.78.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
506
+ django_restit-4.2.78.dist-info/METADATA,sha256=wKYW-bztLqxjiqvXiiFHkxyo4_uLm5shsfOU3xnJnbE,7645
507
+ django_restit-4.2.78.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
508
+ django_restit-4.2.78.dist-info/RECORD,,
incident/parsers/ossec.py CHANGED
@@ -45,7 +45,7 @@ def extractUrlPath(text):
45
45
 
46
46
  def extractMetaData(alert):
47
47
  irule = int(alert.rule_id)
48
- if irule == 31301:
48
+ if irule in [31301, 31302, 31303]:
49
49
  patterns = {
50
50
  "src_ip": re.compile(r"Src IP: (\S+)"),
51
51
  "path": re.compile(r"request: (\S+ \S+)"),
@@ -171,13 +171,24 @@ def parseAlert(request, data):
171
171
  remote_file = m.group(1)
172
172
  alert.title = f"New file detected: '{remote_file}'"
173
173
  elif irule == 31101:
174
- m = re.search(r"GET\s+(http://[^\s]+)\s+HTTP/\d\.\d\s+(\d+)", data.text)
174
+ m = re.search(r"(GET|POST|DELETE|PUT)\s+(http://[^\s]+)\s+HTTP/\d\.\d\s+(\d+)", data.text)
175
175
  if m and m.groups():
176
- code = m.group(2)
177
- request_path = m.group(1)
178
- alert.title = f"HTTP {code}: {request_path}"
179
- elif irule == 31301:
180
- m = re.search(r"(\[error\]|\[crit\])[^\*]*\*\d*\s+(.*?),", text)
176
+ code = m.group(3)
177
+ method = m.group(1)
178
+ request_path = m.group(2)
179
+ alert.title = f"HTTP {code}: {METHOD} {request_path}"
180
+ elif irule == 31104 or irule == 31516:
181
+ m = re.search(r"(GET|POST|DELETE|PUT)\s+(http://[^\s]+)\s+HTTP/\d\.\d\s+(\d+)", data.text)
182
+ if m and m.groups():
183
+ code = m.group(3)
184
+ method = m.group(1)
185
+ request_path = m.group(2)
186
+ kind = "Common"
187
+ if irule == 31516:
188
+ kind = "Suspect"
189
+ alert.title = f"{kind} Attack {code}: {METHOD} {request_path}"
190
+ elif irule in [31301, 31302, 31303]:
191
+ m = re.search(r"(\[error\]|\[crit\])[^\*]*\*\d*\s+(.*?),", data.text)
181
192
  if m and len(m.groups()) >=2:
182
193
  alert.title = error
183
194
  elif irule == 100020: