From d3f5bb478f482110059356ff7824e89f2c66db59 Mon Sep 17 00:00:00 2001 From: "H.Plato" Date: Tue, 21 Mar 2017 18:52:21 -0600 Subject: [PATCH 1/2] IA7 v1.3.620 - fixed password parsing to allow a ! --- lib/http_server.pl | 4 ++-- web/ia7/house/main.shtml | 2 +- web/ia7/include/javascript.js | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/http_server.pl b/lib/http_server.pl index 549e02b46..0b674bf19 100644 --- a/lib/http_server.pl +++ b/lib/http_server.pl @@ -328,13 +328,13 @@ sub http_process_request { $Http{'Content-Length'} || $Http{'Content-length'} || $Http{'content-length'}; # Netscape uses lower case l - print "http POST query has $cl bytes of args\n"; # if $main::Debug{http}; + print "http POST query has $cl bytes of args\n" if $main::Debug{http}; my $buf; read $socket, $buf, $cl; # Save the body into the global var $HTTP_BODY = $buf; - print "http POST buf=$buf get_arg=$get_arg\n" if $main::Debug{http}; + print "http POST buf=$buf get_arg=$get_arg\n";# if $main::Debug{http}; # This is a bad practice to merge the body and arguments together as the # body may not always contain an argument string. It may contain JSON diff --git a/web/ia7/house/main.shtml b/web/ia7/house/main.shtml index f06676d43..bedabfbb0 100644 --- a/web/ia7/house/main.shtml +++ b/web/ia7/house/main.shtml @@ -82,7 +82,7 @@

MisterHouse was created by Bruce Winter. Ron Klinkien developed the v2.3 web interface. Kevin Robert Keegan - designed the v4 web prototype, updates by H.Plato. IA7 v1.3.610 Font Awesome by Dave Gandy - http://fontawesome.io

+ designed the v4 web prototype, updates by H.Plato. IA7 v1.3.620 Font Awesome by Dave Gandy - http://fontawesome.io

diff --git a/web/ia7/include/javascript.js b/web/ia7/include/javascript.js index 9c5526017..961cc4dde 100644 --- a/web/ia7/include/javascript.js +++ b/web/ia7/include/javascript.js @@ -2746,11 +2746,13 @@ var authorize_modal = function(user) { }); $('#LoginModalpw').submit( function (e) { e.preventDefault(); - //console.log("Custom submit function"); + var encoded_data = $(this).serialize(); + encoded_data = encoded_data.replace(/\!/g,"%21"); //for some reason serialize doesn't encode a !... + //console.log("Custom submit function: "+$(this).serialize()+" "+encoded_data); $.ajax({ type: "POST", url: "/SET_PASSWORD_FORM", - data: $(this).serialize(), + data: encoded_data, success: function(data){ var status=data.match(/\(.*)\<\/b\>/gm); //console.log("match="+status[2]); //3rd match is password status From d627f4c453aec8164ba49b5db1f1b17f0acab11b Mon Sep 17 00:00:00 2001 From: "H.Plato" Date: Tue, 21 Mar 2017 18:55:02 -0600 Subject: [PATCH 2/2] remove a debug statement --- lib/http_server.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http_server.pl b/lib/http_server.pl index 0b674bf19..f3a126bde 100644 --- a/lib/http_server.pl +++ b/lib/http_server.pl @@ -334,7 +334,7 @@ sub http_process_request { # Save the body into the global var $HTTP_BODY = $buf; - print "http POST buf=$buf get_arg=$get_arg\n";# if $main::Debug{http}; + print "http POST buf=$buf get_arg=$get_arg\n" if $main::Debug{http}; # This is a bad practice to merge the body and arguments together as the # body may not always contain an argument string. It may contain JSON