-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9683 from mcalmer/issv3-fix-hostspot
sanitize the channel name
- Loading branch information
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -592,8 +592,9 @@ else if (!onlyChannels.contains(channel)) { | |
halt(HttpStatus.SC_BAD_REQUEST, "Token does not specify the organization"); | ||
} | ||
else if (!ChannelFactory.isAccessibleBy(channel, orgId)) { | ||
LOG.info("Forbidden: Token does not provide access to channel {}", channel); | ||
halt(HttpStatus.SC_FORBIDDEN, "Token does not provide access to channel %s".formatted(channel)); | ||
String sanitChannel = StringUtil.sanitizeLogInput(channel); | ||
Check notice Code scanning / SonarCloud Logging should not be vulnerable to injection attacks Low
Change this code to not log user-controlled data. See more on SonarQube Cloud
|
||
LOG.info("Forbidden: Token does not provide access to channel {}", sanitChannel); | ||
halt(HttpStatus.SC_FORBIDDEN, "Token does not provide access to channel %s".formatted(sanitChannel)); | ||
} | ||
} | ||
catch (TokenParsingException e) { | ||
|