[JBoss JIRA] Created: (SECURITY-206) Attribute type not set in constructor
by Kevin Carlin (JIRA)
Attribute type not set in constructor
-------------------------------------
Key: SECURITY-206
URL: http://jira.jboss.com/jira/browse/SECURITY-206
Project: JBoss Security and Identity Management
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JBossXACML
Affects Versions: 2.0.2.GA
Environment: JBoss-5.0.0.Beta4 (Windows XP, Solaris 10, Mac OS X 10.5.2)
Reporter: Kevin Carlin
Assigned To: Anil Saldhana
Priority: Minor
Fix For: 2.0.2.GA
The constructor public Attribute(URI id, String issuer, DateTimeAttribute issueInstant, AttributeValue value) fails to set the attribute's type. Test case and patch below:
JUnit test case.
/**
*
*/
package test.attributefinder;
import static org.junit.Assert.*;
import java.net.URI;
import java.net.URISyntaxException;
import org.jboss.security.xacml.sunxacml.attr.DateTimeAttribute;
import org.jboss.security.xacml.sunxacml.attr.StringAttribute;
import org.jboss.security.xacml.sunxacml.ctx.Attribute;
import org.junit.Test;
/**
* @author kevincarlin
*
*/
public class AttributeTest {
/**
* Test method for {@link org.jboss.security.xacml.sunxacml.ctx.Attribute#Attribute(java.net.URI, java.lang.String, org.jboss.security.xacml.sunxacml.attr.DateTimeAttribute, org.jboss.security.xacml.sunxacml.attr.AttributeValue)}.
* @throws Throwable
*/
@Test
public void testAttributeURIStringDateTimeAttributeAttributeValue() throws Throwable {
Attribute attribute = new Attribute(new URI("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
"com.enterra.dnipilot",
new DateTimeAttribute(),
new StringAttribute("Test"));
assertNotNull("Attribute type must be set in the constructor", attribute.getType());
}
}
Patch:
Index: security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/ctx/Attribute.java
===================================================================
--- . (revision 72241)
+++ . (working copy)
@@ -99,6 +99,7 @@
if(this.attributeValues == null)
this.attributeValues = new HashSet<AttributeValue>();
this.attributeValues.add(value);
+ this.type = value.getType();
}
public Attribute(URI id, URI type, String issuer, DateTimeAttribute issueInstant,
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 9 months
[JBoss JIRA] Created: (JBPORTAL-1302) supported-window-states ignored ? no limitation to normal window only.
by Antoine Herzog (JIRA)
supported-window-states ignored ? no limitation to normal window only.
----------------------------------------------------------------------
Key: JBPORTAL-1302
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1302
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal Core
Affects Versions: 2.4.1 Final
Environment: portal 2.4.1
Reporter: Antoine Herzog
Assigned To: Julien Viet
In the -object.xml file, remove all window-state elements, but the normal one.
<supported-window-states>
<window-state>normal</window-state>
<!--
<window-state>minimized</window-state>
<window-state>maximized</window-state>
-->
</supported-window-states>
It does not change anything
The min/max icons are still displayed. .
And you can still ask for the maximized or minimized state.
no exception, the portal still works as usual (with the "classic" all three states enabled).
Is it the portal core that should prevent to use these states, if not enabled ?
Or the layout strategy and rendering that should not show the icons ?
(but then, the portal should warn if we type an url that ask a state that is disabled... even it is not by clicking in the window icon).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 9 months