Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-09-25 06:02:21 -0400
committerEike Stepper2013-09-26 05:55:44 -0400
commit8c0eef51dcd32ed54494d20eb57d3037c4126ba7 (patch)
tree79523c54468863be7bcabcc688fcc39348b9b506
parent6c239fef9c274d41fc88338c682aa01fa47dba7d (diff)
downloadcdo-8c0eef51dcd32ed54494d20eb57d3037c4126ba7.tar.gz
cdo-8c0eef51dcd32ed54494d20eb57d3037c4126ba7.tar.xz
cdo-8c0eef51dcd32ed54494d20eb57d3037c4126ba7.zip
[417483] [Security] Issues in invalidation when missing write Permission
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417483
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java3
3 files changed, 14 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
index 97477871b8..9e792bac32 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
@@ -28,7 +28,7 @@ public interface CDOProtocolConstants
/**
* @since 4.2
*/
- public static final int PROTOCOL_VERSION = 14;
+ public static final int PROTOCOL_VERSION = 15;
// //////////////////////////////////////////////////////////////////////
// Signal IDs
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionImpl.java
index 05ce1f2a81..1e61b49dda 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionImpl.java
@@ -85,12 +85,20 @@ public class CDORevisionImpl extends BaseCDORevision
@Override
protected Object doGetValue(int featureIndex)
{
- return values[featureIndex];
+ if (values != null) // Can be null if READ permission is missing
+ {
+ return values[featureIndex];
+ }
+
+ return null;
}
@Override
protected void doSetValue(int featureIndex, Object value)
{
- values[featureIndex] = value;
+ if (values != null) // Can be null if READ permission is missing
+ {
+ values[featureIndex] = value;
+ }
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java
index 369e556133..7ccdf01477 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java
@@ -467,6 +467,7 @@ public abstract class CDOLegacyWrapper extends CDOObjectWrapper
registerWrapper(this);
counter.increment();
viewAndState.view.registerObject(this);
+ revision.bypassPermissionChecks(true);
revisionToInstanceResource();
revisionToInstanceContainer();
@@ -495,6 +496,8 @@ public abstract class CDOLegacyWrapper extends CDOObjectWrapper
}
finally
{
+ revision.bypassPermissionChecks(false);
+
if (resource != null)
{
resource.cdoInternalLoadingDone(instance);

Back to the top