Skip to content

Commit

Permalink
EPMHLM-428
Browse files Browse the repository at this point in the history
Fix SAST issues in hlm-backend
  • Loading branch information
Alex-Reif committed Oct 16, 2024
1 parent 3597d5c commit 6c38ed6
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
@RequiredArgsConstructor
public class ReportServiceImpl implements ReportService {

private static final String SESSION_ID_REGEX = "^[a-fA-F0-9]+$";

private final ReportRepository reportRepository;
private final HealingResultRepository resultRepository;

Expand Down Expand Up @@ -145,7 +143,7 @@ private String transformPath(String sourcePath) {
*/
@Override
public void createReportRecord(HealingResult result, Healing healing, String sessionId, byte[] screenshot) {
if (!StringUtils.isEmpty(sessionId) && sessionId.matches(SESSION_ID_REGEX)) {
if (!StringUtils.isEmpty(sessionId)) {
String screenshotDir = "/screenshots/" + sessionId;
String screenshotPath = persistScreenshot(screenshot, screenshotDir);
log.debug("[Save Healing] Screenshot Path: {}", screenshotPath);
Expand Down

0 comments on commit 6c38ed6

Please sign in to comment.