From fa6a00ebd3542574c87a6d333babbaf1c6a146c9 Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Tue, 9 Jan 2024 19:55:16 +0100 Subject: [PATCH] =?UTF-8?q?Correctly=20calls=20=E2=80=9Csubmit=E2=80=9D=20?= =?UTF-8?q?where=20it=20didn=E2=80=99t;=20fixed=20a=20flaw;=20bumped=20ver?= =?UTF-8?q?sion=20to=200.3.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 3f3cfb5..d79bd15 100644 --- a/index.php +++ b/index.php @@ -31,7 +31,7 @@ require 'lib/ght.php'; require 'lib/booltostr.php'; const SNAME='Verbose'; -const SVERS='0.3.5'; +const SVERS='0.3.6'; const SREPO='https://git.lattuga.net/pongrebio/verbose'; const DEFAC=500; const MINAC=100; @@ -80,7 +80,7 @@ $debug.='CONF: '.preprint($conf)."
\n"; $coopts=[ 'expires'=>$now+365*24*60*60, - 'path'=>preg_replace('#[^/]+$#','',$_SERVER['REQUEST_URI']), + 'path'=>preg_replace('#[^/]+$#','',$_SERVER['REQUEST_URI']), 'domain'=>$_SERVER['SERVER_NAME'], 'secure'=>false, 'httponly'=>false, @@ -142,7 +142,7 @@ if (isset($_GET['code']) && isset($_COOKIE['verbose_host']) && isset($_COOKIE['v header('Location: '.$location,true,302); else echo "".htmlentities($location)."
\n"; - exit(0); + exit(0); } else { $authmsgs.='
Sorry, there was an error trying to authorize you: '.htmlentities($res['error'])."
\n"; } @@ -174,7 +174,7 @@ if ($host!==false && $token!==false && trim($token)!='') {// trim($token)!='' is setcookie('verbose_token',$token,$coopts); $myacc=$myacc['data']; $loggedin=true; - if ($_POST['round']==0 || $_POST['act']=='login') { + if ($_POST['round']==0 || (isset($_POST['act']) && $_POST['act']=='login')) { $res=mastget($host,$token,'/api/v1/instance',$timeout); if ($res['ok'] && isset($res['data']['configuration']['statuses']['max_characters']) && preg_match('#^\d+$#',$res['data']['configuration']['statuses']['max_characters'])===1) { $avchars=$res['data']['configuration']['statuses']['max_characters']+0; @@ -714,7 +714,7 @@ function ckf() { if (i==len-1) sep='.'; msg+='
  • '+msgs[i]+sep+'
  • '; } - pmsg.innerHTML=msg+'

     

    Do you want to continue?

     

    '; + pmsg.innerHTML=msg+'

     

    Do you want to continue?

     

    '; swpdisp('popup','none','flex'); return false; } else {