[
https://issues.apache.org/jira/browse/SOLR-16341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090424#comment-18090424
]
ASF subversion and git services commented on SOLR-16341:
--------------------------------------------------------
Commit 33af79132a69348ec564f538e933e593b378f09b in solr's branch
refs/heads/main from Eric Pugh
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=33af79132a6 ]
SOLR-16341: fix blank file zip handling (#4249)
Co-authored-by: copilot-swe-agent[bot]
<[email protected]>
Co-authored-by: epugh <[email protected]>
Co-authored-by: Copilot <[email protected]>
> Error when upload configset with empty file entry
> -------------------------------------------------
>
> Key: SOLR-16341
> URL: https://issues.apache.org/jira/browse/SOLR-16341
> Project: Solr
> Issue Type: Bug
> Components: configset-api
> Affects Versions: 9.0, 8.11.2
> Reporter: Mike Drob
> Priority: Minor
> Labels: newdev, pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Confirmed with both 8.11 and 9.0
> When uploading a configset that contains an empty file (likely this might be
> a synonyms or stop words or some other auxiliary file) our zip processing
> will throw an exception:
> {noformat}
> 2022-08-17 21:36:07.618 ERROR (qtp1142347343-28) [] o.a.s.s.HttpSolrCall
> java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor =>
> java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
> at java.base/java.util.zip.ZipInputStream.readLOC(Unknown Source)
> java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
> at java.util.zip.ZipInputStream.readLOC(Unknown Source) ~[?:?]
> at java.util.zip.ZipInputStream.getNextEntry(Unknown Source) ~[?:?]
> at
> org.apache.solr.handler.admin.ConfigSetsHandler.handleConfigUploadRequest(ConfigSetsHandler.java:247)
> ~[?:?]
> at
> org.apache.solr.handler.admin.ConfigSetsHandler.handleRequestBody(ConfigSetsHandler.java:113)
> ~[?:?]
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:207)
> ~[?:?]
> {noformat}
> I believe this issue is described at
> https://commons.apache.org/proper/commons-compress/zip.html, although the
> description is for apache commons, they claim {{ZipArchiveInputStream shares
> these limitations with java.util.zip.ZipInputStream}}
> Steps to reproduce:
> {noformat}
> >stopwords.txt
> zip -r - * | curl -X POST --header "Content-Type:application/octet-stream"
> --data-binary @-
> "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=c1"
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]