The vulnerability description states that the local file storage implementation does not restrict the size of uploaded files. I analyzed the provided commits, which are patches for this vulnerability. Both commits 6a66aa3adb967159a30d703e80403406f4c8f7a2 and c589ef4e2b25620770b8036f4ad05f1a6250cb6a modify the LocalFileStorage.java file. The core change is within the saveStream method.
Before the patch, the saveStream method used IOUtils.copyLarge(inputStream, outputStream) without any size restriction.
The patch introduces maxAllowedSize = properties.getMaxFileSize().toBytes(); and changes the copy operation to IOUtils.copyLarge(inputStream, outputStream, 0, maxAllowedSize);. It also adds logic to check if size >= maxAllowedSize and if there are still unread bytes, then it deletes the partially uploaded file and throws a FileStorageException.
This clearly indicates that the saveStream function was the point where the unrestricted file upload occurred, making it the vulnerable function. The other modified files (LocalFileStorageProperties.java, RestProperties.java, FileDownloadController.java) are related to configuring the new size limit and handling file downloads, but the vulnerability itself lies in the saveStream method's lack of size enforcement prior to the patch.