From 7d3618a48063201a0c91d70241b7e5cb355808c0 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Mon, 18 Aug 2014 22:23:46 +0300 Subject: [PATCH] Fixed bug where deleting a device doesn't work if device ID contains URL encoded characters. --- lib/nbi.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nbi.coffee b/lib/nbi.coffee index abd0ff8..c7490aa 100644 --- a/lib/nbi.coffee +++ b/lib/nbi.coffee @@ -316,7 +316,7 @@ listener = (request, response) -> response.end('405 Method Not Allowed') return - deviceId = DELETE_DEVICE_REGEX.exec(urlParts.pathname)[1] + deviceId = querystring.unescape(DELETE_DEVICE_REGEX.exec(urlParts.pathname)[1]) apiFunctions.deleteDevice(deviceId, (err) -> if err response.writeHead(500)