From: wbudic Date: Thu, 19 Aug 2021 08:39:39 +0000 (+1000) Subject: layout fixes. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=0c9b46a05a2110df5f22f7d0eb01988507383ea4;p=LifeLog.git layout fixes. --- diff --git a/htdocs/cgi-bin/json.cgi b/htdocs/cgi-bin/json.cgi index 82dfdab..5e3dddd 100755 --- a/htdocs/cgi-bin/json.cgi +++ b/htdocs/cgi-bin/json.cgi @@ -25,8 +25,6 @@ use Regexp::Common qw /URI/; use JSON; use IO::Compress::Gzip qw(gzip $GzipError); use Compress::Zlib; -use Crypt::Blowfish; -use Crypt::CBC; use lib "system/modules"; require Settings; @@ -102,9 +100,8 @@ sub processSubmit { my ($st, @arr); try { - if($action eq 'store'){ - - my $cipher = Crypt::CBC->new(-key => cryptKey(), -cipher => 'Blowfish'); + my $cipher = Settings::newCipher($passw); + if($action eq 'store'){ $doc = qq({ "lid": "$lid", "bg": "$bg", @@ -137,11 +134,7 @@ sub processSubmit { @arr = Settings::selectRecords($db,"SELECT DOC FROM NOTES WHERE LID = '0';")->fetchrow_array(); } $doc = $arr[0]; - - my $d = uncompress($doc); - my $cipher = Crypt::CBC->new(-key => cryptKey(), -cipher => 'Blowfish'); - $doc = $cipher->decrypt($d); - + $doc = $cipher->decrypt(uncompress($doc)); # print $cgi->header( -expires => "+0s", -charset => "UTF-8" ); # print($doc); # exit; diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index 8e6c23f..387d591 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -744,9 +744,9 @@ if ( $log_rc == 0 ) { } else { if ($isInViewMode) { - if($prm_rtf){$log_output .= 'No RTF records found matching criteria.'} - else {$log_output .= 'You have reached the end of the data view!'} - }else{ $log_output .= 'Database is New or Empty!'} + if($prm_rtf){$log_output .= 'No RTF records found matching criteria.'} + else {$log_output .= 'You have reached the end of the data view!'} + }else{ $log_output .= 'Database is New or Empty!'} } } if($isPUBViewMode){ @@ -1276,7 +1276,7 @@ my $dbg = qq(--DEBUG OUTPUT--\n } else { my $v = "You Are In ➔ $vmode"; - $log_output .= qq($vTop    ); + $log_output .= qq($vTop    ); }