]> source.dussan.org Git - nextcloud-server.git/commitdiff
Encode requesttoken
authorLukas Reschke <lukas@owncloud.com>
Mon, 16 Feb 2015 19:28:30 +0000 (20:28 +0100)
committerLukas Reschke <lukas@owncloud.com>
Mon, 16 Feb 2015 19:28:30 +0000 (20:28 +0100)
One cannot make any assumptions about the requesttoken content. Thus we need to encode it.

core/js/eventsource.js

index 6f23cebb685a3f517aec787e9d34267889c8d2f4..d1cdfda485e36061eb4efffe747b35002b8188bc 100644 (file)
@@ -49,7 +49,7 @@ OC.EventSource=function(src,data){
                        dataStr+=name+'='+encodeURIComponent(data[name])+'&';
                }
        }
-       dataStr+='requesttoken='+oc_requesttoken;
+       dataStr+='requesttoken='+encodeURIComponent(oc_requesttoken);
        if(!this.useFallBack && typeof EventSource !== 'undefined'){
                joinChar = '&';
                if(src.indexOf('?') === -1) {