Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoded characters in artifactory paths cause download error with AQL spec file #2714

Open
aamailhot88 opened this issue Oct 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aamailhot88
Copy link

Describe the bug

There appears to be a mismatch in Artifactory paths when downloading a set of Artifacts via AQL specfile. The issue is believed to be that the failure message shows the URL encoding sequence '%25' in it ("can't find this path"), vs the resolved path after encoding is the '%' character. I.e. it seems like something in AQL processing doesn't handle URL encoding correctly.

This mismatch for this URL character is also evident looking between the URL to a file on Artifactory vs their 'repo path' as seen on the Artifactory web UI.

Current behavior

I see this failure:

[Warn] (Attempt <1/2/3/4>) - Failure occurred while sending GET request to <PRIVATE_SERVER>/<REPO_PATH>/<...>/%25build%25<...>

Many other paths work fine, some otter paths also fail in this same manner. The correlating factor seems to be that all paths with this '%25' string in them fail whereas no paths without this string fail.

All paths (even those with '%') are also able to be downloaded fine directly without the spec file via this command:

jr rt dl <FILE_PATH>

All content is also returned correctly (in their 'repository path' formats via the Search command:

jf rt s --spec <SPEC_FILE>

Reproduction steps

Upload some artifactory content to a path containing a '%'.
Run this command: jf rt dl --spec <SPEC_FILE>
Where the specfile utilizes AQL, such as:

{
    "files": [
        {
            "aql": {
                "items.find": {
                    "$and":[
                        {"repo": "<REPO>" },
                        {"type": "file"},
                        {"path": {"$match" : "<PATH>"}}
                    ]
                }
            }
        }
    ]
}

Expected behavior

Material on paths with '%' in them download successfully via an AQL specfile.

JFrog CLI version

2.21.0

Operating system type and version

Linux Redhat 7.9 (Maipo)

JFrog Artifactory version

7.71.23

JFrog Xray version

No response

@aamailhot88 aamailhot88 added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant