Skip to content

Commit

Permalink
Bugfix data url iframe src generation not being origin-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Avaer Kazmer committed Sep 19, 2019
1 parent 5a0c1bf commit 8af57a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WindowVm.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WorkerVm extends EventTarget {
.then(followUrl => new Promise((accept, reject) => {
const src = window.location.origin +
(options.args.options.url.startsWith('data:') ?
`${window.location.origin}/xr-engine-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)}.html`
`/xr-engine-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)}.html`
:
options.args.options.url.replace(/^[a-z]+:\/\/[a-zA-Z0-9\-\.]+(?::[0-9]+)?/, ''));
const dst = `\
Expand Down

0 comments on commit 8af57a7

Please sign in to comment.