Closed m33x closed 8 months ago
That's not a bug.
So this is a won't fix, I assume? Would you merge it, if I create a PR?
So this is a won't fix, I assume? Would you merge it, if I create a PR?
PR for what? Using window.location.origin again would undo the other PR wich helps a lot of people.
A PR with window.location.origin, this fixes my issues, and does not break anything for people using window.location.protocol and window.location.hostname. If at all, it makes their version even better and more complete.
I have tested the new version. This fixes the problem. Thanks!
Thanks goes to you!
Bug report
Describe the bug
If AWTRIX Light is not served on port 80 (HTTP) or port 443 (HTTPS), the web interface does not work as certain resources like
DoNotTouch.json
cannot be reached.Additional information
To Reproduce
Steps to reproduce the behavior:
Serve AWTRIX Light on a different port than 80
ssh home -L 127.0.0.1:1338:192.168.2.3:80
Visit the web interface of AWTRIX Light in your browser
firefox http://localhost:1338
Expected behavior
The web interface loads as expected.
Screenshots
Logs
Additional context
Affected are:
Potential fix is using window.location.origin
Is the current code potentially exploitable and a XSS vulnerability? Unsure, but likely not.