node-wot
node-wot copied to clipboard
Url rewrite - validate input
I noticed this comment from @egekorkan :
Option 1 is not bad but we have to make sure that only relative URLs are used since the host part of the URL comes from the servient and not from the binding (which manages the forms href). There was previously a discussion about this at https://github.com/eclipse/thingweb.node-wot/issues/632 . I propose to keep only one issue and move the comments from to the other.
I think that the PR missing the validation side. In my understanding, it is possible to write something like { "/properties/test" : "http://hello.com/test" }
, which is something not desirable. Should we validate both In URI and out URI to be relative references? Maybe we can do this in a future PR.
Originally posted by @relu91 in https://github.com/eclipse/thingweb.node-wot/issues/810#issuecomment-1247832346