Skip to content
Snippets Groups Projects
Commit bdc503b0 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #14295 from owncloud/encode-request-token-for-avatars

Encode Requesttoken for avatars
parents 7cd3f17d 0ea6de2f
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ function showAvatarCropper () {
var $cropperImage = $('#cropper img');
$cropperImage.attr('src',
OC.generateUrl('/avatar/tmp') + '?requesttoken=' + oc_requesttoken + '#' + Math.floor(Math.random() * 1000));
OC.generateUrl('/avatar/tmp') + '?requesttoken=' + encodeURIComponent(oc_requesttoken) + '#' + Math.floor(Math.random() * 1000));
// Looks weird, but on('load', ...) doesn't work in IE8
$cropperImage.ready(function () {
......@@ -311,7 +311,7 @@ $(document).ready(function () {
var url = OC.generateUrl(
'/avatar/{user}/{size}',
{user: OC.currentUser, size: 1}
) + '?requesttoken=' + oc_requesttoken;
) + '?requesttoken=' + encodeURIComponent(oc_requesttoken);
$.get(url, function (result) {
if (typeof(result) === 'object') {
$('#removeavatar').hide();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment