[ 
https://issues.apache.org/jira/browse/WW-5184?focusedWorklogId=813587&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-813587
 ]

ASF GitHub Bot logged work on WW-5184:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Sep/22 06:33
            Start Date: 30/Sep/22 06:33
    Worklog Time Spent: 10m 
      Work Description: sonarcloud[bot] commented on PR #607:
URL: https://github.com/apache/struts/pull/607#issuecomment-1263164412

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=607)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=VULNERABILITY)
 
[![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png
 
'B')](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=VULNERABILITY)
 [2 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=607&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=607&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=607&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=607&resolved=false&types=CODE_SMELL)
   
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=607&metric=new_coverage&view=list)
 [0.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=607&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=607&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=607&metric=new_duplicated_lines_density&view=list)
   
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 813587)
    Time Spent: 6h 20m  (was: 6h 10m)

> Add optional parameter value check to ParametersInterceptor
> -----------------------------------------------------------
>
>                 Key: WW-5184
>                 URL: https://issues.apache.org/jira/browse/WW-5184
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 6.0.0
>            Reporter: Brian Andle
>            Priority: Major
>             Fix For: 6.1.0
>
>          Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> It is known that developers utilizing Struts/Freemarker should always ensure 
> proper sanitization to prevent OGNL/Freemarker evaluation on untrusted user 
> input when %{/$\{ in FTL being passed into Struts tags.
> These patterns aren't always practical to resolve/find especially in legacy 
> code. This isn't a solely a legacy code issue of course, it's just as easy to 
> make a mistake in newer code as well.
> The following would end up rendering 81
> Payload:
> {code:java}
> untrustedInput=%25%7B9%2A9%7D {code}
> FTL:
>  
> {code:java}
> <@s.form theme="simple" action="${untrustedInput}" id="myForm4">
> </@s.form> {code}
>  
> Java:
> {code:java}
>     private String untrustedInput;
>     public String getUntrustedInput() {
>         return untrustedInput;
>     }
>     public void setUntrustedInput(String untrustedInput) {
>         this.untrustedInput = untrustedInput;
>     } {code}
>  
> This ticket is to add an optional `params.excludeValuePatterns` so that 
> ParametersInterceptor can drop incoming parameter itself if the value matches 
> a pattern to be excluded.
>  
> {code:java}
> <param 
> name="params.excludeValuePatterns">.*\$\{.*?\}.*,.*%\{.*?\}.*</param>{code}
>  
> Since this is a pattern and would be executed against the values themselves 
> there is the potential of a performance impact however I since it's optional 
> we shouldn't see any measurable impact when not enabled.
>  
> *NOTE:* I did add a `params.acceptValuePatterns` pattern that is 
> null/disabled by default. This might not ever be used but mimic'd the Pattern 
> matcher the ParametersInterceptor/CookieInterceptor.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to