From f72bcaca0dd14312092a0bcbdd8e4792d6e56d44 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 14 Dec 2016 17:45:35 -0500 Subject: [PATCH] [SECURITY-382] Sign console notes with a MAC. --- .../main/java/hudson/console/ConsoleNote.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/src/main/java/hudson/console/ConsoleNote.java b/core/src/main/java/hudson/console/ConsoleNote.java index c27fec6364..3e8767ad22 100644 --- a/core/src/main/java/hudson/console/ConsoleNote.java +++ b/core/src/main/java/hudson/console/ConsoleNote.java @@ -51,6 +51,7 @@ import java.util.Collection; import java.util.List; import com.jcraft.jzlib.GZIPInputStream; import com.jcraft.jzlib.GZIPOutputStream; +import jenkins.security.HMACConfidentialKey; /** * Data that hangs off from a console output. @@ -121,6 +122,9 @@ import com.jcraft.jzlib.GZIPOutputStream; * @since 1.349 */ public abstract class ConsoleNote implements Serializable, Describable>, ExtensionPoint { + + private static final HMACConfidentialKey MAC = new HMACConfidentialKey(ConsoleNote.class, "MAC"); + /** * When the line of a console output that this annotation is attached is read by someone, * a new {@link ConsoleNote} is de-serialized and this method is invoked to annotate that line. @@ -182,6 +186,9 @@ public abstract class ConsoleNote implements Serializable, Describable implements Serializable, Describable