Skip to content

Bug report: creating folders fails when a part of the host name is uppercase #2011

@waldekmastykarz

Description

@waldekmastykarz

Description

If a part of the specified hostname in the spo folder add command (but possible other commands as well) is uppercase, creating the folder will fail with an error.

This issue is caused by the fact that url.parse in Utils.getServerRelativePath converts the specified URL to lowercase, but if the original URL is uppercase, then resolving the server-relative URL by replacing the server-part of the URL will fail.

Steps to reproduce

m365 spo folder add --webUrl 'https://CONTOSO.sharepoint.com/sites/docs' --parentFolderUrl '/SiteAssets' --name 'assets'

Expected result

Folder created

Actual result

400 error

Environment

v3.4.0@next

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions