[
https://issues.apache.org/jira/browse/WW-5786?focusedWorklogId=1049636&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1049636
]
ASF GitHub Bot logged work on WW-5786:
--------------------------------------
Author: ASF GitHub Bot
Created on: 23/Oct/26 11:04
Start Date: 23/Oct/26 11:04
Worklog Time Spent: 10m
Work Description: sonarqubecloud[bot] commented on PR #2052:
URL: https://github.com/apache/struts/pull/2052#issuecomment-6363432828
## [](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=2052)
**Quality Gate passed**
Issues
 [0 New
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2052&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2052&issueStatuses=ACCEPTED)
Measures
 [0 Security
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=2052&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2052&metric=new_coverage&view=list)
 [0.0% Duplication on New
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2052&metric=new_duplicated_lines_density&view=list)
<!
Issue Time Tracking
-------------------
Worklog Id: (was: 1049636)
Time Spent: 20m (was: 10m)
> Verify HTTP method restrictions for Convention plugin actions
> -------------------------------------------------------------
>
> Key: WW-5786
> URL: https://issues.apache.org/jira/browse/WW-5786
> Project: Struts 2
> Issue Type: Task
> Components: Plugin - Convention
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Major
> Fix For: 7.5.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Follow-up to WW-3717, which adds an {{http-method}} attribute to {{<action>}}
> in {{struts.xml}}, enforced by {{HttpMethodInterceptor}}, with a 405 response
> (and an {{Allow}} header) when no {{bad-request}} result is mapped.
> Actions discovered by the Convention plugin have no XML declaration, so they
> cannot use the new attribute. The expectation is that they are already
> covered by the existing annotations ({{@HttpGet}}, {{@HttpPost}},
> {{@HttpPut}}, {{@HttpDelete}}, {{@HttpGetOrPost}}, {{@AllowedHttpMethod}}) on
> the action class or method.
> Verify this and pick one outcome:
> * *Covered:* add tests in the Convention plugin that pin it: an annotated
> Convention action (class-level and method-level, including an
> {{@Action}}-mapped method) rejects a disallowed method with the mapped
> {{bad-request}} result, or with 405 + {{Allow}} when none is mapped, and
> accepts an allowed one.
> * *Gap confirmed:* document what is missing (for example, a case the
> annotations cannot express for Convention actions) and open a New Feature
> ticket at 8.0.0 for an {{@Action(httpMethod = ...)}} style attribute, linking
> it here.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)