-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[24.2] Decode/encode FormDirectory paths to allow spaces (and other characters) #19841
[24.2] Decode/encode FormDirectory paths to allow spaces (and other characters) #19841
Conversation
feb53ed
to
5c44711
Compare
Oh thanks! I think we also have 1-2 reports about this in the last month. |
Is this a backend issue - what file source is causing this? Everything should be JSON it seems and I wouldn't expect there to be any problems? I'd love an API test or backend unit test to verify the problem is not there. |
My example is in the PR description, where for instance a directory name is The other case where the directory name has a space for example works out as shown. |
I tested this PR and it is working as expected for S3 buckets with space characters in the name. However, while the percent sign is in the list of characters to avoid |
Argh, at some part of the process AFTER we have forked a process to run the job, we are somehow encoding cases like:
I can't seem to debug where this exactly happens... I can confirm in the backend the URI stays perfectly intact (e.g.: The URI is still correct at
I can try changing the |
Oh I found a way to make it work!!! But is it a valid fix here or can this create more potential problems?: In
|
That single change fixes it? If that is the case, I have a better solution if that is the only problem - if we dump the inputs to a json file and ingest them as such in the tool I think that we shouldn't need to do any encoding/decoding. If I make the change to the tool can you test it for me? |
Yes please! Well, this change fixes the case of the extra "encoding/sanitization?" that happens at the tool level, the frontend changes are still needed to retain the exact directory names (with spaces etc.) |
Was not as straight forward as I was hoping but this is the backend change I would like to see #19865 along with backend tests to ensure it is handling things as I would expect. |
@jmchilton Thank you!! |
Can you add a couple or tests that cover the changes ? |
I'm still anxious that there is a bug in the file source or the concept behind file sources if we're getting these kinds of things in the UI - but I don't have the bandwidth to think through it or track down the plugin that causes this problem? I guess as long as the UI is sending back the to backend what the backend sent to the UI - I'm find with whatever happens in the UI. |
5c44711
to
c0762f7
Compare
Fixes #19812
fix_directory_form_element_encoding.mp4
Here, note that the problem reported in #19812 of directories with spaces not working as expected is fixed, for e.g.:
works fine.
However, the case where a directory name is already "encoded", for e.g.:
we instead end up creating a directory:
rather than storing in the existing
Other%20Data
directory.Maybe we ignore this case? Or flag such directory paths as invalid?
How to test the changes?
(Select all options that apply)
License