-
Bug
-
Resolution: Fixed
-
Neutral
-
3.0.16
-
None
-
None
-
-
Empty show more show less
-
AuthX 13
-
1
Steps to reproduce
- Open assets app
- upload zip file zip-with-svg-assets2.zip
- upload zip file samsung-galaxy-a33-128gb.zip
Expected results
Both files are correctly uploaded and the assets are created
Actual results
File zip-with-svg-assets.zip is correctly processed whereas samsung-galaxy-a33-128gb.zip throws an error:
info.magnolia.ui.api.action.ActionExecutionException: java.io.IOException: Resetting to invalid mark
Development notes
The error is caused in info.magnolia.dam.app.action.UploadAssetsAction.handleFileEntry(ZipFile, ZipArchiveEntry) line 201:
bis.reset();}
Specifically in line 446 of class BufferedInputStream:
/** * See the general contract of the <code>reset</code> * method of <code>InputStream</code>. * <p> * If <code>markpos</code> is <code>-1</code> * (no mark has been set or the mark has been * invalidated), an <code>IOException</code> * is thrown. Otherwise, <code>pos</code> is * set equal to <code>markpos</code>. * * @exception IOException if this stream has not been marked or, * if the mark has been invalidated, or the stream * has been closed by invoking its {@link #close()} * method, or an I/O error occurs. * @see java.io.BufferedInputStream#mark(int) */ public synchronized void reset() throws IOException { getBufIfOpen(); // Cause exception if closed if (markpos < 0) throw new IOException("Resetting to invalid mark"); pos = markpos; }
Tested with Java 8 and 14
Tested with different combinations of the files in samsung-galaxy-a33-128gb.zip:
- Reducing the number of files up to 1
- Simplifying the file names so they are not long and neither contain characters other than letters.
- Mixing with the files of the working zip.
All of the above failed.
Acceptance criteria
- is duplicated by
-
MGNLDAM-1044 Uploading a file named .extension.zip fails
- Closed
- is related to
-
MGNLDAM-1038 SVG validation runs twice
- Open
1.
|
QA | Completed | Lam Nguyen Bao |
|