Skip to content

Commit 9888613

Browse files
committed
Merge pull request #140 from nidhimj22/emulator
Sanitize worker uuid
2 parents b3248f8 + 9de24d1 commit 9888613

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ exports.Server = function Server(bsClient, workers) {
223223
query = parseBody(body);
224224
} catch (e) {}
225225
var uuid = request.headers['x-worker-uuid'];
226+
uuid = uuid && uuid.replace(/[^a-zA-Z0-9\-]/, '');
226227
var worker = workers[uuid] || {};
227228
worker._worker_key = uuid;
228229

0 commit comments

Comments
 (0)