Skip to content

Commit

Permalink
Remove dead code for no-longer-supported baselines (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored and kuisathaverat committed Jul 21, 2019
1 parent 643c5f2 commit 212eda0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
import hudson.plugins.sshslaves.SSHLauncher;
import hudson.slaves.ComputerLauncher;
import hudson.slaves.SlaveComputer;
import hudson.util.VersionNumber;
import jenkins.model.Jenkins;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;

/**
* An administrative warning that checks all SSH slaves have a {@link SshHostKeyVerificationStrategy}
Expand All @@ -59,19 +56,6 @@ public boolean isActivated() {
return false;
}

//TODO: This method can be removed when the baseline is updated to 2.103.
/**
* @return true if this version of the plugin is running on a Jenkins version where JENKINS-43786 is included.
*/
@Restricted(DoNotUse.class)
public boolean isTheNewDesignAvailable() {
final VersionNumber version = Jenkins.getVersion();
if (version != null && version.isNewerThan(new VersionNumber("2.103"))) {
return true;
}
return false;
}

@Override
public String getDisplayName() {
return Messages.MissingVerificationStrategyAdministrativeMonitor_DisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,8 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">

<j:if test="${!it.isTheNewDesignAvailable}">
<div class="warning">
<p>SSH Host Key Verifiers are not configured for all SSH slaves on this Jenkins instance. This could leave these slaves open to man-in-the-middle attacks. <a href="${rootURL}/computer/">Update your slave configuration</a> to resolve this.</p>
</div>
</j:if>

<j:if test="${it.isTheNewDesignAvailable}">
<div class="alert alert-warning">
SSH Host Key Verifiers are not configured for all SSH slaves on this Jenkins instance. This could leave these slaves open to man-in-the-middle attacks. <a href="${rootURL}/computer/">Update your slave configuration</a> to resolve this.
</div>
</j:if>

</j:jelly>

0 comments on commit 212eda0

Please sign in to comment.