In versions prior to 6.7.2, struts.token.name was successfully retrieved as a token. However, the current issue of not being able to retrieve it occurs in an Interceptor instead of a Normal Action.
[2025-02-12 09:36:30.309] INFO Dispatcher - Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir [2025-02-12 09:36:30.427] WARN JakartaMultiPartRequest - Form field name [struts.token.name] is not accepted [2025-02-12 09:36:30.460] WARN TokenHelper - Could not find token name in params. Is the inability to use this feature in this version an intentional change? If so, is there an alternative method available? On 2025/02/10 08:46:03, Greg Huber wrote: > Testing, I also get this warning for an upload action, but not for normal > actions. > > 2025-02-10 08:37:39,025 WARN > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest > JakartaMultiPartRequest: processNormalFormField - Form field name > [struts.token.name] is not accepted > > On 2025/02/10 04:30, 戸田 栄太 (HARP) wrote: > > I am unable to obtain a token during the form upload process. Specifically, > > I have tried the following: > > > > - I submitted a form from the browser with "enctype" set to > > "multipart/form-data" and used "struts.token.name" as the token name in the > > request. > > - When executing "getTokenName()" from "TokenHelper" in the > > "struts2-core-6.7.2.jar" on the application side, it returns null. > > - Upon debugging, I found that "!params.contains("struts.token.name")" in > > "TokenHelper.getTokenName()" indicates that the relevant token is not > > included in the "params". It seems that the exclusion patterns added to > > "DefaultExcludedPatterns" may be affecting this. > > - When the "enctype" is set to "application/x-www-form-urlencoded", I am > > able to retrieve the token. > > > > As part of upgrading to version 6.7.2, are there any necessary adjustments > > that need to be made on the application side? > > On 2025/02/04 06:59:20, Lukasz Lenart wrote: > > Hello, > > > > This is a patch release of Struts 6.x.x which contains only non-breaking > > changes. Please take the time and test the bits - any help is appreciated. > > Please report any problems you will spot. > > > > Here are the changes from the previous version: > > https://github.com/apache/struts/releases/tag/STRUTS_6_7_2 > > > > Staging Maven repo: > > https://repository.apache.org/content/groups/staging/ > > > > Standalone artifacts: > > https://dist.apache.org/repos/dist/dev/struts/6.7.2/ > > > > Release notes: > > https://cwiki.apache.org/confluence/display/WW/Version+Notes+6.7.2 > > > > Kind regards > > -- > > Łukasz > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org > For additional commands, e-mail: dev-h...@struts.apache.org