You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Escape js parser protocol error characters
This commit is contained in:
@@ -137,7 +137,7 @@ JavascriptReplyParser.prototype.run = function (buffer) {
|
||||
if (this._type !== undefined && this._protocol_error === true) {
|
||||
// Reset the buffer so the parser can handle following commands properly
|
||||
this._buffer = new Buffer(0);
|
||||
this.send_error(new Error('Protocol error, got "' + String.fromCharCode(this._type) + '" as reply type byte'));
|
||||
this.send_error(new Error('Protocol error, got ' + JSON.stringify(String.fromCharCode(this._type)) + ' as reply type byte'));
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user