Skip to content

Commit 34476e3

Browse files
authored
Merge pull request #70 from brootware/dev
Dev
2 parents d4907db + f3c2f4e commit 34476e3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ and simply didn't have the time to go back and retroactively create one.
1818

1919
- None at the moment.
2020

21+
## [0.4.0] - 2022-07-27
22+
23+
Making sure only sensitive string is in the api detection
24+
25+
### Changed
26+
27+
- FMaking sure only sensitive string is in the api detection
28+
2129
## [0.3.9] - 2022-07-27
2230

2331
Fixed the api from not identifying base64 text.

pyredactkit/core_redactor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def identify_data(self, textchunk: str) -> list:
4747
for id in id_object.regexes:
4848
redact_pattern = id['pattern']
4949
if re.search(redact_pattern, line):
50-
sensitive_data.append(line)
50+
pattern_string = re.search(redact_pattern, line)
51+
sensitive_string = pattern_string.group(0)
52+
sensitive_data.append(sensitive_string)
5153
return sensitive_data
5254

5355
def redact_all(self, line: str) -> tuple:

0 commit comments

Comments
 (0)