js domain using dash (-) bug

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

Moderator: hvxl

Post Reply
base
Starting Member
Starting Member
Posts: 1
Joined: Sun Jan 15, 2017 9:36 pm

js domain using dash (-) bug

Post by base »

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
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: js domain using dash (-) bug

Post by hvxl »

Correct, although you missed a few spots. See this topic.
Schelte
Post Reply

Return to “Opentherm Gateway Forum”