@@ -56,9 +56,12 @@ class GloballyExcludedTarget(models.Model):
56
56
"""Model for globally excluded targets."""
57
57
58
58
id = models .AutoField (primary_key = True , verbose_name = "Globally excluded target ID" )
59
+ # See the client_max_body_size setting in
60
+ # ansible-playbooks/roles/master/templates/etc/nginx/sites-available/scantron_nginx.conf.j2 if the max_length value
61
+ # is changed.
59
62
globally_excluded_targets = models .CharField (
60
63
unique = False ,
61
- max_length = 1_048_576 , # 2^20 = 1048576
64
+ max_length = 4194304 , # 2^22 = 4194304. See note above if this value is changed.
62
65
validators = [
63
66
RegexValidator (
64
67
regex = "^[a-zA-Z0-9/\.\:\- ]*$" , # Characters to support IPv4, IPv6, and FQDNs only. Space delimited.
@@ -130,9 +133,12 @@ class Site(models.Model):
130
133
verbose_name = "Site Name" ,
131
134
)
132
135
description = models .CharField (unique = False , max_length = 255 , blank = True , verbose_name = "Description" )
136
+ # See the client_max_body_size setting in
137
+ # ansible-playbooks/roles/master/templates/etc/nginx/sites-available/scantron_nginx.conf.j2 if the max_length value
138
+ # is changed.
133
139
targets = models .CharField (
134
140
unique = False ,
135
- max_length = 1_048_576 , # 2^20 = 1048576
141
+ max_length = 4194304 , # 2^22 = 4194304. See note above if this value is changed.
136
142
validators = [
137
143
RegexValidator (
138
144
regex = "^[a-zA-Z0-9/\.\:\- ]*$" , # Characters to support IPv4, IPv6, and FQDNs only. Space delimited.
@@ -141,10 +147,13 @@ class Site(models.Model):
141
147
],
142
148
verbose_name = "Targets" ,
143
149
)
150
+ # See the client_max_body_size setting in
151
+ # ansible-playbooks/roles/master/templates/etc/nginx/sites-available/scantron_nginx.conf.j2 if the max_length value
152
+ # is changed.
144
153
excluded_targets = models .CharField (
145
154
unique = False ,
146
155
blank = True ,
147
- max_length = 1_048_576 , # 2^20 = 1048576
156
+ max_length = 4194304 , # 2^22 = 4194304. See note above if this value is changed.
148
157
validators = [
149
158
RegexValidator (
150
159
regex = "^[a-zA-Z0-9/\.\:\- ]*$" , # Characters to support IPv4, IPv6, and FQDNs only. Space delimited.
@@ -273,9 +282,12 @@ class ScheduledScan(models.Model):
273
282
start_datetime = models .DateTimeField (verbose_name = "Scheduled scan start date and time" )
274
283
scan_binary = models .CharField (max_length = 7 , default = "nmap" , verbose_name = "Scan binary" )
275
284
scan_command = models .TextField (unique = False , verbose_name = "Scan command" )
285
+ # See the client_max_body_size setting in
286
+ # ansible-playbooks/roles/master/templates/etc/nginx/sites-available/scantron_nginx.conf.j2 if the max_length value
287
+ # is changed.
276
288
targets = models .CharField (
277
289
unique = False ,
278
- max_length = 1_048_576 , # 2^20 = 1048576
290
+ max_length = 4194304 , # 2^22 = 4194304. See note above if this value is changed.
279
291
validators = [
280
292
RegexValidator (
281
293
regex = "^[a-zA-Z0-9/\.\: ]*$" , # Characters to support IPv4, IPv6, and FQDNs only. Space delimited.
@@ -284,10 +296,13 @@ class ScheduledScan(models.Model):
284
296
],
285
297
verbose_name = "Targets" ,
286
298
)
299
+ # See the client_max_body_size setting in
300
+ # ansible-playbooks/roles/master/templates/etc/nginx/sites-available/scantron_nginx.conf.j2 if the max_length value
301
+ # is changed.
287
302
excluded_targets = models .CharField (
288
303
unique = False ,
289
304
blank = True ,
290
- max_length = 1_048_576 , # 2^20 = 1048576
305
+ max_length = 4194304 , # 2^22 = 4194304. See note above if this value is changed.
291
306
validators = [
292
307
RegexValidator (
293
308
regex = "^[a-zA-Z0-9/\.\: ]*$" , # Characters to support IPv4, IPv6, and FQDNs only. Space delimited.
0 commit comments