node-wot icon indicating copy to clipboard operation
node-wot copied to clipboard

Url rewrite - validate input

Open danielpeintner opened this issue 2 years ago • 1 comments

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

danielpeintner avatar Sep 15 '22 09:09 danielpeintner