[JBoss JIRA] (WFCORE-4474) Missing path validation of a log file while update path
by Vratislav Marek (Jira)
[ https://issues.jboss.org/browse/WFCORE-4474?page=com.atlassian.jira.plugi... ]
Vratislav Marek commented on WFCORE-4474:
-----------------------------------------
[~jamezp] Before I set an absolute path, the validator correctly rejects the invalid paths with one backslash and slash (C:\server.log, C:/server.log).
The absolute path with illegal separator It was evaluated as a file name with illegal character.
But in case I was set the correct absolute path (C:\\server.log) and try to reconfigure it.
Then was be accept path with missing or invalid separator.
> Missing path validation of a log file while update path
> --------------------------------------------------------
>
> Key: WFCORE-4474
> URL: https://issues.jboss.org/browse/WFCORE-4474
> Project: WildFly Core
> Issue Type: Bug
> Components: Logging
> Affects Versions: 9.0.0.Beta4
> Reporter: Vratislav Marek
> Assignee: James Perkins
> Priority: Major
>
> After the first successful set of a valid path, you can set an invalid path.
> It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
> Discovered on Windows.
> A code block is divided, but it is holding sequence to reproduce.
> _This works as expected._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
> "rolled-back" => true
> }
> {code}
> _Still works as expected. But After this successful write-attribute command, it that changing._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> *Now there is a problem, it that not works as expected. The validator accepts invalid path.*
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> {code}
> _But not accept all invalid paths._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> *> at index 2: C:*server.log",
> "rolled-back" => true
> }
> {code}
> _Verification if the unsuccessful update changes something. But not._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> _Verification if is really set in the property value. Yes_
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:\\server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:/server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFCORE-4474) Missing path validation of a log file while update path
by Vratislav Marek (Jira)
[ https://issues.jboss.org/browse/WFCORE-4474?page=com.atlassian.jira.plugi... ]
Vratislav Marek updated WFCORE-4474:
------------------------------------
Description:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
_This works as expected._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
_Still works as expected. But After this successful write-attribute command, it that changing._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
*Now there is a problem, it that not works as expected. The validator accepts invalid path.*
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
{code}
_But not accept all invalid paths._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
{code}
_Verification if the unsuccessful update changes something. But not._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
_Verification if is really set in the property value. Yes_
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
was:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
_This works as expected._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
_Still works as expected. But After this successful write-attribute command, it that changing. _
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
*Now there is a problem, it that not works as expected. The validator accepts invalid path.*
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
{code}
_But not accept all invalid paths._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
{code}
_Verification if the unsuccessful update changes something. But not._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
_Verification if is really set in the property value. Yes_
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
> Missing path validation of a log file while update path
> --------------------------------------------------------
>
> Key: WFCORE-4474
> URL: https://issues.jboss.org/browse/WFCORE-4474
> Project: WildFly Core
> Issue Type: Bug
> Components: Logging
> Affects Versions: 9.0.0.Beta4
> Reporter: Vratislav Marek
> Assignee: James Perkins
> Priority: Major
>
> After the first successful set of a valid path, you can set an invalid path.
> It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
> Discovered on Windows.
> A code block is divided, but it is holding sequence to reproduce.
> _This works as expected._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
> "rolled-back" => true
> }
> {code}
> _Still works as expected. But After this successful write-attribute command, it that changing._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> *Now there is a problem, it that not works as expected. The validator accepts invalid path.*
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> {code}
> _But not accept all invalid paths._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> *> at index 2: C:*server.log",
> "rolled-back" => true
> }
> {code}
> _Verification if the unsuccessful update changes something. But not._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> _Verification if is really set in the property value. Yes_
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:\\server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:/server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFCORE-4474) Missing path validation of a log file while update path
by Vratislav Marek (Jira)
[ https://issues.jboss.org/browse/WFCORE-4474?page=com.atlassian.jira.plugi... ]
Vratislav Marek commented on WFCORE-4474:
-----------------------------------------
I decided to divide the example in the description with comments about what it is a problem.
But it is holding sequence to reproduce
> Missing path validation of a log file while update path
> --------------------------------------------------------
>
> Key: WFCORE-4474
> URL: https://issues.jboss.org/browse/WFCORE-4474
> Project: WildFly Core
> Issue Type: Bug
> Components: Logging
> Affects Versions: 9.0.0.Beta4
> Reporter: Vratislav Marek
> Assignee: James Perkins
> Priority: Major
>
> After the first successful set of a valid path, you can set an invalid path.
> It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
> Discovered on Windows.
> A code block is divided, but it is holding sequence to reproduce.
> _This works as expected._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
> "rolled-back" => true
> }
> {code}
> _Still works as expected. But After this successful write-attribute command, it that changing. _
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> *Now there is a problem, it that not works as expected. The validator accepts invalid path.*
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> {code}
> _But not accept all invalid paths._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> *> at index 2: C:*server.log",
> "rolled-back" => true
> }
> {code}
> _Verification if the unsuccessful update changes something. But not._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> _Verification if is really set in the property value. Yes_
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:\\server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:/server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFCORE-4474) Missing path validation of a log file while update path
by Vratislav Marek (Jira)
[ https://issues.jboss.org/browse/WFCORE-4474?page=com.atlassian.jira.plugi... ]
Vratislav Marek updated WFCORE-4474:
------------------------------------
Description:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
_This works as expected._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
_Still works as expected. But After this successful write-attribute command, it that changing. _
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
*Now there is a problem, it that not works as expected. The validator accepts invalid path.*
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
{code}
_But not accept all invalid paths._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
{code}
_Verification if the unsuccessful update changes something. But not._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
_Verification if is really set in the property value. Yes_
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
was:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
_This works as expected._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
_Still works as expected. But After this successful write-attribute command, it that changing. _
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
*Now there is a problem, it that not works as expected. The validator accepts invalid path.*
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
{code}
_But not accept all invalid paths._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
{code}
Verification if
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
> Missing path validation of a log file while update path
> --------------------------------------------------------
>
> Key: WFCORE-4474
> URL: https://issues.jboss.org/browse/WFCORE-4474
> Project: WildFly Core
> Issue Type: Bug
> Components: Logging
> Affects Versions: 9.0.0.Beta4
> Reporter: Vratislav Marek
> Assignee: James Perkins
> Priority: Major
>
> After the first successful set of a valid path, you can set an invalid path.
> It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
> Discovered on Windows.
> A code block is divided, but it is holding sequence to reproduce.
> _This works as expected._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
> "rolled-back" => true
> }
> {code}
> _Still works as expected. But After this successful write-attribute command, it that changing. _
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> *Now there is a problem, it that not works as expected. The validator accepts invalid path.*
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> {code}
> _But not accept all invalid paths._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> *> at index 2: C:*server.log",
> "rolled-back" => true
> }
> {code}
> _Verification if the unsuccessful update changes something. But not._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> _Verification if is really set in the property value. Yes_
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:\\server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:/server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFCORE-4474) Missing path validation of a log file while update path
by Vratislav Marek (Jira)
[ https://issues.jboss.org/browse/WFCORE-4474?page=com.atlassian.jira.plugi... ]
Vratislav Marek updated WFCORE-4474:
------------------------------------
Description:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
_This works as expected._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
_Still works as expected. But After this successful write-attribute command, it that changing. _
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
{code}
*Now there is a problem, it that not works as expected. The validator accepts invalid path.*
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
{code}
_But not accept all invalid paths._
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
{code}
Verification if
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
was:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
This works as expected.
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
> Missing path validation of a log file while update path
> --------------------------------------------------------
>
> Key: WFCORE-4474
> URL: https://issues.jboss.org/browse/WFCORE-4474
> Project: WildFly Core
> Issue Type: Bug
> Components: Logging
> Affects Versions: 9.0.0.Beta4
> Reporter: Vratislav Marek
> Assignee: James Perkins
> Priority: Major
>
> After the first successful set of a valid path, you can set an invalid path.
> It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
> Discovered on Windows.
> A code block is divided, but it is holding sequence to reproduce.
> _This works as expected._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
> "rolled-back" => true
> }
> {code}
> _Still works as expected. But After this successful write-attribute command, it that changing. _
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> {code}
> *Now there is a problem, it that not works as expected. The validator accepts invalid path.*
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> {code}
> _But not accept all invalid paths._
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> *> at index 2: C:*server.log",
> "rolled-back" => true
> }
> {code}
> Verification if
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:\\server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:/server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFCORE-4474) Missing path validation of a log file while update path
by Vratislav Marek (Jira)
[ https://issues.jboss.org/browse/WFCORE-4474?page=com.atlassian.jira.plugi... ]
Vratislav Marek updated WFCORE-4474:
------------------------------------
Description:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
A code block is divided, but it is holding sequence to reproduce.
This works as expected.
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
{code}
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
was:
After the first successful set of a valid path, you can set an invalid path.
It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
Discovered on Windows.
{code:bash}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
:> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
*> at index 2: C:*server.log",
"rolled-back" => true
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:\\server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:/server.log"}
}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
{"outcome" => "success"}
[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
{
"outcome" => "success",
"result" => {"path" => "C:server.log"}
}
{code}
> Missing path validation of a log file while update path
> --------------------------------------------------------
>
> Key: WFCORE-4474
> URL: https://issues.jboss.org/browse/WFCORE-4474
> Project: WildFly Core
> Issue Type: Bug
> Components: Logging
> Affects Versions: 9.0.0.Beta4
> Reporter: Vratislav Marek
> Assignee: James Perkins
> Priority: Major
>
> After the first successful set of a valid path, you can set an invalid path.
> It is can be relative to that while "relative-to" parameter is overridden, the validator doesn't validate it.
> Discovered on Windows.
> A code block is divided, but it is holding sequence to reproduce.
> This works as expected.
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:/server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> :> at index 61: D:\\Tests\\clear\\wildfly-17.0.0.Beta1-SNAPSHOT\\standalone\\log\\C:server.log",
> "rolled-back" => true
> }
> {code}
> {code:bash}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:*server.log})
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.nio.file.InvalidPathException: Illegal char <
> *> at index 2: C:*server.log",
> "rolled-back" => true
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:\\server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:/server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:/server.log"}
> }
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file,value={path=C:\server.log})
> {"outcome" => "success"}
> [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:read-attribute(name=file)
> {
> "outcome" => "success",
> "result" => {"path" => "C:server.log"}
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-11116) Wildfly 12.0.0 Final Delay in Getting the Value Attributes of the Session Variables (Result in Null Pointer Exception)
by ziad saade (Jira)
[ https://issues.jboss.org/browse/WFLY-11116?page=com.atlassian.jira.plugin... ]
ziad saade commented on WFLY-11116:
-----------------------------------
Dear Paul
I am not confused with the shifting to another thread when executing Response.sendRedirect; the main issue is that before executing response.sendredirect("index.html"); in Method3 (); all the statements in Method1() after the call of Method2() should be executed (Stm1 and others if available).
Thanks a lot for usual support
Best Regards
> Wildfly 12.0.0 Final Delay in Getting the Value Attributes of the Session Variables (Result in Null Pointer Exception)
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11116
> URL: https://issues.jboss.org/browse/WFLY-11116
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 14.0.1.Final, 12.0.0.Final, 13.0.0.Final, 15.0.0.Final
> Reporter: ziad saade
> Assignee: Paul Ferraro
> Priority: Critical
>
> I have two Servlets Book and BookPreview the attribute is set in Book Servlet as follow:
>
> Book.java
> TestBean testBean=null;
> if(session.getAttribute("testBean")!=null)
> testBean = (TestBean)session.getAttribute("testBean");
> else{
> testBean=new TestBean();
> session.setAttribute("testBean",testBean);
> }
> testBean.setAmount("10");
>
> response.sendRedirect("BookPreview");
>
>
> The session attribute can be retrieved and the page is loaded normally and the Amount value is displayed however when submitting the form (Post Action in BookPreview.java) Null Pointer exception is generated.
>
> BookPreview.java
>
> TestBean testBean = (TestBean)session.getAttribute("testBean");
> String amount = testBean.getAmount; //Null pointer exception when submitting the form
>
> <form method="Post" action="BookPreview">
>
> </form>
>
> TestBean.java
>
> public class TestBean implements java.io.Serializable {
>
> private static final long serialVersionUID = 1L;
> private String amount;
>
> public String getAmount() {
> return amount;
> }
>
> public void setAmount(String amount) {
> this.amount = amount;
> }
> }
>
> Kindly advice how to fix the problem at the level of the server configuration.
> PS: I am not getting the exception when deploying the same application under other J EE application servers (Tomcat....)
>
> Thanks and Best Regards
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (DROOLS-4043) inappropriate warning appear while building kjar
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4043?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-4043:
--------------------------------
Sprint: 2019 Week 20-22
> inappropriate warning appear while building kjar
> ------------------------------------------------
>
> Key: DROOLS-4043
> URL: https://issues.jboss.org/browse/DROOLS-4043
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.18.0.Final
> Reporter: Hiroko Miura
> Assignee: Mario Fusco
> Priority: Major
> Labels: support
> Attachments: buildKjar.zip
>
>
> When bulding kjar, warning something like the following appear.
> {noformat}
> [WARNING] File 'src/main/resources//work/buildKjar/src/main/resources/com/sample/rules2' is in folder '.work.buildKjar.src.main.resources.com.sample.rules2' but declares package 'com.sample.rules2'. It is advised to have a correspondance between package and folder names.
> [WARNING] File 'src/main/resources//work/buildKjar/src/main/resources/com/sample/rules' is in folder '.work.buildKjar.src.main.resources.com.sample.rules' but declares package 'com.sample.rules'. It is advised to have a correspondance between package and folder names.
> [WARNING] File 'work/buildKjar/src/main/resources/com/sample/rules2' is in folder 'work.buildKjar.src.main.resources.com.sample.rules2' but declares package 'com.sample.rules2'. It is advised to have a correspondance between package and folder names.
> [WARNING] File 'work/buildKjar/src/main/resources/com/sample/rules' is in folder 'work.buildKjar.src.main.resources.com.sample.rules' but declares package 'com.sample.rules'. It is advised to have a correspondance between package and folder names.
> {noformat}
> But drl are put under appropriate path which matches declared package.
> {noformat}
> src/main/resources/
> ├── com
> │ └── sample
> │ ├── rules
> │ │ └── Sample.drl
> │ └── rules2
> │ └── Sample2.drl
> {noformat}
> This warning should not appear for this example.
> In addition, path of File which is shown in this warning message looks wired.
> e.g.
> {noformat}
> File 'src/main/resources//work/buildKjarTest2/src/main/resources/com/sample/rules2'
> {noformat}
> i.e. prefix ('src/main/resources/') is added to absolute path.
> Therefore, it's hard to understand what is exactly wrong and warned.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (DROOLS-3572) Show & edit the Test Scenario (Preview) global settings
by Jozef Marko (Jira)
[ https://issues.jboss.org/browse/DROOLS-3572?page=com.atlassian.jira.plugi... ]
Jozef Marko updated DROOLS-3572:
--------------------------------
Attachment: save.webm
> Show & edit the Test Scenario (Preview) global settings
> -------------------------------------------------------
>
> Key: DROOLS-3572
> URL: https://issues.jboss.org/browse/DROOLS-3572
> Project: Drools
> Issue Type: Sub-task
> Components: Scenario Simulation and Testing
> Reporter: Klara Kufova
> Assignee: Gabriele Cardosi
> Priority: Major
> Labels: ScenarioSimulation
> Attachments: save.webm
>
>
> As a user, I want to be able to see and edit the global settings of a Test Scenario (Preview) asset.
> General properties:
> - Filename (editable ?)
> - Scenario Type (read-only)
> - Skip/Not to skip (checkbox)
> Rule available properties:
> - KieSession: String
> - KieBase: String
> - RuleFlowGroup: String
> DMN available properties:
> - DMN model path (editable?): String
> - DMN namespace (is needed?): String
> - DMN name (is needed?): String
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-12088) JAR does not supported for deployment-overlays mechanism
by Vlad Filipp (Jira)
Vlad Filipp created WFLY-12088:
----------------------------------
Summary: JAR does not supported for deployment-overlays mechanism
Key: WFLY-12088
URL: https://issues.jboss.org/browse/WFLY-12088
Project: WildFly
Issue Type: Bug
Components: Class Loading
Affects Versions: 16.0.0.Final
Reporter: Vlad Filipp
Assignee: Richard Opalka
When trying to make a link from an overlay to a JAR, classes from overlay libraries are not loaded for a linked JAR.
The situation is similar when creating a link to a JAR which is located inside EAR.
Should overlay deployment mechanism be supported for JARs?
Example standalone.xml:
{code:java}
<deployment-overlays>
...
<deployment-overlay name="my-overlay-n1">
<content ...>
<deployment name="my-jar-inside-ear-use-overlays-libs.jar"/>
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months