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

Add using casing check/fix for initMountPoints #26398

Merged
merged 2 commits into from
Oct 19, 2016

Conversation

PVince81
Copy link
Contributor

Forward port of #26271 to master.

Please review the master-specific changes in AvatarManager and AvatarManagerTest, this is because the logic changed now that the avatars are stored elsewhere. However the user casing logic must still be used here.

@jvillafanez @DeepDiver1975

@PVince81 PVince81 added this to the 9.2 milestone Oct 18, 2016
@mention-bot
Copy link

@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @DeepDiver1975, @icewind1991 and @schiessle to be potential reviewers.

@@ -84,6 +84,8 @@ public function getAvatar($userId) {
throw new \Exception('user does not exist');
}

$userId = $user->getUID();
Copy link
Member

Choose a reason for hiding this comment

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

This is the only function I see with this change in this file. Is there any other function that would need this, specially the ones accepting user ids?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, you're right. I see that getAvatarFolder is public too, so it would be safer to add the same check there.
Nice catch!

@PVince81
Copy link
Contributor Author

@jvillafanez I simply changed getAvatarFolder to take a IUser object instead of $userId: 64252f7
Note that I can't change getAvatar() here because it's on the old public API so it needs to stay.

This is to make sure we don't get into user id casing issues.
@PVince81 PVince81 force-pushed the initmountpoints-userid-casing branch from 64252f7 to 97669c5 Compare October 19, 2016 08:21
@jvillafanez
Copy link
Member

What about backwards compatibility with the previous avatar files? Is it taken into account? if not, is it worthy? I mean, the easy workaround / fix should be reupload the avatar...

@PVince81
Copy link
Contributor Author

@jvillafanez the previous avatar files are migrated to the new format, so there is no backward compatibility needed.

@jvillafanez
Copy link
Member

Looks good 👍

@PVince81
Copy link
Contributor Author

Tests passed, unpublished due to API rate limit => merge

@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants