django-restit 4.2.81__py3-none-any.whl → 4.2.82__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 +2 -2
- {django_restit-4.2.81.dist-info → django_restit-4.2.82.dist-info}/METADATA +1 -1
- {django_restit-4.2.81.dist-info → django_restit-4.2.82.dist-info}/RECORD +9 -9
- incident/models/rules.py +1 -0
- incident/parsers/ossec.py +17 -6
- location/models/ip.py +2 -0
- location/providers/iplookup/__init__.py +5 -1
- {django_restit-4.2.81.dist-info → django_restit-4.2.82.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.81.dist-info → django_restit-4.2.82.dist-info}/WHEEL +0 -0
account/models/member.py
CHANGED
@@ -224,11 +224,11 @@ class Member(User, RestModel, MetaDataModel):
|
|
224
224
|
|
225
225
|
@property
|
226
226
|
def force_single_session(self):
|
227
|
-
return self.hasPermission("force_single_session")
|
227
|
+
return self.hasPermission("force_single_session", ignore_su=True)
|
228
228
|
|
229
229
|
@property
|
230
230
|
def email_disabled(self):
|
231
|
-
return self.hasPermission("email_disabled")
|
231
|
+
return self.hasPermission("email_disabled", ignore_su=True)
|
232
232
|
|
233
233
|
@property
|
234
234
|
def has_totp(self):
|
@@ -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=
|
31
|
+
account/models/member.py,sha256=fzSVVAdbUa1knp1O4JTnYZFYRas7-zDZaOPjZAMCC1Q,52992
|
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,10 +114,10 @@ incident/models/__init__.py,sha256=NMphuhb0RTMf7Ov4QkNv7iv6_I8Wtr3xQ54yjX_a31M,2
|
|
114
114
|
incident/models/event.py,sha256=Dw6fUi2tbLeA_ZRDcvGQNFkCkMGMBdtNeaLikXdAyE8,7769
|
115
115
|
incident/models/incident.py,sha256=HPbi6J9qm7_-FMjnDUPV9NcbmP_60WU-IO9HJSpoLTY,19360
|
116
116
|
incident/models/ossec.py,sha256=eUDRGawzuLWobKEVGKfdZisDnyjS_Hlxi0T_GCSLCCI,2252
|
117
|
-
incident/models/rules.py,sha256=
|
117
|
+
incident/models/rules.py,sha256=aRkJ0ZnTv87nAUC1sHVkPExfb3OJ8fgHQIhnCIpIbhQ,7001
|
118
118
|
incident/models/ticket.py,sha256=S3kqGQpYLE6Y4M9IKu_60sgW-f592xNr8uufqHnvDoU,2302
|
119
119
|
incident/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
120
|
-
incident/parsers/ossec.py,sha256=
|
120
|
+
incident/parsers/ossec.py,sha256=jyJmNBwnQS1tjZMwYhslnCpZviCHXnozv88BPT-ytCw,11592
|
121
121
|
incident/periodic.py,sha256=eX1rQK6v65A9ugofTvJPSmAWei6C-3EYgzCMuGZ03jM,381
|
122
122
|
incident/rpc.py,sha256=viJt873b8T8SiAq10EM57lF8g7ghyj3ymdkaXzh2Ass,8181
|
123
123
|
incident/templates/email/incident_change.html,sha256=tQYphypwLukkVdwH0TB2Szz2VEJ7GnsfRS3_ZJ-MYeE,13895
|
@@ -135,12 +135,12 @@ location/migrations/0004_remove_address_modified_by_address_group_and_more.py,sh
|
|
135
135
|
location/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
136
136
|
location/models/__init__.py,sha256=rZhldkoKmoJQXjBAK1IIQn7K_OOJvFtIGOGVl_szqbE,230
|
137
137
|
location/models/address.py,sha256=wl0bToZ6VrJP923IIfzWqZY9xyKgla6A-uzj8jQFGRI,3149
|
138
|
-
location/models/ip.py,sha256=
|
138
|
+
location/models/ip.py,sha256=Bl-OlwEXGvKYvYSDBSsnQkeAi4ZTKs1mDt3ddc5rq80,6039
|
139
139
|
location/models/legacy.py,sha256=8ROsUSZrjGQkUyXeJvoxPdKAWaKfUH-AL9TIeJb7krg,1994
|
140
140
|
location/models/location.py,sha256=01dJPJecbp5orExsIGWOsBC_KkwFRIW0rGDIwyx1r0w,2316
|
141
141
|
location/models/track.py,sha256=OdhRL1KVXlPcZkp4S6QpKc7Ctoth8VjwHs_dlZ8XHI4,1474
|
142
142
|
location/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
143
|
-
location/providers/iplookup/__init__.py,sha256=
|
143
|
+
location/providers/iplookup/__init__.py,sha256=I0K0HZrluCsBZ1TlGGKnyavEDZ3mT-xfE7Dtq2k-F9k,790
|
144
144
|
location/providers/iplookup/abstractapi.py,sha256=gY8eqpjEasZtiBC6nNu960ZGL96FVwNS2JoZuP1GBO4,2419
|
145
145
|
location/providers/iplookup/extremeip.py,sha256=QNRGhwXXsOuJL2M-xiI2pFN_6LP2HkqSUpFosu5Q04M,1345
|
146
146
|
location/providers/iplookup/geoplugin.py,sha256=RK_6McxHYlVVMVdJ2rCafw-kqMfzMm3g_tJjBwcKXYg,2121
|
@@ -506,7 +506,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
506
506
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
507
507
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
508
508
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
509
|
-
django_restit-4.2.
|
510
|
-
django_restit-4.2.
|
511
|
-
django_restit-4.2.
|
512
|
-
django_restit-4.2.
|
509
|
+
django_restit-4.2.82.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
510
|
+
django_restit-4.2.82.dist-info/METADATA,sha256=3y5JxK8Y5LnGio73TTZEcoDQ6lJbCk89XrLxgELdK8Y,7645
|
511
|
+
django_restit-4.2.82.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
512
|
+
django_restit-4.2.82.dist-info/RECORD,,
|
incident/models/rules.py
CHANGED
incident/parsers/ossec.py
CHANGED
@@ -33,12 +33,21 @@ def parse_nginx_line(line):
|
|
33
33
|
return None
|
34
34
|
|
35
35
|
|
36
|
-
def removeNonAscii(input_str):
|
37
|
-
"""
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
def removeNonAscii(input_str, replacement=''):
|
37
|
+
"""
|
38
|
+
Replace all non-ASCII characters and escaped byte sequences in the input string with a specified string.
|
39
|
+
|
40
|
+
Args:
|
41
|
+
input_str (str): The string to process.
|
42
|
+
replacement (str): The string to use as a replacement for non-ASCII characters and escaped byte sequences.
|
43
|
+
|
44
|
+
Returns:
|
45
|
+
str: The processed string with non-ASCII characters and byte sequences replaced.
|
46
|
+
"""
|
47
|
+
# Replace escaped byte sequences with the replacement string
|
48
|
+
cleaned_str = re.sub(r'\\x[0-9a-fA-F]{2}', replacement, input_str)
|
49
|
+
# Replace non-ASCII characters with the replacement string
|
50
|
+
return ''.join(char if (32 <= ord(char) < 128 or char in '\n\r\t') else f"<r{str(ord(char))}>" for char in cleaned_str)
|
42
51
|
|
43
52
|
|
44
53
|
def extractURL(text):
|
@@ -168,6 +177,8 @@ def parse_alert_json(data):
|
|
168
177
|
data = objict.fromJSON(removeNonAscii(data))
|
169
178
|
for key in data:
|
170
179
|
data[key] = data[key].strip()
|
180
|
+
if data.text:
|
181
|
+
data.text = removeNonAscii(data.text)
|
171
182
|
return data
|
172
183
|
|
173
184
|
|
location/models/ip.py
CHANGED
File without changes
|
File without changes
|