js domain using dash (-) bug

This Forum is about the Opentherm gateway (OTG) from Schelte

Moderator: hvxl

js domain using dash (-) bug

Postby base » Sun Jan 15, 2017 8:48 pm

I am running otmonitor daemon with a .nl domain with a dash ("-") in it, message.js and status.js fail, wsurl regexp returns null resulting in errors like "The URL 'wsnullmessage.ws' is invalid.",

var wsurl = "ws" + document.URL.match("s?://[a-z0-9.:/]+/") + "message.ws"
should be
var wsurl = "ws" + document.URL.match("s?://[a-z0-9.:/\-]+/") + "message.ws"

in docroot/message.js and status.js
Starting Member
Starting Member
Posts: 1
Joined: January 2017

Re: js domain using dash (-) bug

Postby hvxl » Sun Jan 15, 2017 10:04 pm

Correct, although you missed a few spots. See this topic.
Senior Member
Senior Member
Posts: 1303
Joined: June 2010

Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest