ONEDC/obix — pull request #71 by Qingtao-Cao (2014-10-14 05:50:09+00:00)
Title: Perform basic sanity checks in signUp handler

This fixes Issue#69 recorded in the oBIX github repo. The root cause is
that if the href in the signUp device is an empty string, dirname returns
"." and such string should NOT be freed by the application or otherwise
it segfaults.

Before any node is added to the global DOM tree, sanity checks should have
been properly done on its href. Furthermore, as for the signUp handler, all
devices should go to the device lobby.

Valgrind tests passed when trying to sign up a device with following
invalid hrefs:
. ""
. " " or "	"
. "." or ". " or ".."
. "/"
. "//"
. "/."
. "/obix/outsideofdevicelobby"

Instead of segfaults, oBIX server return an error contract gracefully.