1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Change default sensitive redaction behavior

* Only project updates will contain sensitive data redaction logic when
  displaying stdout
This commit is contained in:
Matthew Jones 2015-08-13 15:47:35 -04:00
parent 6128ab3ff4
commit d4dccff20c
2 changed files with 5 additions and 1 deletions

View File

@ -353,6 +353,10 @@ class ProjectUpdate(UnifiedJob, ProjectOptions):
def task_impact(self):
return 20
@property
def result_stdout(self):
return self._result_stdout_raw(redact_sensitive=True, escape_ascii=True)
def get_absolute_url(self):
return reverse('api:project_update_detail', args=(self.pk,))

View File

@ -622,7 +622,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
ansi_escape = re.compile(r'\x1b[^m]*m')
return ansi_escape.sub('', content)
def _result_stdout_raw(self, redact_sensitive=True, escape_ascii=False):
def _result_stdout_raw(self, redact_sensitive=False, escape_ascii=False):
content = self.result_stdout_raw_handle().read()
if redact_sensitive:
content = UriCleaner.remove_sensitive(content)