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

Issue 43374: + and % in container paths not properly encoded when creating exp.data rows in FileImporter #2408

Merged
merged 1 commit into from Jun 28, 2021

Conversation

labkey-jeckels
Copy link
Contributor

Rationale

A previous fix addressed special characters in the files that are part of the folder import, but there's a related problem when the target folder has special characters in its own name

Changes

  • Hacky encoding for import pathway to hold us over until we can uniformly encode the webdav URL

// Hack for issue 43374 - encode special characters in container paths. Need to push this encoding
// into FilesWebPart._getRootPath(), but other codepaths are doing their own compensation so it's a more
// involved change
rootDavUrl = rootDavUrl.replace("%", "%25").replace("+", "%2B");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK as long as we know that child.get("webdavURL") is not yet been through any encoding (such that a % is present from an encoding and thus might get encoded twice).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@labkey-susanh yes, it's always unencoded. See FilesWebPart._getRootPath() where it calls c.getPath() instead of c.getEncodedPath(). I think ultimately that call should change and do the encoding, but other places in the client code are doing their own encoding right now.

@labkey-jeckels labkey-jeckels merged commit b841bb4 into develop Jun 28, 2021
@labkey-jeckels labkey-jeckels deleted the fb_43374_folderImportFilesSpecialCharacters branch June 28, 2021 18:15
RosalineP pushed a commit that referenced this pull request Jun 28, 2021
…ating exp.data rows in FileImporter (#2408)

Co-authored-by: labkey-jeckels <Josh Eckels>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants