File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ class Meta:
31
31
def validate (self , attrs : dict ):
32
32
for field in Job .api_fields_write :
33
33
if field in attrs :
34
- validate_no_xss (value = attrs [field ], field = field )
34
+ if field in Job .fields_allow_sq :
35
+ validate_no_xss (value = attrs [field ], field = field , single_quote = True )
36
+
37
+ else :
38
+ validate_no_xss (value = attrs [field ], field = field )
35
39
36
40
return attrs
37
41
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ class Job(BaseJob):
89
89
api_fields_read .extend (CHANGE_FIELDS )
90
90
api_fields_write = api_fields_read .copy ()
91
91
api_fields_read .append ('next_run' )
92
+ fields_allow_sq = ['comment' ]
92
93
93
94
name = models .CharField (max_length = 150 , null = False , blank = False )
94
95
playbook_file = models .CharField (max_length = 100 )
You can’t perform that action at this time.
0 commit comments