Skip to content

Commit 57c94d4

Browse files
committed
- Fixed: hardware setup, passwords containing specials characters
- Fixed: devices tab, adding device with names containing specials characters
1 parent 57655e9 commit 57c94d4

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

History.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Version 2.0.xxxx (xxxx 2015)
5757
- Changed: Moved curl folder to windows libraries folder (windows compiler, download the new WindowsLibraries.zip)
5858
- Implemented: 'Custom HTTP' notification system
5959
- Implemented: notifications, option to send to specific systems
60+
- Fixed: hardware setup, passwords containing specials characters
61+
- Fixed: devices tab, adding device with names containing specials characters
6062

6163
Version 2.0.2284 (February 22th 2015)
6264
- Fixed: Firefox, RGBW/Setpoint popup

www/app/DevicesController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ define(['app'], function (app) {
398398
if ( bValid ) {
399399
$( this ).dialog( "close" );
400400
$.ajax({
401-
url: "json.htm?type=setused&idx=" + $.devIdx + '&name=' + $("#dialog-adddevice #devicename").val() + '&used=true',
401+
url: "json.htm?type=setused&idx=" + $.devIdx + '&name=' + encodeURIComponent($("#dialog-adddevice #devicename").val()) + '&used=true',
402402
async: false,
403403
dataType: 'json',
404404
success: function(data) {
@@ -438,7 +438,7 @@ define(['app'], function (app) {
438438
if ( bValid ) {
439439
$( this ).dialog( "close" );
440440
$.ajax({
441-
url: "json.htm?type=setused&idx=" + $.devIdx + '&name=' + $("#dialog-addlightdevicedev #devicename").val() + '&used=true&maindeviceidx=' + MainDeviceIdx,
441+
url: "json.htm?type=setused&idx=" + $.devIdx + '&name=' + encodeURIComponent($("#dialog-addlightdevicedev #devicename").val()) + '&used=true&maindeviceidx=' + MainDeviceIdx,
442442
async: false,
443443
dataType: 'json',
444444
success: function(data) {

www/app/HardwareController.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ define(['app'], function (app) {
143143
ShowNotify($.t('Please enter an Valid Port!'), 2500, true);
144144
return;
145145
}
146-
var password=$("#hardwarecontent #divlogin #password").val();
146+
var password=encodeURIComponent($("#hardwarecontent #divlogin #password").val());
147147
$.ajax({
148148
url: "json.htm?type=command&param=updatehardware&htype=" + hardwaretype +
149149
"&address=" + address +
@@ -184,7 +184,7 @@ define(['app'], function (app) {
184184
return;
185185
}
186186
var username=$("#hardwarecontent #divlogin #username").val();
187-
var password=$("#hardwarecontent #divlogin #password").val();
187+
var password=encodeURIComponent($("#hardwarecontent #divlogin #password").val());
188188
$.ajax({
189189
url: "json.htm?type=command&param=updatehardware&htype=" + hardwaretype +
190190
"&address=" + address +
@@ -314,7 +314,7 @@ define(['app'], function (app) {
314314
}
315315
else if ((text.indexOf("ICY") >= 0) || (text.indexOf("Toon") >= 0) || (text.indexOf("PVOutput") >= 0)) {
316316
var username = $("#hardwarecontent #divlogin #username").val();
317-
var password = $("#hardwarecontent #divlogin #password").val();
317+
var password = encodeURIComponent($("#hardwarecontent #divlogin #password").val());
318318
$.ajax({
319319
url: "json.htm?type=command&param=updatehardware&htype=" + hardwaretype +
320320
"&port=1" +
@@ -445,7 +445,7 @@ define(['app'], function (app) {
445445
ShowNotify($.t('Please enter an Valid Port!'), 2500, true);
446446
return;
447447
}
448-
var password=$("#hardwarecontent #divlogin #password").val();
448+
var password=encodeURIComponent($("#hardwarecontent #divlogin #password").val());
449449
$.ajax({
450450
url: "json.htm?type=command&param=addhardware&htype=" + hardwaretype + "&address=" + address + "&port=" + port + "&name=" + name + "&password=" + password + "&enabled=" + bEnabled + "&datatimeout=" + datatimeout,
451451
async: false,
@@ -515,7 +515,7 @@ define(['app'], function (app) {
515515
return;
516516
}
517517
var username=$("#hardwarecontent #divlogin #username").val();
518-
var password = $("#hardwarecontent #divlogin #password").val();
518+
var password = encodeURIComponent($("#hardwarecontent #divlogin #password").val());
519519

520520
if ((text.indexOf("Harmony") >= 0) && (username == "")) {
521521
ShowNotify($.t('Please enter a username!'), 2500, true);
@@ -593,7 +593,7 @@ define(['app'], function (app) {
593593
else if ((text.indexOf("ICY") >= 0)||(text.indexOf("Toon") >= 0)||(text.indexOf("PVOutput") >= 0))
594594
{
595595
var username=$("#hardwarecontent #divlogin #username").val();
596-
var password=$("#hardwarecontent #divlogin #password").val();
596+
var password=encodeURIComponent($("#hardwarecontent #divlogin #password").val());
597597
$.ajax({
598598
url: "json.htm?type=command&param=addhardware&htype=" + hardwaretype +
599599
"&port=1" +

www/html5.appcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# ref 852
2+
# ref 856
33

44
CACHE:
55
# CSS

0 commit comments

Comments
 (0)