zip action=list filter UDF is a passed a completely invalid entryPath

Description

rather than the path in the zip, it's missing the zip entries' directory and using the zip files path instead

https://docs.lucee.org/reference/tags/zip.html#attribute-filter

[java] [script] testZipFilterUdfPaths
[java] [script]
[java] [script] Failed: Expected [1/2.cfm,a.txt,b.txt,b/c/a.txt,n/m/b.txt,n/m/b/c/a.txt] but received [C:\work\lucee6\test\extension\zipUDFtest\test.zip\2.cfm,C:\work\lucee6\test\extension\zipUDFtest\test.zip\a.txt,C:\work\lucee6\test\extension\zipUDFtest\test.zip\a.txt,C:\work\lucee6\test\extension\zipUDFtest\test.zip\a.txt,C:\work\lucee6\test\extension\zipUDFtest\test.zip\b.txt,C:\work\lucee6\test\extension\zipUDFtest\test.zip\b.txt]
[java] [script]
[java] [script] C:\work\lucee6\test\extension\ZipFilterUdf.cfc:66
[java] [script] C:\work\lucee6\test_testRunner.cfc:336
[java] [script] C:\work\lucee6\test\run-tests.cfm:203

i think the problem is

https://github.com/lucee/extension-compress/blob/master/source/java/src/org/lucee/extension/zip/tag/Zip.java#L423

ideally for the UDF could be passed the following

function ( entryPath, resource, filename, directory )

resource being a zip:///path_to_zip_file!path_to_entry.txt so the closure could do a fileRead( arguments.resource )

Environment

None

Activity

Show:

Pothys - MitrahSoft 21 February 2022 at 14:40

The same issue also happens with cfzip action = delete. I created a separate ticket for this https://luceeserver.atlassian.net/browse/LDEV-3882

Pothys - MitrahSoft 21 February 2022 at 13:02

I've checked this ticket with fixed version and Now the issue was solved. So i marked this ticket as deployed.

Zac Spitzer 18 February 2022 at 18:31

fixed, thanks to some help from

Fixed

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 4 February 2022 at 19:48
Updated 21 February 2022 at 14:40
Resolved 21 February 2022 at 13:02

Flag notifications