check for mismatched versions
This commit is contained in:
@ -209,6 +209,8 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String sudVersion = TrustedUpdate.getVersionString(f);
|
||||
f.delete();
|
||||
|
||||
String appName = props.getProperty("name");
|
||||
@ -219,6 +221,11 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
updateStatus("<b>" + _("Plugin from {0} has invalid name or version", url) + "</b>");
|
||||
return;
|
||||
}
|
||||
if (!version.equals(sudVersion)) {
|
||||
to.delete();
|
||||
updateStatus("<b>" + _("Plugin {0} has mismatched versions", appName) + "</b>");
|
||||
return;
|
||||
}
|
||||
|
||||
// todo compare sud version with property version
|
||||
|
||||
@ -242,7 +249,7 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
if (destDir.exists()) {
|
||||
if (Boolean.valueOf(props.getProperty("install-only")).booleanValue()) {
|
||||
to.delete();
|
||||
updateStatus("<b>" + _("Downloaded plugin is not for upgrading but the plugin is already installed", url) + "</b>");
|
||||
updateStatus("<b>" + _("Downloaded plugin is for new installs only, but the plugin is already installed", url) + "</b>");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ button span.hide{
|
||||
</p><hr><div class="formaction">
|
||||
<input type="submit" name="action" value="<%=intl._("Save WebApp Configuration")%>" />
|
||||
</div></div><h3><a name="webapp"></a><%=intl._("Plugin Configuration")%></h3><p>
|
||||
<%=intl._("The plugins listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console.")%>
|
||||
<%=intl._("The plugins listed below are started by the webConsole client.")%>
|
||||
</p><div class="wideload"><p>
|
||||
<jsp:getProperty name="clientshelper" property="form3" />
|
||||
</p><hr><div class="formaction">
|
||||
|
Reference in New Issue
Block a user