Skip to content

Commit

Permalink
JCR-4009: fix whitespace in log messages
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1761909 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
reschke committed Sep 22, 2016
1 parent 13532f6 commit 16f2f02
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public CSRFUtil(String config) {
} else {
disabled = false;
String[] allowed = config.split(",");
allowedReferrerHosts = new HashSet<String>(allowed.length);
allowedReferrerHosts = new HashSet<String>(allowed.length);
for (String entry : allowed) {
allowedReferrerHosts.add(entry.trim());
}
Expand Down Expand Up @@ -144,7 +144,7 @@ public boolean isValidRequest(HttpServletRequest request) {
// empty referrer headers are not allowed for POST + relevant
// content types (see JCR-3909)
if (refHeader == null) {
log.debug("POST with content type" + ct + " blocked due to missing referer header field");
log.debug("POST with content type " + ct + " blocked due to missing referer header field");
return false;
}

Expand All @@ -155,12 +155,12 @@ public boolean isValidRequest(HttpServletRequest request) {
// names
boolean ok = host == null || host.equals(request.getServerName()) || allowedReferrerHosts.contains(host);
if (!ok) {
log.debug("POST with content type" + ct + " blocked due to referer header field being: " + refHeader);
log.debug("POST with content type " + ct + " blocked due to referer header field being: " + refHeader);
}
return ok;
} catch (URISyntaxException ex) {
// referrer malformed -> block access
log.debug("POST with content type" + ct + " blocked due to malformed referer header field: " + refHeader);
log.debug("POST with content type " + ct + " blocked due to malformed referer header field: " + refHeader);
return false;
}
}
Expand Down

0 comments on commit 16f2f02

Please sign in to comment.