Skip to content

Commit 7961940

Browse files
committed
Check skin privacy before calling getTexture in _drawThese
Fixes a theoretical side channel where a private skin's getTexture() function could be easily timed (eg. using stamps) which could possibly leak information to the project. No known case where this would be even remotely possible.
1 parent f767199 commit 7961940

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/RenderWebGL.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,12 +2111,15 @@ class RenderWebGL extends EventEmitter {
21112111
drawable.scale[1] * opts.framebufferHeight / this._nativeSize[1]
21122112
] : drawable.scale;
21132113

2114-
// If the skin or texture isn't ready yet, skip it.
2115-
if (!drawable.skin || !drawable.skin.getTexture(drawableScale)) continue;
2114+
// Skip drawables with no skin.
2115+
if (!drawable.skin) continue;
21162116

21172117
// Skip private skins, if requested.
21182118
if (opts.skipPrivateSkins && drawable.skin.private) continue;
21192119

2120+
// Skip drawables with a skin that does not have a texture.
2121+
if (!drawable.skin.getTexture(drawableScale)) continue;
2122+
21202123
const uniforms = {};
21212124

21222125
let effectBits = drawable.enabledEffects;

0 commit comments

Comments
 (0)