Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFCORE-3231] Logging subsystem: Fix SuffixValidator to allow 's' or 'S' symbols in text quoted using single quotes in suffix. #2840

Merged
merged 1 commit into from Oct 30, 2017

Conversation

ivassile
Copy link
Contributor

Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include unit tests. Thanks!

if (c == '\'') {
c = suffix.charAt(++i);
while (c != '\'') {
c = suffix.charAt(++i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both this and L61 can throw an IndexOutOfBoundsException.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added unit tests. I first validate the suffix on L56 and then check for 's' in order to prevent checking invalid formats like "m'suffix" (one single quote) which in this case will throw StringIndexOutOfBoundsException.

symbols in text quoted using single quotes in suffix.
@wildfly-ci
Copy link

Core - Full Integration Build 6026 outcome was FAILURE using a merge of 037e8f2
Summary: Tests failed: 1 (1 new), passed: 4207, ignored: 94 Build time: 01:30:51

Failed tests

org.jboss.as.test.integration.domain.suites.DeploymentManagementTestCase.testManagedFullReplaceUnmanaged: java.io.IOException: Stream closed.
	at java.net.AbstractPlainSocketImpl.available(AbstractPlainSocketImpl.java:470)
	at java.net.SocketInputStream.available(SocketInputStream.java:259)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:353)
	at sun.net.www.MeteredStream.read(MeteredStream.java:134)
	at java.io.FilterInputStream.read(FilterInputStream.java:133)
	at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3375)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
	at org.jboss.as.test.integration.domain.suites.DeploymentManagementTestCase.performHttpCall(DeploymentManagementTestCase.java:917)
	at org.jboss.as.test.integration.domain.suites.DeploymentManagementTestCase.performHttpCall(DeploymentManagementTestCase.java:905)
	at org.jboss.as.test.integration.domain.suites.DeploymentManagementTestCase.testUnmanagedExplodedDeployment(DeploymentManagementTestCase.java:326)
	at org.jboss.as.test.integration.domain.suites.DeploymentManagementTestCase.testManagedFullReplaceUnmanaged(DeploymentManagementTestCase.java:669)
------- Stdout: -------
[Server:other-two] 09:14:19,171 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "test.war" (runtime-name: "test.war")
[Server:other-two] 09:14:19,242 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 25) WFLYUT0021: Registered web context: '/test' for server 'default-server'
[Server:other-two] 09:14:19,261 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 17) WFLYSRV0010: Deployed "test.war" (runtime-name : "test.war")
[Server:other-two] 09:14:19,393 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 6) WFLYUT0022: Unregistered web context: '/test' from server 'default-server'
[Server:other-two] 09:14:19,400 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment test.war (runtime-name: test.war) in 8ms
[Server:other-two] 09:14:19,413 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 17) WFLYSRV0009: Undeployed "test.war" (runtime-name: "test.war")


@bstansberry bstansberry merged commit 5fd9ecc into wildfly:master Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants