dyne / restroom-mw

🛠 Easy REST API builder executing Zencode
https://restroom.dyne.org
GNU Affero General Public License v3.0
3 stars 11 forks source link

"Given nothing" breaks Restroom-mw script, possible collisions. #237

Closed andrea-dintino closed 1 year ago

andrea-dintino commented 1 year ago

Problem: At the moment, Restroom-mw passes the http headers as input to Zenroom by default. This causes the issues

Possible solution:

puria commented 1 year ago

@andrea-dintino ACK will look at it as soon as I can...

jaromil commented 1 year ago

http_request is passed to HEAP by restroom-mw hence breaking given nothing

zenroom's statement given nothing should check for rule ignore restroom-mw in stack and if present ignore the http_request when checking input

restroom-mw should make sure that rule ignore restroom-mw is always present at beginning of stack before calling zenroom

matteo-cristino commented 1 year ago

Fixed in 69dae1df2b90346c016aadea221fdd63d86ba2fb

jaromil commented 1 year ago

Can we please update apiroom to include this fix?