django-restit 4.2.156__py3-none-any.whl → 4.2.158__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/device.py CHANGED
@@ -96,6 +96,9 @@ class MemberDevice(models.Model, rm.RestModel, rm.MetaDataModel):
96
96
  md.kind = "mac"
97
97
  md.save()
98
98
  md.setProperty("user_agent", request.META.get('HTTP_USER_AGENT', ''))
99
+ metadata = request.DATA.get("device_metadata", None)
100
+ if isinstance(metadata, dict):
101
+ md.set_metadata(metadata)
99
102
  return md
100
103
 
101
104
  @classmethod
@@ -9,8 +9,10 @@ from datetime import datetime
9
9
 
10
10
  class UserPassKey(models.Model, rm.RestModel):
11
11
  """
12
- MemberDevice Model tracks personal devices associated with a user.
13
- This can include mobile and desktop devices.
12
+ A “Passkey” is a modern, secure authentication method designed to replace
13
+ traditional passwords with more robust and user-friendly alternatives.
14
+ It leverages cryptographic techniques and is based on standards like
15
+ WebAuthn and FIDO2, aiming to improve both security and convenience.
14
16
  """
15
17
  class RestMeta:
16
18
  VIEW_PERMS = ["manage_users", "owner"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.156
3
+ Version: 4.2.158
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -26,14 +26,14 @@ account/migrations/0021_alter_cloudcredentials_group.py,sha256=zoFYmE-hd3uRGX6DR
26
26
  account/migrations/0022_alter_memberdevice_modified.py,sha256=9eeKcdr9p6qFJ8ZxSnKSj1KxZjW8NZfM0YCMck6i0QQ,424
27
27
  account/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  account/models/__init__.py,sha256=cV_lMnT2vL_mjiYtT4hlcIHo52ocFbGSNVkOIHHLXZY,385
29
- account/models/device.py,sha256=0AFeLMGk4im4KZVd3eGSyRbK4eQEXiFM2cdY8GUzihs,5934
29
+ account/models/device.py,sha256=idOe88sRkGn3U3DJS7WizFWOGCm-D-nWPqIdBpX4M7Q,6072
30
30
  account/models/feeds.py,sha256=vI7fG4ASY1M0Zjke24RdnfDcuWeATl_yR_25jPmT64g,2011
31
31
  account/models/group.py,sha256=N9Ow7AtV4xN5zSE9E5-msthJy0G5-3DEr2MTmvFO1kU,22887
32
32
  account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
33
33
  account/models/member.py,sha256=qmLCOVbNTRr4L-E7BbOMtv4V64QN7K-0pXDgnuB-AbY,54722
34
34
  account/models/membership.py,sha256=90EpAhOsGaqphDAkONP6j_qQ0OWSRaQsI8H7E7fgMkE,9249
35
35
  account/models/notify.py,sha256=YKYEXT56i98b7-ydLt5UuEVOqW7lipQMi-KuiPhcSwY,15627
36
- account/models/passkeys.py,sha256=TJxITUi4DT4_1tW2K7ZlOcRjJuMVl2NtKz7pKQU8-Tw,1516
36
+ account/models/passkeys.py,sha256=lObapudvL--ABSTZTIELmYvHE3dPF0tO_KmuYk0ZJXc,1699
37
37
  account/models/session.py,sha256=ELkWjB_2KXQvPtRPrvuGJpJsqrxCQX_4J53SbqGz_2U,3737
38
38
  account/models/settings.py,sha256=gOyRWBVd3BQpjfj_hJPtqX3H46ztyRAFxBrPbv11lQg,2137
39
39
  account/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -96,8 +96,6 @@ inbox/utils/render.py,sha256=CU_F2qUBQE7mjb9Q6Dn9ro5CS_O_zEY-wDMHEClKkIA,4331
96
96
  inbox/utils/sending.py,sha256=BKelTZnbkdSLGpjOY6IRTrzj-Hnw2pPZ7RYQGwe-tqk,2179
97
97
  incident/README.md,sha256=4vbZTJj7uUmq8rogYngxqNYjFTlBOujfWUGheLoFKMc,1114
98
98
  incident/__init__.py,sha256=xgdt3z3z7ygjWv5HxhiWgBtB2W3IUJmmR88NSyUeHuo,3455
99
- incident/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
- incident/extra/abuse.py,sha256=1eBJWhhzQ6EF7mkchI_QD3h0UH4Qiw_iXvsQgJdmjcg,4373
101
99
  incident/migrations/0001_initial.py,sha256=KmJRau3a2QFRaUwUrFUgY2p7FQZCODv3F-Sl0ZArpu0,9720
102
100
  incident/migrations/0002_event_component_event_component_id.py,sha256=Qfu3ndJKh4v7953ULTUZlSa3mVI-lnFIq9VFN1Rbs7Q,595
103
101
  incident/migrations/0003_rule_action.py,sha256=LNqV52qOjxxe3L8qEdln-Hd2voFcpyjOZ_cEsasrv7s,425
@@ -116,14 +114,14 @@ incident/migrations/0015_rule_title_template_alter_incident_state.py,sha256=FPUD
116
114
  incident/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
115
  incident/models/__init__.py,sha256=NMphuhb0RTMf7Ov4QkNv7iv6_I8Wtr3xQ54yjX_a31M,209
118
116
  incident/models/event.py,sha256=FEzEKKQKLkdRrPCvv-3Um9E2UPQjyIJp314Zr2LHuiw,7976
119
- incident/models/incident.py,sha256=Imr2fjRBjuuut8XAGrNcn3mjTLPTDO4V2KfWByHxSac,21824
117
+ incident/models/incident.py,sha256=5unJbVcjK05moXPrmq4S9aqGW6ysIzRxD4lp_HowKLs,21940
120
118
  incident/models/ossec.py,sha256=eUDRGawzuLWobKEVGKfdZisDnyjS_Hlxi0T_GCSLCCI,2252
121
119
  incident/models/rules.py,sha256=aRkJ0ZnTv87nAUC1sHVkPExfb3OJ8fgHQIhnCIpIbhQ,7001
122
120
  incident/models/ticket.py,sha256=S3kqGQpYLE6Y4M9IKu_60sgW-f592xNr8uufqHnvDoU,2302
123
121
  incident/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
122
  incident/parsers/ossec.py,sha256=fouUsSnrdkEuqDzJ-MxmCP7ny5pCGFS3Tyf6lQSMBc4,11609
125
123
  incident/periodic.py,sha256=eX1rQK6v65A9ugofTvJPSmAWei6C-3EYgzCMuGZ03jM,381
126
- incident/rpc.py,sha256=rCFVWhWjaRHBLvlpxs-TlnkCNLsP9n6V3tg4KpYNHfg,8747
124
+ incident/rpc.py,sha256=sFHN1BTTPx-yYd6iCOpcGsKVHZPcD7LWcRcR0XsVquE,8768
127
125
  incident/templates/email/incident_change.html,sha256=tQYphypwLukkVdwH0TB2Szz2VEJ7GnsfRS3_ZJ-MYeE,13895
128
126
  incident/templates/email/incident_msg.html,sha256=MZdKhTddUF2MpiH8Z3RTQEmW_ko1n3ajeZ11KLtiLlU,13780
129
127
  incident/templates/email/incident_new.html,sha256=W6nwFQROnyDfMlXub8s02ws4hGnJp16pfgp9xTm_aEc,15185
@@ -146,6 +144,7 @@ location/models/track.py,sha256=OdhRL1KVXlPcZkp4S6QpKc7Ctoth8VjwHs_dlZ8XHI4,1474
146
144
  location/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
145
  location/providers/iplookup/__init__.py,sha256=I0K0HZrluCsBZ1TlGGKnyavEDZ3mT-xfE7Dtq2k-F9k,790
148
146
  location/providers/iplookup/abstractapi.py,sha256=gY8eqpjEasZtiBC6nNu960ZGL96FVwNS2JoZuP1GBO4,2419
147
+ location/providers/iplookup/abuse.py,sha256=1eBJWhhzQ6EF7mkchI_QD3h0UH4Qiw_iXvsQgJdmjcg,4373
149
148
  location/providers/iplookup/extremeip.py,sha256=QNRGhwXXsOuJL2M-xiI2pFN_6LP2HkqSUpFosu5Q04M,1345
150
149
  location/providers/iplookup/geoplugin.py,sha256=RK_6McxHYlVVMVdJ2rCafw-kqMfzMm3g_tJjBwcKXYg,2121
151
150
  location/providers/iplookup/ipapi.py,sha256=cyVs_n4GYvmLsPn8jDOcfevPzWkwBs22PSzoYRzVhDo,1797
@@ -379,7 +378,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
379
378
  rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
380
379
  rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
381
380
  rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
382
- rest/__init__.py,sha256=lqGQe8RpSgJgRYgI1-4Lf8OQxGHqQkLQMoIwqbt-NCw,122
381
+ rest/__init__.py,sha256=SU4Po24LGBYYq7oi8hG5xIytEBZ6kYngMv2k66cvPi0,122
383
382
  rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
384
383
  rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
385
384
  rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
@@ -515,7 +514,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
515
514
  ws4redis/settings.py,sha256=KKq00EwoGnz1yLwCZr5Dfoq2izivmAdsNEEM4EhZwN4,1610
516
515
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
517
516
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
518
- django_restit-4.2.156.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
519
- django_restit-4.2.156.dist-info/METADATA,sha256=cl7Zn0f9xdd9SKb8qbni3mdRURx5NKP2149paeLUGyc,7663
520
- django_restit-4.2.156.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
521
- django_restit-4.2.156.dist-info/RECORD,,
517
+ django_restit-4.2.158.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
518
+ django_restit-4.2.158.dist-info/METADATA,sha256=EK_-ce-t1VPSg93xJBxPOUxxFK2Sh0yEBi6QxTKRdEY,7663
519
+ django_restit-4.2.158.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
520
+ django_restit-4.2.158.dist-info/RECORD,,
@@ -10,7 +10,7 @@ from datetime import datetime, timedelta
10
10
  from rest import log
11
11
  from ws4redis import client as ws4redis
12
12
  import time
13
- from incident.extra import abuse
13
+ from location.providers.iplookup import abuse
14
14
 
15
15
  logger = log.getLogger("incident", filename="incident.log")
16
16
 
@@ -516,6 +516,8 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
516
516
  q.reporter_ip = event.reporter_ip
517
517
  if rule.bundle_by in [6, 7, 8]:
518
518
  q.category = event.category
519
+ if rule.bundle_by in [9] and event.group is not None:
520
+ q.group__pk = event.group.pk
519
521
  return Incident.objects.filter(**q).last()
520
522
 
521
523
  @classmethod
incident/rpc.py CHANGED
@@ -2,10 +2,10 @@ from rest import decorators as rd
2
2
  from rest import views as rv
3
3
  from rest import helpers as rh
4
4
  from rest import settings
5
- from . import models as am
6
- from .extra import abuse
5
+ from . import models as am
7
6
  from .parsers import ossec
8
7
  from taskqueue.models import Task
8
+ from location.providers.iplookup import abuse
9
9
  import incident
10
10
 
11
11
  LOG_REST_PREFIX = settings.get("REST_PREFIX", "api/")
rest/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from .uberdict import UberDict # noqa: F401
2
2
  from .settings_helper import settings # noqa: F401
3
3
 
4
- __version__ = "4.2.156"
4
+ __version__ = "4.2.158"
File without changes
File without changes