eclipse-thingweb / eclipse-thingweb/node-wot

isThingModel is too permissive

Open
#880 2 comments 0 reactions 0 assignees View on GitHub
td-tools thing-model
Dominant language
TypeScript
Stars
192
Forks
100
Avg merge
3d 2h
Merged PRs (30d)
6

Description

There is a function called isThingModel in the td-tools package at https://github.com/eclipse/thingweb.node-wot/blob/master/packages/td-tools/src/thing-model-helpers.ts#L91

There are a couple of if conditions after line 107 that can result in a document recognized as a TM even if the document does not have `tm:thingModel` in the `@type`. I do not understand why those checks are added but if I am not wrong, everything after line 107 should be deleted and an `else` should be added instead that returns false.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.