Repository navigation
fix: Make upload requests pass Spring Security checks - #11278
Conversation
| private static boolean isUploadRequest( | ||
| String requestedPathWithoutServletMapping) { | ||
| return requestedPathWithoutServletMapping | ||
| .matches("VAADIN/dynamic/resource/.*/.*/upload"); |
There was a problem hiding this comment.
With this check, one can make a call to VAADIN/dynamic/resource/../../../upload and this will return true.
I don't see any encoding done here (see isPathUnsafe method). In theory, one could have mapped something to /upload or /some-prefix-path/upload that is secured. That makes at least the contract for the HandlerHelper API method a bit broken as I don't think that URL should return true. There is also no mention of encoding/prechecking the request in the javadocs.
I would fix it just to be safe, even if it is not exploitable through VaadinWebSecurityConfigurerAdapter.java in Spring add-on (I don't know if that is the case) by bypassing security measures there for a fake upload request.
There was a problem hiding this comment.
Changed to check the whole string for valid characters
|
SonarQube analysis reported 2 issues
|
|
Hi @Artur- and @{commit.merged_by.login}, when i performed cherry-pick to this commit to 7.0, i have encountered the following issue. Can you take a look and pick it manually? |
|
This ticket/PR has been released with platform 21.0.0.alpha8. For prerelease versions, it will be included in its final version. |
|
I have this issue in Vaadin 20.0.3 with VaadinWebSecurityConfigurerAdapter. In my case I use with a property vaadin.urlMapping and don't test without. |
|
The wast majority of Flow related features and fixed for Spring Security is only in Vaadin 21. For Vaadin 20 you can manually add a rule for allowing requests to |



No description provided.