Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
wok-plugins-kimchi
0001-fix-vnc-urlencode.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-fix-vnc-urlencode.patch of Package wok-plugins-kimchi
diff --git a/ui/js/src/kimchi.api.js b/ui/js/src/kimchi.api.js index 0cacab3a..20a6544f 100644 --- a/ui/js/src/kimchi.api.js +++ b/ui/js/src/kimchi.api.js @@ -320,13 +320,15 @@ var kimchi = { type : "POST", dataType : "json" }).done(function() { + var path = server_root + "/websockify"; + path += "?token=" + wok.urlSafeB64Encode(vm+'-console').replace(/=*$/g, ""); + path += '&encrypt=1'; + url = 'https://' + location.hostname + ':' + proxy_port; url += server_root; url += "/plugins/kimchi/serial/html/serial.html"; url += "?port=" + proxy_port; - url += "&path=" + server_root + "/websockify"; - url += "?token=" + wok.urlSafeB64Encode(vm+'-console').replace(/=*$/g, ""); - url += '&encrypt=1'; + url += "&path=" + encodeURIComponent(path); window.open(url); }).error(function(data) { wok.message.error(data.responseJSON.reason); @@ -344,11 +346,7 @@ var kimchi = { type : "POST", dataType : "json" }).done(function() { - url = 'https://' + location.hostname + ':' + proxy_port; - url += server_root; - url += "/plugins/kimchi/novnc/vnc_auto.html"; - url += "?port=" + proxy_port; - url += "&path=" + server_root + "/websockify"; + var path = server_root + "/websockify"; /* * From python documentation base64.urlsafe_b64encode(s) * substitutes - instead of + and _ instead of / in the @@ -356,8 +354,14 @@ var kimchi = { * contain = which is not safe in a URL query component. * So remove it when needed as base64 can work well without it. * */ - url += "?token=" + wok.urlSafeB64Encode(vm).replace(/=*$/g, ""); - url += '&encrypt=1'; + path += "?token=" + wok.urlSafeB64Encode(vm).replace(/=*$/g, ""); + path += '&encrypt=1'; + + url = 'https://' + location.hostname + ':' + proxy_port; + url += server_root; + url += "/plugins/kimchi/novnc/vnc_auto.html"; + url += "?port=" + proxy_port; + url += "&path=" + encodeURIComponent(path); window.open(url); }); },
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor