Skip to content

Commit 9de24d1

Browse files
committed
Temporary Fix: Sanitie worker id
Some android browsers send a request with a '\' character prefixed to every '&', which causes the uuid to end with a '\'.
1 parent b3248f8 commit 9de24d1

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)