[jira] [Commented] (FELIX-6455) configadmin.plugin.interpolation: default Value with "]" is interpreted wrong

2021-09-01 Thread Carsten Ziegeler (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17408460#comment-17408460
 ] 

Carsten Ziegeler commented on FELIX-6455:
-

Adding escaping for any character sounds like the right solution, Agree that 
the code is quiet complex - I don't mind whether we switch to a parser 
generator or enhance the current code. I'm not sure that either solution is 
significantly easier for these cases.

> configadmin.plugin.interpolation: default Value with "]" is interpreted wrong
> -
>
> Key: FELIX-6455
> URL: https://issues.apache.org/jira/browse/FELIX-6455
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Reporter: Quan
>Priority: Major
>
> configadmin.plugin.interpolation interpreted the default value with "]" wrong:
>  * $[env:notset;default=[8080]]        => [8080](/)
>  * $[env:notset;default=[aabb]cc]     => [aabbcc] (x)
> To show the bug I have created a branch with a unit test: 
> [https://github.com/apache/felix-dev/compare/master...orangeven:bugfix/configadmin-plugins-interpolation-default-value-with-special-chars?expand=1]
> Line 162 failed with message:
> {noformat}
> org.junit.ComparisonFailure: 
> Expected :[aabb]cc
> Actual :[aabbcc]{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[VOTE] Release Apache Felix Http Base 4.1.4, Http Bridge 4.1.4 and Http Jetty 4.1.12

2021-09-01 Thread Carsten Ziegeler

Hi all,

we solved 1 issue in http base 4.1.4 and http bridge 4.1.4:
https://issues.apache.org/jira/browse/FELIX-6434

and 2 issues in http jetty 4.1.12
https://issues.apache.org/jira/browse/FELIX-6434
https://issues.apache.org/jira/browse/FELIX-6456


Staging repository:
https://repository.apache.org/content/repositories/orgapachefelix-1396

You can use this UNIX script to download the release and verify the
signatures:
https://github.com/apache/felix-dev/blob/master/check_staged_release.sh

Usage:
sh check_staged_release.sh 1396 /tmp/felix-staging

Please vote to approve this release:

[ ] +1 Approve the release
[ ] -1 Veto the release (please provide specific comments)

This vote will be open for 72 hours.

Regards
Carsten
--
Carsten Ziegeler
Adobe
cziege...@apache.org


[VOTE] Release Apache Felix Webconsole 4.7.0

2021-09-01 Thread Carsten Ziegeler

Hi all,

we solved 2 issues in this release:
https://issues.apache.org/jira/browse/FELIX-6367?jql=project%20%3D%20FELIX%20AND%20fixVersion%20%3D%20webconsole-4.7.0

Staging repository:
https://repository.apache.org/content/repositories/orgapachefelix-1395

You can use this UNIX script to download the release and verify the
signatures:
https://github.com/apache/felix-dev/blob/master/check_staged_release.sh

Usage:
sh check_staged_release.sh 1395 /tmp/felix-staging

Please vote to approve this release:

[ ] +1 Approve the release
[ ] -1 Veto the release (please provide specific comments)

This vote will be open for 72 hours.

Regards
Carsten
--
Carsten Ziegeler
Adobe
cziege...@apache.org


[jira] [Commented] (FELIX-6455) configadmin.plugin.interpolation: default Value with "]" is interpreted wrong

2021-09-01 Thread Stefan Seifert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17408368#comment-17408368
 ] 

Stefan Seifert commented on FELIX-6455:
---

currently, there is no concept for escaping values/string in the interpolation 
syntax. FELIX-6164 introduced a special escaping support only for the first $ 
character, but not for the full string. imho we cannot simply fix the test case 
above, we need to support escaping for the whole string e.g. with \ and then 
make sure characters like \[, \], \\ etc. result in their unescaped 
correspondence and have no special meaning.

looking at the already complex parser code in 
[Interpolator.java|https://github.com/apache/felix-dev/blob/master/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java],
 i'm wondering if it makes sense to make it even more complex to add escaping 
support - or if we should switch to a parser generator like javacc?

[~cziegeler] WDYT?

> configadmin.plugin.interpolation: default Value with "]" is interpreted wrong
> -
>
> Key: FELIX-6455
> URL: https://issues.apache.org/jira/browse/FELIX-6455
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Reporter: Quan
>Priority: Major
>
> configadmin.plugin.interpolation interpreted the default value with "]" wrong:
>  * $[env:notset;default=[8080]]        => [8080](/)
>  * $[env:notset;default=[aabb]cc]     => [aabbcc] (x)
> To show the bug I have created a branch with a unit test: 
> [https://github.com/apache/felix-dev/compare/master...orangeven:bugfix/configadmin-plugins-interpolation-default-value-with-special-chars?expand=1]
> Line 162 failed with message:
> {noformat}
> org.junit.ComparisonFailure: 
> Expected :[aabb]cc
> Actual :[aabbcc]{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6367) Provide SPI for configuration management

2021-09-01 Thread Carsten Ziegeler (Jira)


 [ 
https://issues.apache.org/jira/browse/FELIX-6367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved FELIX-6367.
-
Resolution: Fixed

Added a new SPI which allows handlers to hook into creating, updating and 
deleting configurations

> Provide SPI for configuration management
> 
>
> Key: FELIX-6367
> URL: https://issues.apache.org/jira/browse/FELIX-6367
> Project: Felix
>  Issue Type: Improvement
>  Components: Web Console
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: webconsole-4.7.0
>
>
> The web console today displays all configurations and for each configuration 
> all properties.
> For some scenarios it makes sense to distinguish between system and 
> application configurations where (depending on a role) the user might only be 
> able to change application configuration.
> In addition, providing a mechanism to hook in validation of configurations 
> before they are applied is useful in other scenarios.
> An SPI approach allows to hook-in custom configuration management



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6456) Update Jetty to 9.4.43.v20210629

2021-09-01 Thread Carsten Ziegeler (Jira)


 [ 
https://issues.apache.org/jira/browse/FELIX-6456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved FELIX-6456.
-
Resolution: Fixed

https://github.com/apache/felix-dev/commit/33772fc526d7e884434f4b9f839fa4ee52808d6c

> Update Jetty to 9.4.43.v20210629
> 
>
> Key: FELIX-6456
> URL: https://issues.apache.org/jira/browse/FELIX-6456
> Project: Felix
>  Issue Type: New Feature
>  Components: HTTP Service
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: http.jetty-4.1.12
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FELIX-6456) Update Jetty to 9.4.43.v20210629

2021-09-01 Thread Carsten Ziegeler (Jira)
Carsten Ziegeler created FELIX-6456:
---

 Summary: Update Jetty to 9.4.43.v20210629
 Key: FELIX-6456
 URL: https://issues.apache.org/jira/browse/FELIX-6456
 Project: Felix
  Issue Type: New Feature
  Components: HTTP Service
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: http.jetty-4.1.12






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6434) errorhandler can commit the response wice

2021-09-01 Thread Carsten Ziegeler (Jira)


 [ 
https://issues.apache.org/jira/browse/FELIX-6434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved FELIX-6434.
-
Resolution: Fixed

Checking the state of the response now in the dispatcher before calling 
senderror
https://github.com/apache/felix-dev/commit/abf81ce9b54d5efae0abea8d84c668ab3bec86d2

> errorhandler can commit the response wice
> -
>
> Key: FELIX-6434
> URL: https://issues.apache.org/jira/browse/FELIX-6434
> Project: Felix
>  Issue Type: Improvement
>  Components: HTTP Service
>Affects Versions: http.base-4.1.2, http.bridge-4.1.2, http.jetty-4.1.10
>Reporter: Joerg Hoh
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: http.base-4.1.4, http.jetty-4.1.12, http.bridge-4.1.4
>
>
> We saw this exception in our logs:
> {code}
> 28.05.2021 06:35:32.758 ERROR [qtp1872055084-43557] 
> org.apache.felix.http.jetty Exception while processing request to 
> /crx/de/endorsed/extjs/ext-all-debug.js (org.eclipse.jetty.io.EofException)
> org.eclipse.jetty.io.EofException: null
> at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:279) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:422) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:378) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:119) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> java.lang.IllegalStateException: Committed
> at org.eclipse.jetty.server.HttpChannel.resetBuffer(HttpChannel.java:917) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.server.HttpOutput.resetBuffer(HttpOutput.java:1418) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.server.Response.resetBuffer(Response.java:1180) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> javax.servlet.ServletResponseWrapper.resetBuffer(ServletResponseWrapper.java:195)
>  [org.apache.felix.http.servlet-api:1.1.2]
> at 
> org.apache.felix.http.base.internal.dispatch.ServletResponseWrapper.sendError(ServletResponseWrapper.java:67)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.dispatch.ServletResponseWrapper.sendError(ServletResponseWrapper.java:61)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:155)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1002)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> com.adobe.granite.auth.oauth.impl.OAuthCallbackFilter.doFilter(OAuthCallbackFilter.java:69)
>  [com.adobe.granite.auth.oauth:1.7.2]
> at 
> org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> Checking the code it seems that the {{ServletResponseWrapper.sendError()}} 
> [1] does a {{resetBuffer()}}, which according to its javadoc [2] can throw an 
> {{IllegalStateException}} if the response has been already committed.
> Therefor the call to {{resetBuffer()}} should be guarded by a check of 
> {{isCommitted()}} and invoke it only in case the response is not yet 
> committed. 
> Probably it also makes sense to not to set the statuscode because it also 
> does not have any effect anymore.
> [1] 
> https://github.com/apache/felix-dev/blob/master/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletResponseWrapper.java#L65
> [2] 
> https://javaee.github.io/javaee-spec/javadocs/javax/servlet/ServletResponse.html#resetBuffer--



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FELIX-6434) errorhandler can commit the response wice

2021-09-01 Thread Carsten Ziegeler (Jira)


 [ 
https://issues.apache.org/jira/browse/FELIX-6434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler updated FELIX-6434:

Summary: errorhandler can commit the response wice  (was: [Jetty] 
errorhandler can commit the response twice)

> errorhandler can commit the response wice
> -
>
> Key: FELIX-6434
> URL: https://issues.apache.org/jira/browse/FELIX-6434
> Project: Felix
>  Issue Type: Improvement
>  Components: HTTP Service
>Affects Versions: http.base-4.1.2, http.bridge-4.1.2, http.jetty-4.1.10
>Reporter: Joerg Hoh
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: http.base-4.1.4, http.jetty-4.1.12, http.bridge-4.1.4
>
>
> We saw this exception in our logs:
> {code}
> 28.05.2021 06:35:32.758 ERROR [qtp1872055084-43557] 
> org.apache.felix.http.jetty Exception while processing request to 
> /crx/de/endorsed/extjs/ext-all-debug.js (org.eclipse.jetty.io.EofException)
> org.eclipse.jetty.io.EofException: null
> at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:279) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:422) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:378) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:119) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> java.lang.IllegalStateException: Committed
> at org.eclipse.jetty.server.HttpChannel.resetBuffer(HttpChannel.java:917) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.server.HttpOutput.resetBuffer(HttpOutput.java:1418) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at org.eclipse.jetty.server.Response.resetBuffer(Response.java:1180) 
> [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> javax.servlet.ServletResponseWrapper.resetBuffer(ServletResponseWrapper.java:195)
>  [org.apache.felix.http.servlet-api:1.1.2]
> at 
> org.apache.felix.http.base.internal.dispatch.ServletResponseWrapper.sendError(ServletResponseWrapper.java:67)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.dispatch.ServletResponseWrapper.sendError(ServletResponseWrapper.java:61)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:155)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1002)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> com.adobe.granite.auth.oauth.impl.OAuthCallbackFilter.doFilter(OAuthCallbackFilter.java:69)
>  [com.adobe.granite.auth.oauth:1.7.2]
> at 
> org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
>  [org.apache.felix.http.jetty:4.1.2.T2020102214]
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> Checking the code it seems that the {{ServletResponseWrapper.sendError()}} 
> [1] does a {{resetBuffer()}}, which according to its javadoc [2] can throw an 
> {{IllegalStateException}} if the response has been already committed.
> Therefor the call to {{resetBuffer()}} should be guarded by a check of 
> {{isCommitted()}} and invoke it only in case the response is not yet 
> committed. 
> Probably it also makes sense to not to set the statuscode because it also 
> does not have any effect anymore.
> [1] 
> https://github.com/apache/felix-dev/blob/master/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletResponseWrapper.java#L65
> [2] 
> https://javaee.github.io/javaee-spec/javadocs/javax/servlet/ServletResponse.html#resetBuffer--



--
This message was sent by Atlassian Jira
(v8.3.4#803005)