Skip to content

Commit

Permalink
Merge pull request #1831 from jenkinsci/1.55.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen authored Jan 18, 2022
2 parents 0a35be1 + 6bf8bf9 commit b4622e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import hudson.security.ACL;
import hudson.security.ACLContext;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import org.kohsuke.stapler.StaplerRequest;
Expand Down Expand Up @@ -48,7 +50,8 @@ public void doIndex(StaplerRequest request, StaplerResponse response) throws IOE
} else {
String requestToken = getRequestToken(request);

if (token.equals(requestToken)) {
if (requestToken != null && MessageDigest.isEqual(token.getBytes(StandardCharsets.UTF_8), requestToken.getBytes(
StandardCharsets.UTF_8))) {
LOGGER.info("Configuration reload triggered via token");

try (ACLContext ignored = ACL.as(ACL.SYSTEM)) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</modules>

<properties>
<revision>1.56</revision>
<revision>1.55.2</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.249.1</jenkins.version>
<java.level>8</java.level>
Expand Down

0 comments on commit b4622e2

Please sign in to comment.