-
Notifications
You must be signed in to change notification settings - Fork 829
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
[MM-54465] Remove lowercase call when checking path names #2831
[MM-54465] Remove lowercase call when checking path names #2831
Conversation
@@ -201,7 +201,7 @@ export function validateV0ConfigData(data: ConfigV0) { | |||
function cleanURL(url: string): string { | |||
let updatedURL = url; | |||
if (updatedURL.includes('\\')) { | |||
updatedURL = updatedURL.toLowerCase().replace(/\\/gi, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any cases where later we compare the server url that it make break now if it's there any casing mistmatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be. We were doing this to make sure the path name was lower case, and this function is mostly to get rid of double slashes. We do a lower case when we compared host and origin in other parts of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cherry pick is scheduled. |
) (cherry picked from commit 128d15a) Co-authored-by: Devin Binnie <[email protected]>
Summary
When we were checking if two URLs were equal, we were assuming that like the URL's origin, the pathname was also not case-sensitive. This is not the case so it was possible that two URLs with different URLs could be considered equal.
This PR removed the call to
toLowerCase()
to make sure we respect case sensitivity for path names.Ticket Link
https://mattermost.atlassian.net/browse/MM-54465