[
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)