This repository was archived by the owner on Dec 6, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-17
lines changed Expand file tree Collapse file tree 4 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -51,16 +51,6 @@ This package lives in the npm index.
51
51
52
52
** Current builds are not working on Windows ([ #261 ] ( https://github.com/googlevr/vrview/issues/261 ) )**
53
53
54
- Relevant commands:
55
- ``` shell
56
- $ npm run build # builds the iframe embed and JS API (full and minified versions).
57
-
58
- # Building
59
-
60
- This project uses ` browserify` to manage dependencies and build. ` watchify` is
61
- especially convenient to preserve the write-and-reload model of development.
62
- This package lives in the npm index.
63
-
64
54
Relevant commands:
65
55
``` shell
66
56
$ npm run build # builds the iframe embed and JS API (full and minified versions).
@@ -77,3 +67,7 @@ $ npm run watch-api # auto-builds the JS API code whenever any source changes.
77
67
```
78
68
As of 2017/06/13, the pre-built js artifacts have been removed from source
79
69
control. You must run ` npm run build ` prior to trying any of the examples.
70
+
71
+ # Release Notes
72
+ ## 2.0.2
73
+ Close vulnerability with unsanitized user strings being injected into DOM
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vrview" ,
3
- "version" : " 2.0.1 " ,
3
+ "version" : " 2.0.2 " ,
4
4
"description" : " Embed VR content into your webpage." ,
5
5
"main" : " index.js" ,
6
6
"dependencies" : {
Original file line number Diff line number Diff line change @@ -300,16 +300,20 @@ function onRenderError(message) {
300
300
showError ( 'Render: ' + message ) ;
301
301
}
302
302
303
- function showError ( message , opt_title ) {
303
+ function showError ( message ) {
304
304
// Hide loading indicator.
305
305
loadIndicator . hide ( ) ;
306
306
307
+ // Sanitize `message` as it could contain user supplied
308
+ // values. Re-add the space character as to not modify the
309
+ // error messages used throughout the codebase.
310
+ message = encodeURI ( message ) . replace ( / % 2 0 / g, ' ' ) ;
311
+
307
312
var error = document . querySelector ( '#error' ) ;
308
313
error . classList . add ( 'visible' ) ;
309
314
error . querySelector ( '.message' ) . innerHTML = message ;
310
315
311
- var title = ( opt_title !== undefined ? opt_title : 'Error' ) ;
312
- error . querySelector ( '.title' ) . innerHTML = title ;
316
+ error . querySelector ( '.title' ) . innerHTML = 'Error' ;
313
317
}
314
318
315
319
function hideError ( ) {
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ function SceneInfo(opt_params) {
42
42
muted : opt_params . muted
43
43
} ;
44
44
45
- this . image = params . image ;
46
- this . preview = params . preview ;
47
- this . video = params . video ;
45
+ this . image = params . image !== undefined ? encodeURI ( params . image ) : undefined ;
46
+ this . preview = params . preview !== undefined ? encodeURI ( params . preview ) : undefined ;
47
+ this . video = params . video !== undefined ? encodeURI ( params . video ) : undefined ;
48
48
this . defaultYaw = THREE . Math . degToRad ( params . defaultYaw || 0 ) ;
49
49
50
50
this . isStereo = Util . parseBoolean ( params . isStereo ) ;
You can’t perform that action at this time.
0 commit comments