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

Use IRODS specific XML dialect #10

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

peterverraedt
Copy link
Contributor

@peterverraedt peterverraedt commented Mar 30, 2021

IRODS uses its own dialect for XML communication. Stumbled on this because the AddUser-function did not accept passwords, as the generated scrambled password contained the quote character ". Xml.Marshal encodes this as ", but the irods server only looks for ", ', <, > and & to replace these back to the original characters and leaves " as is.

While investigating it, I noticed that before 4.2.9 also ' was corresponding to the ` character instead of '. As a result, if one uploads a file with the icommands with the name test'`.txt, the go library would see test''.txt.

I've added XML pre- and processing functions, so that xml.Marshal XML is translated back and forwards to XML irods can understand. I do it in the Request function, and not in the individual GetBytes()/FromBytes() functions as I was first planning to, as I need to do different translations depending on the server version of irods.

Signed-off-by: Peter Verraedt [email protected]

@peterverraedt peterverraedt force-pushed the use-irods-xml-dialect branch 4 times, most recently from 3f82f86 to 17703bf Compare March 31, 2021 18:11
@iychoi
Copy link
Member

iychoi commented Mar 31, 2021

Thank you for the fix.
I'll review this soon!

@iychoi iychoi merged commit 03d82e7 into cyverse:main Apr 5, 2021
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.

2 participants