Interactions-HSG / yggdrasil

A framework for programming distributed hypermedia environments for autonomous agents.
https://interactions-hsg.github.io/yggdrasil/
Apache License 2.0
7 stars 8 forks source link

Fix: missing WebID header check bypass #27

Closed cake-lier closed 11 months ago

cake-lier commented 11 months ago

As correctly pointed out in issue #24, when the WebID header is missing from a request, the correct status code is returned, but what should be stopped from doing is still executed. The problem is a missing "return" statement in each check for the WebID header. Since it's absent, the "fail" call sets the routing context to a fail state where the next handler executed is a failure handler, but the current handler is not stopped from running. No actual exception is thrown after calling the "fail" method.

Closes #24