mraible opened a new pull request, #312:
URL: https://github.com/apache/roller/pull/312

   `ValidateSaltInterceptor` skipped the salt check for a multipart post 
whenever Struts reported errors parsing it, so an upload action could show 
those errors. In Struts 7, `ActionFileUploadInterceptor` copies the errors only 
onto actions that implement `UploadedFilesAware`; for every other action the 
post binds its parameters and the action method runs. A multipart post with a 
field longer than `struts.multipart.maxStringLength`, sent to a form action 
that doesn't take uploads, therefore ran that action without a salt.
   
   Now only `UploadedFilesAware` actions (media add and edit, bookmark import) 
skip the check. Their errors stop the request in `workflow`, which returns the 
input page before the action method runs, as before. Every other action needs a 
valid salt even when the post has parse errors.
   
   - `ValidateSaltInterceptorTest` has a case for a multipart post with parse 
errors to an action that isn't `UploadedFilesAware`: it now throws and never 
invokes the action. It fails without the change. The existing case for upload 
actions now names an `UploadedFilesAware` action.
   - On `jetty:run`, a multipart post to `profile!save.rol` with no salt and a 
5,000-character field is now refused, and a bookmark import with the same field 
shows the "too long" error and imports nothing.
   - `mvn test` passes (750 tests), and the Playwright database-login suite 
passes (20 run, 3 OIDC tests skipped).
   
   The `roller-6.1.x` line uses Struts 2.5, whose upload interceptor gives 
parse errors to every action, so this doesn't apply there.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to