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

Breaking changes on v2.5.14 #923

Open
marpereira opened this issue Dec 11, 2024 · 1 comment
Open

Breaking changes on v2.5.14 #923

marpereira opened this issue Dec 11, 2024 · 1 comment
Labels

Comments

@marpereira
Copy link

Hi all!

A breaking change was added on v2.5.14 due to this commit.

Before this change, the input parameter server_relative_url from save_binary and open_binary wasn't escaped and the string must be url escaped (eg. Shared%20Documents for Shared Documents folder).

After this change, the server_relative_url is parsed to Shared%2520Documents due to the urlib.quote method.

We're not expecting this breaking change on a patch version. No matter what, there are no tests covering any error on this change nor a proper warning on the release notes. I think that this is a change that will affect users since office365 uses spaces by default, unfortunately.

@vgrem vgrem added the bug label Dec 11, 2024
@elMonsiEnroute
Copy link

perhaps a fix to this would be to first unquote and then quote again? In this scenario, if the string already comes escaped, will not cause further issues.

Something like:
url = quote( unquote(r"{0}/web/getFileByServerRelativePath(DecodedUrl='{1}')/\$value".format( context.service_root_url(), server_relative_url )), safe=":/", )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants