mgmt: Allow only canonical FaceUri in faces/create command

refs #1910

Change-Id: I89a84cd8584d5a718bcc85db05cc337b4b4f8f73
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 6a7bb1e..f5d849b 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -957,6 +957,13 @@
       return;
     }
 
+  if (!uri.isCanonical())
+    {
+      sendResponse(requestName, 400, "Non-canonical URI");
+      NFD_LOG_TRACE("received non-canonical URI");
+      return;
+    }
+
   FactoryMap::iterator factory = m_factories.find(uri.getScheme());
   if (factory == m_factories.end())
     {