neilenns / node-deepstackai-trigger

Detects motion using Deepstack AI and calls registered triggers based on trigger rules.
MIT License
167 stars 28 forks source link

Fix url mustache render test #387

Closed TonyBrobston closed 4 years ago

TonyBrobston commented 4 years ago

Fixes https://github.com/danecreekphotography/node-deepstackai-trigger/issues/371

Description of changes

When I have a secret with a uri in it, it has problems. Here is what the log shows:

trigger_1 | 2020-10-27T10:16:49-05:00 [Trigger House East Cat/Dog detector] Error: Failed to call DeepStack at http://deepstack-ai:5000/: Error: Invalid URI "http:///&/v1/vision/detection"

I wrote a test that I think identifies the issue. However I may be wrong. Essentially http://127.0.0.1:5000/ becomes http://127.0.0.1:5000/ and that seems to be a problem. I'm not sure why this would be a problem.

On a side note, when my secret is a username or password it seems to work fine; also note my usernames and passwords do not have special characters in it.

Checklist

TonyBrobston commented 4 years ago

Alright, sounds like {{}} is html encoded and {{{}}} is not; that appears to be the issue which is proven by a passing test.