Skip to content

Commit edca3ce

Browse files
authored
Merge pull request #6573 from psiinon/error-stacktrace
Error logs to always include stack trace.
2 parents 32c8c28 + d322ba5 commit edca3ce

File tree

27 files changed

+53
-28
lines changed

27 files changed

+53
-28
lines changed

addOns/ascanrulesBeta/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
### Changed
88
- Depends on an updated version of the Common Library add-on.
99

10+
### Fixed
11+
- Error logs to always include stack trace.
12+
1013
### Added
1114
- Rules (as applicable) have been tagged in relation to HIPAA and PCI DSS.
1215
- The 403 Bypass scan rule now has a CWE reference.

addOns/ascanrulesBeta/src/main/java/org/zaproxy/zap/extension/ascanrulesBeta/CsrfTokenScanRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public void scan() {
243243
formIdx++;
244244
}
245245
} catch (IOException e) {
246-
LOGGER.error(e);
246+
LOGGER.debug(e, e);
247247
}
248248
}
249249

addOns/bruteforce/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66
## Unreleased
77

8+
### Fixed
9+
- Error logs to always include stack trace.
810

911
## [17] - 2025-01-09
1012
### Changed

addOns/bruteforce/src/main/java/com/sittinglittleduck/DirBuster/Manager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ else if (urlFuzz) {
434434
}
435435

436436
} catch (Exception e) {
437-
LOGGER.error(e);
437+
LOGGER.error(e, e);
438438
}
439439
}
440440

addOns/bruteforce/src/main/java/com/sittinglittleduck/DirBuster/workGenerators/BruteForceURLFuzz.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void run() {
9797
manager.setAuto(false);
9898
}
9999
} catch (IOException e) {
100-
LOGGER.error(e);
100+
LOGGER.error(e, e);
101101
}
102102
}
103103

@@ -108,7 +108,7 @@ public void run() {
108108
// get dir name
109109
currentDir = tempDirToCheck.getName();
110110
} catch (InterruptedException e) {
111-
LOGGER.debug(e);
111+
LOGGER.debug(e, e);
112112
}
113113

114114
LOGGER.info("Starting fuzz on {}{}{dir}{}", firstPart, urlFuzzStart, urlFuzzEnd);
@@ -125,7 +125,7 @@ public void run() {
125125
GenBaseCase.genURLFuzzBaseCase(manager, firstPart + urlFuzzStart, urlFuzzEnd);
126126

127127
} catch (IOException e) {
128-
LOGGER.error(e);
128+
LOGGER.error(e, e);
129129
}
130130

131131
// baseCaseObj = new BaseCase(null, failcode, true, failurl, baseCase);

addOns/bruteforce/src/main/java/com/sittinglittleduck/DirBuster/workGenerators/BruteForceWorkGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void run() {
109109
manager.setAuto(false);
110110
}
111111
} catch (IOException e) {
112-
LOGGER.error(e);
112+
LOGGER.error(e, e);
113113
}
114114
}
115115

@@ -124,7 +124,7 @@ public void run() {
124124
// get any extention that need to be checked
125125
extToCheck = tempDirToCheck.getExts();
126126
} catch (InterruptedException e) {
127-
LOGGER.debug(e);
127+
LOGGER.debug(e, e);
128128
}
129129

130130
started = currentDir;
@@ -142,7 +142,7 @@ public void run() {
142142
GenBaseCase.genBaseCase(manager, firstPart + currentDir, true, null);
143143

144144
} catch (IOException e) {
145-
LOGGER.error(e);
145+
LOGGER.error(e, e);
146146
}
147147

148148
// baseCaseObj = new BaseCase(null, failcode, true, failurl, baseCase);
@@ -178,7 +178,7 @@ public void run() {
178178
manager, firstPart + currentDir, false, fileExtention);
179179

180180
} catch (IOException e) {
181-
LOGGER.error(e);
181+
LOGGER.error(e, e);
182182
}
183183

184184
// call function to generate the brute force

addOns/bruteforce/src/main/java/com/sittinglittleduck/DirBuster/workGenerators/WorkerGenerator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void run() {
106106
} catch (FileNotFoundException ex) {
107107
LOGGER.error("File '{}' not found!", inputFile, ex);
108108
} catch (IOException ex) {
109-
LOGGER.error(ex);
109+
LOGGER.error(ex, ex);
110110
}
111111
// -------------------------------------------------
112112

@@ -133,7 +133,7 @@ public void run() {
133133
manager.setAuto(false);
134134
}
135135
} catch (IOException e) {
136-
LOGGER.error(e);
136+
LOGGER.error(e, e);
137137
}
138138
}
139139

@@ -178,7 +178,7 @@ public void run() {
178178
baseCaseObj =
179179
GenBaseCase.genBaseCase(manager, firstPart + currentDir, true, null);
180180
} catch (IOException e) {
181-
LOGGER.error(e);
181+
LOGGER.error(e, e);
182182
}
183183

184184
// end of dir fail case
@@ -278,7 +278,7 @@ public void run() {
278278
} catch (FileNotFoundException e) {
279279
LOGGER.error("File '{}' not found!", inputFile, e);
280280
} catch (IOException e) {
281-
LOGGER.error(e);
281+
LOGGER.error(e, e);
282282
}
283283
}
284284

@@ -308,7 +308,7 @@ public void run() {
308308
GenBaseCase.genBaseCase(
309309
manager, firstPart + currentDir, false, fileExtention);
310310
} catch (IOException e) {
311-
LOGGER.error(e);
311+
LOGGER.error(e, e);
312312
}
313313

314314
// if the manager has sent the stop command then exit
@@ -380,7 +380,7 @@ public void run() {
380380
} catch (FileNotFoundException e) {
381381
LOGGER.error("File '{}' not found!", inputFile, e);
382382
} catch (IOException e) {
383-
LOGGER.error(e);
383+
LOGGER.error(e, e);
384384
}
385385
}
386386
} // end of file ext loop

addOns/bruteforce/src/main/java/org/zaproxy/zap/extension/bruteforce/BruteForcePanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ protected void bruteForceDirectoryAndChildren(SiteNode node) {
676676
.getPath();
677677
startScan(dir, true);
678678
} catch (Exception e) {
679-
LOGGER.error(e);
679+
LOGGER.error(e, e);
680680
}
681681
}
682682
}

addOns/client/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010
### Changed
1111
- Updated Chrome and Firefox extensions to v0.1.4.
1212

13+
### Fixed
14+
- Error logs to always include stack trace.
1315

1416
## [0.16.0] - 2025-06-20
1517
### Added

addOns/client/src/main/java/org/zaproxy/addon/client/spider/ClientSpider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ private void notifyMessage(HttpMessage httpMessage, int historyType, ResourceSta
906906
messagesTableModel.addHistoryReference(historyRef, state);
907907
});
908908
} catch (HttpMalformedHeaderException | DatabaseException e) {
909-
LOGGER.error(e);
909+
LOGGER.error(e, e);
910910
}
911911
}
912912
}

0 commit comments

Comments
 (0)