[JBoss JIRA] (WFLY-9620) ServletContext.getResourceAsStream, for deployments which have (Java EE) servlet overlays, serves files which are outside of the deployment
by Yeray Borges (JIRA)
[ https://issues.jboss.org/browse/WFLY-9620?page=com.atlassian.jira.plugin.... ]
Yeray Borges updated WFLY-9620:
-------------------------------
Git Pull Request: https://github.com/wildfly/wildfly/pull/10748, https://github.com/wildfly/wildfly/pull/10784, https://github.com/wildfly/wildfly/pull/10815, https://github.com/wildfly/wildfly/pull/10898 (was: https://github.com/wildfly/wildfly/pull/10748, https://github.com/wildfly/wildfly/pull/10784, https://github.com/wildfly/wildfly/pull/10815, https://issues.jboss.org/browse/WFLY-9620)
> ServletContext.getResourceAsStream, for deployments which have (Java EE) servlet overlays, serves files which are outside of the deployment
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9620
> URL: https://issues.jboss.org/browse/WFLY-9620
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 9.0.2.Final, 10.1.0.Final, 11.0.0.Final
> Reporter: Laurent ROUSSEL
> Assignee: Yeray Borges
> Priority: Critical
> Fix For: 12.0.0.Beta1
>
>
> A user has reported in the forums that there appears to be an issue (since 9.0.x till present 11.0.0 WildFly releases) where files like `/etc/passwd` are served by the web container to the clients, when the client requests a crafted URL against a Java EE deployment which has (Java EE) servlet overlays. Please see the referenced forum thread[1] for more details.
> Although, the steps noted in that thread involves Spring framework and gets triggered in a very specific way, the root cause appears to be the call to `ServletContext.getResourceAsInputStream` (which is what the spring framework ends up calling with a path like "/../../../../../../../..//etc/passwd", ends up actually serving the resource even if the path is outside the scope of the deployment to which the servlet context belongs.
> I could reproduce this against the latest WildFly in a simple test case that's here [2]
> [1] https://developer.jboss.org/thread/276826
> [2] https://github.com/jaikiran/wildfly/commit/ed05258aa824ab91a52ef6554e9707...
> P.S: The credit for reporting this issue should go to Laurent Roussel who reported this in the forum thread, but I don't have access to change the "Reporter" field of the JIRA
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9620) ServletContext.getResourceAsStream, for deployments which have (Java EE) servlet overlays, serves files which are outside of the deployment
by Yeray Borges (JIRA)
[ https://issues.jboss.org/browse/WFLY-9620?page=com.atlassian.jira.plugin.... ]
Yeray Borges reopened WFLY-9620:
--------------------------------
Reopen a new PR was sent adding some changes in the test case to make it possible execute it in previous versions of Undertow.
> ServletContext.getResourceAsStream, for deployments which have (Java EE) servlet overlays, serves files which are outside of the deployment
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9620
> URL: https://issues.jboss.org/browse/WFLY-9620
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 9.0.2.Final, 10.1.0.Final, 11.0.0.Final
> Reporter: Laurent ROUSSEL
> Assignee: Yeray Borges
> Priority: Critical
> Fix For: 12.0.0.Beta1
>
>
> A user has reported in the forums that there appears to be an issue (since 9.0.x till present 11.0.0 WildFly releases) where files like `/etc/passwd` are served by the web container to the clients, when the client requests a crafted URL against a Java EE deployment which has (Java EE) servlet overlays. Please see the referenced forum thread[1] for more details.
> Although, the steps noted in that thread involves Spring framework and gets triggered in a very specific way, the root cause appears to be the call to `ServletContext.getResourceAsInputStream` (which is what the spring framework ends up calling with a path like "/../../../../../../../..//etc/passwd", ends up actually serving the resource even if the path is outside the scope of the deployment to which the servlet context belongs.
> I could reproduce this against the latest WildFly in a simple test case that's here [2]
> [1] https://developer.jboss.org/thread/276826
> [2] https://github.com/jaikiran/wildfly/commit/ed05258aa824ab91a52ef6554e9707...
> P.S: The credit for reporting this issue should go to Laurent Roussel who reported this in the forum thread, but I don't have access to change the "Reporter" field of the JIRA
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9620) ServletContext.getResourceAsStream, for deployments which have (Java EE) servlet overlays, serves files which are outside of the deployment
by Yeray Borges (JIRA)
[ https://issues.jboss.org/browse/WFLY-9620?page=com.atlassian.jira.plugin.... ]
Yeray Borges updated WFLY-9620:
-------------------------------
Git Pull Request: https://github.com/wildfly/wildfly/pull/10748, https://github.com/wildfly/wildfly/pull/10784, https://github.com/wildfly/wildfly/pull/10815, https://issues.jboss.org/browse/WFLY-9620 (was: https://github.com/wildfly/wildfly/pull/10748, https://github.com/wildfly/wildfly/pull/10784, https://github.com/wildfly/wildfly/pull/10815)
> ServletContext.getResourceAsStream, for deployments which have (Java EE) servlet overlays, serves files which are outside of the deployment
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9620
> URL: https://issues.jboss.org/browse/WFLY-9620
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 9.0.2.Final, 10.1.0.Final, 11.0.0.Final
> Reporter: Laurent ROUSSEL
> Assignee: Yeray Borges
> Priority: Critical
> Fix For: 12.0.0.Beta1
>
>
> A user has reported in the forums that there appears to be an issue (since 9.0.x till present 11.0.0 WildFly releases) where files like `/etc/passwd` are served by the web container to the clients, when the client requests a crafted URL against a Java EE deployment which has (Java EE) servlet overlays. Please see the referenced forum thread[1] for more details.
> Although, the steps noted in that thread involves Spring framework and gets triggered in a very specific way, the root cause appears to be the call to `ServletContext.getResourceAsInputStream` (which is what the spring framework ends up calling with a path like "/../../../../../../../..//etc/passwd", ends up actually serving the resource even if the path is outside the scope of the deployment to which the servlet context belongs.
> I could reproduce this against the latest WildFly in a simple test case that's here [2]
> [1] https://developer.jboss.org/thread/276826
> [2] https://github.com/jaikiran/wildfly/commit/ed05258aa824ab91a52ef6554e9707...
> P.S: The credit for reporting this issue should go to Laurent Roussel who reported this in the forum thread, but I don't have access to change the "Reporter" field of the JIRA
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9845) @Singleton @Startup classes inheriting from a class containing a @PostConstruct method will not create a transaction
by Christopher Czyba (JIRA)
Christopher Czyba created WFLY-9845:
---------------------------------------
Summary: @Singleton @Startup classes inheriting from a class containing a @PostConstruct method will not create a transaction
Key: WFLY-9845
URL: https://issues.jboss.org/browse/WFLY-9845
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 11.0.0.Final, 9.0.0.Final
Reporter: Christopher Czyba
Attachments: singleton-postconstruct-transaction.zip, standalone.log
During an update from wildfly 8.2.0.Final to 11.0.0.Final I have noticed the following issue:
Given an abstract base class B with an @PostConstruct annotated method and a derived class D with the annotations @Singleton and @Startup. When the @PostConstruct method is called, no transaction is started.
According to the [EJB 3.2 Specification|http://download.oracle.com/otn-pub/jcp/ejb-3_2-fr-eval-spec...] section 4.8.3, I would expect the container to start a new transaction, as the default transaction attribute is REQUIRED.
I have attached source for a war showcasing this issue. On deploying the resulting war on a new wildfly instance, the log should contain the following two lines:
{{14:13:06,410 INFO [stdout] (ServerService Thread Pool -- 20) Singleton Hierarchy: transaction status: 6
14:13:06,410 INFO [stdout] (ServerService Thread Pool -- 58) Singleton2 Standalone: transaction status: 0}}
A transaction status of 6 says that no transaction exists, while a transaction status of 0 implies that a transaction is ongoing. The war shows that this issue occurs only when using a class hierarchy. I expect the status 0 for both cases.
Through testing I noticed that this issue exists since wildfly 9.0.0.Final. I could not find a reason for this behavior from the list of issues for the 9-series release, however.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9821) SingletonProvider may be incorrectly initialized with RegistrySingletonProvider
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/WFLY-9821?page=com.atlassian.jira.plugin.... ]
Martin Kouba updated WFLY-9821:
-------------------------------
Fix Version/s: 12.0.0.CR1
> SingletonProvider may be incorrectly initialized with RegistrySingletonProvider
> -------------------------------------------------------------------------------
>
> Key: WFLY-9821
> URL: https://issues.jboss.org/browse/WFLY-9821
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 11.0.0.Final
> Reporter: Martin Kouba
> Assignee: Martin Kouba
> Fix For: 12.0.0.CR1
>
>
> If a non-CDI deployment (contains no beans.xml nor a bean with a bean defining annotation nor a session bean) attempts to access the CDI container using {{CDI.current()}} before {{TCCLSingletonService}} is started (and {{org.jboss.weld.bootstrap.api.SingletonProvider}} initialized with {{ModuleGroupSingletonProvider}}) then {{SingletonProvider}} is incorrectly initialized with the default impl ({{RegistrySingletonProvider}}). As a result,
> subsequent CDI deployments fail with {{java.lang.RuntimeException: SingletonProvider is already initialized...}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months