/hg/icedtea-web: ALACA is now able to remember decisions.
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Mon May 12 15:24:57 UTC 2014
changeset c3fb4b493d78 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c3fb4b493d78
author: Jiri Vanek <jvanek at redhat.com>
date: Mon May 12 17:24:34 2014 +0200
ALACA is now able to remember decisions.
diffstat:
ChangeLog | 59 +++
netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java | 26 +-
netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java | 119 ++++--
netx/net/sourceforge/jnlp/resources/Messages.properties | 8 +-
netx/net/sourceforge/jnlp/resources/Messages_cs.properties | 1 -
netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 6 +
netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java | 2 +-
netx/net/sourceforge/jnlp/security/SecurityDialog.java | 5 +-
netx/net/sourceforge/jnlp/security/SecurityDialogs.java | 45 ++-
netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java | 84 ++++-
netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java | 26 +-
netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionStorage.java | 12 +-
netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java | 63 ++-
netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java | 24 +-
netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java | 22 +-
netx/net/sourceforge/jnlp/security/dialogs/MatchingALACAttributePanel.java | 165 ----------
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java | 16 +-
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java | 14 +-
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/MatchingALACAttributePanel.java | 133 ++++++++
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java | 34 +-
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningDialog.java | 65 ---
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningPanel.java | 25 +-
tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java | 11 +
tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java | 51 +-
tests/netx/unit/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanelTest.java | 2 +-
25 files changed, 593 insertions(+), 425 deletions(-)
diffs (truncated from 1831 to 500 lines):
diff -r b19fe5f6a442 -r c3fb4b493d78 ChangeLog
--- a/ChangeLog Mon May 12 09:59:34 2014 -0400
+++ b/ChangeLog Mon May 12 17:24:34 2014 +0200
@@ -1,3 +1,62 @@
+2014-05-12 Jiri Vanek <jvanek at redhat.com>
+
+ ALACA is now able to remember decisions.
+ * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java:
+ moved columns in table. Inserted alaca between 0 and 1
+ * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java:
+ Added handling of UNSET, fixed calls to (now) getAppletSecurityActions.
+ Shifted columns
+ * netx/net/sourceforge/jnlp/resources/Messages.properties:
+ (SUnsignedAllowedBefore) and (SUnsignedRejectedBefore) now handles date
+ (SAppletTitle) removed, was legacy
+ (APPEXTSECguiTableModelTableColumnActionUA) and
+ (APPEXTSECguiTableModelTableColumnActionMatchALACA) added.
+ * netx/net/sourceforge/jnlp/resources/Messages_cs.properties:(SAppletTitle) removed, was legacy
+ * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Added (getLocalisedTimeStamp)
+ helper method.
+ * netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java:
+ Call to showMatchingALACAttributePanel dialogue now forwards whole file, not just title.
+ * netx/net/sourceforge/jnlp/security/SecurityDialog.java: First extras to
+ matchingAlaca retyped to JNLPFile
+ * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: MInor javadoc fixes.
+ (showMatchingALACAttributePanel) now have whole JNLP instead of just title.
+ Added handling of saved/saving value
+ * netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java:
+ made to recognize second record as alaca one.
+ * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java:
+ unsignedAppletAction changed to appletSecurityActions
+ * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionStorage.java:
+ Whole getMatchingItem family of methods get Integer id parameter, to recognize
+ which record is the one they care about. If id is null, then they return first
+ match, no meter of whether is "strong"(pernament) or week (just hint)
+ * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java:
+ adapted to id in interface. Fixed bug with saving the entry.
+ * netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java:
+ Added handling of multiple actions, added column.
+ * netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java:
+ implemented the id change.
+ * netx/net/sourceforge/jnlp/security/dialogs/MatchingALACAttributePanel.java:
+ removed to apptrustwarningpanel
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java:
+ made ALCA dialog aware
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java:
+ added generalized impl for title handling.
+ * /netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/MatchingALACAttributePanel.java:
+ new class, derived from dialogs, now extending AppTrustWarningPanel
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java:
+ removed custom handling of title. Added minSize. Added usage of stored date in text
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningDialog.java:
+ removed, should be removed long ago when this dialogue was generalized.
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningPanel.java:
+ removed custom handling of title. Added minSize. Added usage of stored date in text
+ * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java:
+ added test for iteration (testIterator)
+ * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java:
+ adapted for need of id of attribute
+ * tests/netx/unit/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanelTest.java:
+ Adapted to dialog in constructor of UnsignedAppletTrustWarningPanel
+
+
2014-05-09 Andrew Azores <aazores at redhat.com>
* tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java: new test
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java Mon May 12 17:24:34 2014 +0200
@@ -48,7 +48,8 @@
public class UnsignedAppletActionTableModel extends AbstractTableModel {
final UnsignedAppletActionStorageExtendedImpl back;
- private final String[] columns = new String[]{Translator.R("APPEXTSECguiTableModelTableColumnAction"),
+ private final String[] columns = new String[]{Translator.R("APPEXTSECguiTableModelTableColumnActionUA"),
+ Translator.R("APPEXTSECguiTableModelTableColumnActionMatchALACA"),
Translator.R("APPEXTSECguiTableModelTableColumnDateOfAction"),
Translator.R("APPEXTSECguiTableModelTableColumnDocumentBase"),
Translator.R("APPEXTSECguiTableModelTableColumnCodeBase"),
@@ -79,21 +80,21 @@
return AppletSecurityActions.class;
}
if (columnIndex == 1) {
- return Date.class;
+ return AppletSecurityActions.class;
}
if (columnIndex == 2) {
- return UrlRegEx.class;
+ return Date.class;
}
if (columnIndex == 3) {
return UrlRegEx.class;
}
if (columnIndex == 4) {
- return String.class;
+ return UrlRegEx.class;
}
if (columnIndex == 5) {
return String.class;
}
- return Object.class;
+ return Object.class;
}
@Override
@@ -101,7 +102,7 @@
if (back.isReadOnly()) {
return false;
}
- if (columnIndex == 1) {
+ if (columnIndex == 2) {
return false;
}
if (columnIndex == 0) {
@@ -118,18 +119,21 @@
UnsignedAppletActionEntry source = back.toArray()[rowIndex];
if (columnIndex == 0) {
- return source.getUnsignedAppletAction();
+ return source.getAppletSecurityActions().getUnsignedAppletAction();
}
if (columnIndex == 1) {
+ return source.getAppletSecurityActions().getMatchingAlacaAction();
+ }
+ if (columnIndex == 2) {
return source.getTimeStamp();
}
- if (columnIndex == 2) {
+ if (columnIndex == 3) {
return source.getDocumentBase();
}
- if (columnIndex == 3) {
+ if (columnIndex == 4) {
return source.getCodeBase();
}
- if (columnIndex == 4) {
+ if (columnIndex == 5) {
return UnsignedAppletActionEntry.createArchivesString(source.getArchives());
}
return null;
@@ -146,7 +150,7 @@
int i = getRowCount()-1;
String s = "\\Qhttp://localhost:80/\\E.*";
back.add(new UnsignedAppletActionEntry(
- AppletSecurityActions.fromAction(ExecuteAppletAction.NEVER),
+ AppletSecurityActions.createDefault(),
new Date(),
new UrlRegEx(s),
new UrlRegEx(s),
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java Mon May 12 17:24:34 2014 +0200
@@ -76,6 +76,7 @@
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityActions;
import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityLevel;
import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction;
import net.sourceforge.jnlp.security.appletextendedsecurity.ExtendedAppletSecurityHelp;
@@ -187,7 +188,7 @@
public static String appletItemToCaption(UnsignedAppletActionEntry i, String caption) {
return Translator.R("APPEXTSECguiPanelAppletInfoHederPart1", caption, i.getDocumentBase().getFilteredRegEx())
- + "\n (" + Translator.R("APPEXTSECguiPanelAppletInfoHederPart2", i.getUnsignedAppletAction(), DateFormat.getInstance().format(i.getTimeStamp()))
+ + "\n (" + Translator.R("APPEXTSECguiPanelAppletInfoHederPart2", i.getAppletSecurityActions().toString(), DateFormat.getInstance().format(i.getTimeStamp()))
+ "\n " + Translator.R("APPEXTSECguiTableModelTableColumnDocumentBase") + ": " + i.getDocumentBase().getFilteredRegEx()
+ "\n " + Translator.R("APPEXTSECguiTableModelTableColumnCodeBase") + ": " + i.getCodeBase().getFilteredRegEx()
+ "\n " + Translator.R("APPEXTSECguiTableModelTableColumnArchives") + ": " + UnsignedAppletActionEntry.createArchivesString(i.getArchives());
@@ -702,19 +703,20 @@
@Override
public TableCellEditor getCellEditor(int row, int column) {
int columnx = convertColumnIndexToModel(column);
- if (columnx == 0) {
+ if (columnx == 0 || columnx == 1) {
return new DefaultCellEditor(new JComboBox<>(new ExecuteAppletAction[] {
ExecuteAppletAction.ALWAYS,
ExecuteAppletAction.NEVER,
ExecuteAppletAction.YES,
- ExecuteAppletAction.NO }));
+ ExecuteAppletAction.NO,
+ ExecuteAppletAction.UNSET }));
}
- if (columnx == 2) {
+ if (columnx == 3) {
column = convertColumnIndexToModel(column);
row = convertRowIndexToModel(row);
return new DefaultCellEditor(new MyTextField((UrlRegEx) (model.getValueAt(row, column))));
}
- if (columnx == 3) {
+ if (columnx == 4) {
column = convertColumnIndexToModel(column);
row = convertRowIndexToModel(row);
return new DefaultCellEditor(new MyTextField((UrlRegEx) (model.getValueAt(row, column))));
@@ -725,19 +727,19 @@
@Override
public TableCellRenderer getCellRenderer(int row, int column) {
int columnx = convertColumnIndexToModel(column);
- if (columnx == 1) {
+ if (columnx == 2) {
column = convertColumnIndexToModel(column);
row = convertRowIndexToModel(row);
return new UrlRegexCellRenderer.MyDateCellRenderer((Date) (model.getValueAt(row, column)));
}
- if (columnx == 2) {
+ if (columnx == 3) {
if (!filterRegexesCheckBox.isSelected()) {
column = convertColumnIndexToModel(column);
row = convertRowIndexToModel(row);
return new UrlRegexCellRenderer((UrlRegEx) (model.getValueAt(row, column)));
}
}
- if (columnx == 3) {
+ if (columnx == 4) {
if (!filterRegexesCheckBox.isSelected()) {
column = convertColumnIndexToModel(column);
row = convertRowIndexToModel(row);
@@ -768,16 +770,18 @@
UnsignedAppletActionEntry[] items = currentModel.back.toArray();
if (askBeforeActionCheckBox.isSelected()) {
List<UnsignedAppletActionEntry> toBeDeleted = new ArrayList<>();
- for (int i = 0; i < items.length; i++) {
- UnsignedAppletActionEntry unsignedAppletActionEntry = items[i];
- if (unsignedAppletActionEntry.getUnsignedAppletAction() == unsignedAppletAction) {
- toBeDeleted.add(unsignedAppletActionEntry);
+ for (UnsignedAppletActionEntry unsignedAppletActionEntry : items) {
+ AppletSecurityActions actions = unsignedAppletActionEntry.getAppletSecurityActions();
+ for (int j = 0; j < actions.getRealCount(); j++) {
+ ExecuteAppletAction action = actions.getAction(j);
+ if (action == unsignedAppletAction) {
+ toBeDeleted.add(unsignedAppletActionEntry);
+ }
}
-
}
String s = Translator.R("APPEXTSECguiPanelConfirmDeletionOf", toBeDeleted.size()) + ": \n";
- for (int i = 0; i < toBeDeleted.size(); i++) {
- s += appletItemToCaption(toBeDeleted.get(i), " ") + "\n";
+ for (UnsignedAppletActionEntry toBeDeleted1 : toBeDeleted) {
+ s += appletItemToCaption(toBeDeleted1, " ") + "\n";
}
int a = JOptionPane.showConfirmDialog(this, s);
if (a != JOptionPane.OK_OPTION) {
@@ -892,10 +896,10 @@
}
}
- private abstract static class MyCommonSorter extends RowFilter<UnsignedAppletActionTableModel, Integer> {
-
-
+ private abstract static class MyCommonSorter extends RowFilter<UnsignedAppletActionTableModel, Integer> {
+
}
+
private static final class ByPermanencyFilter extends TableRowSorter<UnsignedAppletActionTableModel> {
private static final class ShowAll extends MyCommonSorter {
@@ -910,56 +914,87 @@
@Override
public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
- ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0);
- return (o.equals(ExecuteAppletAction.ALWAYS) || o.equals(ExecuteAppletAction.NEVER));
+ for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) {
+ ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i);
+ if (o.equals(ExecuteAppletAction.ALWAYS) || o.equals(ExecuteAppletAction.NEVER)) {
+ return true;
+ }
+ }
+ return false;
}
}
private static final class ShowPermanentA extends MyCommonSorter {
+
@Override
public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
- ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0);
- return (o.equals(ExecuteAppletAction.ALWAYS));
+ for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) {
+ ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i);
+ if (o.equals(ExecuteAppletAction.ALWAYS)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ }
+
+ private static final class ShowPermanentN extends MyCommonSorter {
+
+ @Override
+ public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
+ for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) {
+ ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i);
+ if (o.equals(ExecuteAppletAction.NEVER)) {
+ return true;
+ }
+ }
+ return false;
}
}
- private static final class ShowPermanentN extends MyCommonSorter {
+ private static final class ShowTemporarilyDecisions extends MyCommonSorter {
@Override
public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
- ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0);
- return (o.equals(ExecuteAppletAction.NEVER));
+ for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) {
+ ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i);
+ if (o.equals(ExecuteAppletAction.YES) || o.equals(ExecuteAppletAction.NO)) {
+ return true;
+ }
+ }
+ return false;
}
}
- private static final class ShowTemporarilyDecisions extends MyCommonSorter {
+ private static final class ShowHasChosenYes extends MyCommonSorter {
@Override
public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
- ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0);
- return (o.equals(ExecuteAppletAction.YES) || o.equals(ExecuteAppletAction.NO));
+ for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) {
+ ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i);
+ if (o.equals(ExecuteAppletAction.YES)) {
+ return true;
+ }
+ }
+ return false;
}
+
}
- private static final class ShowHasChosenYes extends MyCommonSorter {
+ private static final class ShowHasChosenNo extends MyCommonSorter {
@Override
public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
- ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0);
- return (o.equals(ExecuteAppletAction.YES));
+ for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) {
+ ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i);
+ if (o.equals(ExecuteAppletAction.NO)) {
+ return true;
+ }
+ }
+ return false;
}
-
-
- }
- private static final class ShowHasChosenNo extends MyCommonSorter {
-
- @Override
- public boolean include(Entry<? extends UnsignedAppletActionTableModel, ? extends Integer> entry) {
- ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0);
- return (o.equals(ExecuteAppletAction.NO));
- }
-
}
public static final ShowAll showAll = new ShowAll();
public static final ShowPermanents showPermanents = new ShowPermanents();
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 12 17:24:34 2014 +0200
@@ -293,15 +293,14 @@
SRememberCodebase=For site <u>{0}</u>
SUnsignedSummary=An unsigned Java application wants to run
SUnsignedDetail=An unsigned application from the following location wants to run:<br/> <u><a href="{0}" >{0}</a></u><br/>The page which made the request was:<br/> <u><a href="{1}" >{1}</a></u><br/><br/><b>It is recommended you only run applications from sites you trust.</b>
-SUnsignedAllowedBefore=<font color="green">You have accepted this applet previously.</font>
-SUnsignedRejectedBefore=<font color="red">You have rejected this applet previously.</font>
+SUnsignedAllowedBefore=<font color="green">You have accepted this applet previously - ({0}).</font>
+SUnsignedRejectedBefore=<font color="red">You have rejected this applet previously - ({0}).</font>
SUnsignedQuestion=Allow the applet to run?
SPartiallySignedSummary=Only parts of this application code are signed.
SPartiallySignedDetail=This application contains both signed and unsigned code. While signed code is safe if you trust the provider, unsigned code may imply code outside of the trusted provider's control.
SPartiallySignedQuestion=Do you wish to proceed and run this application anyway?
SAuthenticationPrompt=The {0} server at {1} is requesting authentication. It says "{2}"
SJNLPFileIsNotSigned=This application contains a digital signature in which the launching JNLP file is not signed.
-SAppletTitle=Applet title: {0}
STrustedOnlyAttributeFailure=This application specifies Trusted-only as True in its Manifest. {0} and requests permission level: {1}. This is not allowed.
STOAsignedMsgFully = The applet is fully signed
STOAsignedMsgAndSandbox = The applet is fully signed and sandboxed
@@ -820,7 +819,8 @@
APPEXTSECunsignedAppletActionNo=This applet was visited and denied
APPEXTSECunsetAppletAction=This applet has not yet asked for this action
APPEXTSECControlPanelExtendedAppletSecurityTitle=Extended applet security
-APPEXTSECguiTableModelTableColumnAction=Action
+APPEXTSECguiTableModelTableColumnActionUA=Unsigned applet Action
+APPEXTSECguiTableModelTableColumnActionMatchALACA=Library Action
APPEXTSECguiTableModelTableColumnDateOfAction=Date of action
APPEXTSECguiTableModelTableColumnDocumentBase=Document-base
APPEXTSECguiTableModelTableColumnCodeBase=Code-base
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/resources/Messages_cs.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages_cs.properties Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/resources/Messages_cs.properties Mon May 12 17:24:34 2014 +0200
@@ -297,7 +297,6 @@
SPartiallySignedQuestion=Chcete p\u0159esto pokra\u010dovat a spustit aplikaci?
SAuthenticationPrompt=Server {0} na adrese {1} vy\u017eaduje ov\u011b\u0159en\u00ed. Zpr\u00e1va: \u201e{2}\u201c
SJNLPFileIsNotSigned=Tato aplikace obsahuje digit\u00e1ln\u00ed podpis, v r\u00e1mci kter\u00e9ho v\u0161ak nen\u00ed podeps\u00e1n spou\u0161t\u011bn\u00fd soubor JNLP.
-SAppletTitle=N\u00e1zev apletu: {0}
STrustedOnlyAttributeFailure=Element \u201etrusted-only\u201c v manifestu aplikace m\u00e1 hodnotu true. {0} a po\u017eaduje n\u00e1sleduj\u00edc\u00ed \u00farove\u0148 opr\u00e1vn\u011bn\u00ed: {1}. To nen\u00ed dovoleno.
STOAsignedMsgFully= Aplet je kompletn\u011b podeps\u00e1n.
STOAsignedMsgAndSandbox= Aplet je kompletn\u011b podeps\u00e1n a b\u011b\u017e\u00ed v izolovan\u00e9m prostoru (sandbox).
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 12 17:24:34 2014 +0200
@@ -31,7 +31,9 @@
import java.security.KeyStore;
import java.security.Policy;
import java.security.Security;
+import java.text.DateFormat;
import java.text.MessageFormat;
+import java.util.Date;
import java.util.List;
import java.util.ResourceBundle;
@@ -638,6 +640,10 @@
return "Missing resource: " + key;
}
}
+
+ public static String getLocalisedTimeStamp(Date timestamp) {
+ return DateFormat.getInstance().format(timestamp);
+ }
/**
* Returns the localized resource string using the specified arguments.
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java
--- a/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Mon May 12 17:24:34 2014 +0200
@@ -325,7 +325,7 @@
}
}
}
- boolean a = SecurityDialogs.showMatchingALACAttributePanel(file.getTitle(), documentBase, usedUrls);
+ boolean a = SecurityDialogs.showMatchingALACAttributePanel(file, documentBase, usedUrls);
if (!a) {
throw new LaunchException("The application uses non-codebase resources, which do match its Application-Library-Allowable-Codebase Attribute, but was blocked from running by the user.");
} else {
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/security/SecurityDialog.java
--- a/netx/net/sourceforge/jnlp/security/SecurityDialog.java Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialog.java Mon May 12 17:24:34 2014 +0200
@@ -55,7 +55,7 @@
import net.sourceforge.jnlp.security.dialogs.AppletWarningPane;
import net.sourceforge.jnlp.security.dialogs.CertWarningPane;
import net.sourceforge.jnlp.security.dialogs.CertsInfoPane;
-import net.sourceforge.jnlp.security.dialogs.MatchingALACAttributePanel;
+import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.MatchingALACAttributePanel;
import net.sourceforge.jnlp.security.dialogs.MissingALACAttributePanel;
import net.sourceforge.jnlp.security.dialogs.MissingPermissionsAttributePanel;
import net.sourceforge.jnlp.security.dialogs.MoreInfoPane;
@@ -63,6 +63,7 @@
import net.sourceforge.jnlp.security.dialogs.SecurityDialogPanel;
import net.sourceforge.jnlp.security.dialogs.SingleCertInfoPane;
import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningDialog;
+import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel;
import net.sourceforge.jnlp.util.ImageResources;
import net.sourceforge.jnlp.util.ScreenFinder;
import net.sourceforge.jnlp.util.logging.OutputController;
@@ -325,7 +326,7 @@
else if (dialogType == DialogType.MISSING_ALACA)
panel = new MissingALACAttributePanel(this, (String) extras[0], (String) extras[1], (String) extras[2]);
else if (dialogType == DialogType.MATCHING_ALACA)
- panel = new MatchingALACAttributePanel(this, (String) extras[0], (String) extras[1], (String) extras[2]);
+ panel = AppTrustWarningDialog.matchingAlaca(this, (JNLPFile) extras[0], (String) extras[1], (String) extras[2]);
add(panel, BorderLayout.CENTER);
}
diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/security/SecurityDialogs.java
--- a/netx/net/sourceforge/jnlp/security/SecurityDialogs.java Mon May 12 09:59:34 2014 -0400
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogs.java Mon May 12 17:24:34 2014 +0200
@@ -54,9 +54,13 @@
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.JNLPClassLoader.SecurityDelegate;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
+import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityActions;
import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction;
+import net.sourceforge.jnlp.security.appletextendedsecurity.UnsignedAppletTrustConfirmation;
+import static net.sourceforge.jnlp.security.appletextendedsecurity.UnsignedAppletTrustConfirmation.getStoredAction;
import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel.AppSigningWarningAction;
import net.sourceforge.jnlp.util.UrlUtils;
+import net.sourceforge.jnlp.util.logging.OutputController;
/**
* <p>
@@ -167,6 +171,7 @@
* Shows a warning dialog for when a plugin applet is unsigned.
* This is used with 'high-security' setting.
*
+ * @param file the file to be base as information source for this dialogue
* @return true if permission was granted by the user, false otherwise.
*/
More information about the distro-pkg-dev
mailing list