From f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Fri, 8 Mar 2019 21:20:34 +0100 Subject: további rendrakás --- .../www/policy/public/auth/forgotten-pre.php | 92 ------------------ mayor-orig/www/policy/public/auth/forgotten.php | 16 ---- mayor-orig/www/policy/public/auth/login-pre.php | 86 ----------------- mayor-orig/www/policy/public/auth/login.php | 17 ---- mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php | 48 ---------- mayor-orig/www/policy/public/naplo/rpc/rpc.php | 7 -- .../public/password/changeMyPassword-pre.php | 72 -------------- .../policy/public/password/changeMyPassword.php | 9 -- .../policy/public/password/resetPassword-pre.php | 68 -------------- .../www/policy/public/password/resetPassword.php | 9 -- .../www/policy/public/portal/portal/hir-pre.php | 24 ----- mayor-orig/www/policy/public/portal/portal/hir.php | 11 --- .../www/policy/public/portal/portal/portal-pre.php | 37 -------- .../www/policy/public/portal/portal/portal.php | 37 -------- .../public/portal/portal/portal_demo.classic.php | 43 --------- .../public/portal/portal/portal_demo.pda.php | 29 ------ .../www/policy/public/portal/rpc/rpc-pre.php | 104 --------------------- mayor-orig/www/policy/public/portal/start.php | 0 mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php | 70 -------------- mayor-orig/www/policy/public/rpc/rpc-pre.php | 43 --------- .../www/policy/public/session/logout-pre.php | 29 ------ mayor-orig/www/policy/public/session/set-pre.php | 10 -- 22 files changed, 861 deletions(-) delete mode 100644 mayor-orig/www/policy/public/auth/forgotten-pre.php delete mode 100644 mayor-orig/www/policy/public/auth/forgotten.php delete mode 100644 mayor-orig/www/policy/public/auth/login-pre.php delete mode 100644 mayor-orig/www/policy/public/auth/login.php delete mode 100644 mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php delete mode 100644 mayor-orig/www/policy/public/naplo/rpc/rpc.php delete mode 100644 mayor-orig/www/policy/public/password/changeMyPassword-pre.php delete mode 100644 mayor-orig/www/policy/public/password/changeMyPassword.php delete mode 100644 mayor-orig/www/policy/public/password/resetPassword-pre.php delete mode 100644 mayor-orig/www/policy/public/password/resetPassword.php delete mode 100644 mayor-orig/www/policy/public/portal/portal/hir-pre.php delete mode 100644 mayor-orig/www/policy/public/portal/portal/hir.php delete mode 100644 mayor-orig/www/policy/public/portal/portal/portal-pre.php delete mode 100644 mayor-orig/www/policy/public/portal/portal/portal.php delete mode 100644 mayor-orig/www/policy/public/portal/portal/portal_demo.classic.php delete mode 100644 mayor-orig/www/policy/public/portal/portal/portal_demo.pda.php delete mode 100644 mayor-orig/www/policy/public/portal/rpc/rpc-pre.php delete mode 100644 mayor-orig/www/policy/public/portal/start.php delete mode 100644 mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php delete mode 100644 mayor-orig/www/policy/public/rpc/rpc-pre.php delete mode 100644 mayor-orig/www/policy/public/session/logout-pre.php delete mode 100644 mayor-orig/www/policy/public/session/set-pre.php (limited to 'mayor-orig/www/policy/public') diff --git a/mayor-orig/www/policy/public/auth/forgotten-pre.php b/mayor-orig/www/policy/public/auth/forgotten-pre.php deleted file mode 100644 index 76ffaebb..00000000 --- a/mayor-orig/www/policy/public/auth/forgotten-pre.php +++ /dev/null @@ -1,92 +0,0 @@ - $ADAT['toPolicy'], - 'userAccount' => $ADAT['accounts'][$i]['userAccount'][0], - 'userCn' => $ADAT['accounts'][$i]['userCn'][0], - 'mail' => current(explode(' ',str_replace(';',' ',trim($ADAT['accounts'][$i]['mail'][0])))), - ); - break; - } - } - } elseif (isset($ADAT['mail'])) { - $ADAT['accounts'] = searchAccount('mail', $ADAT['mail'], $searchAttrs = array('userCn','mail','userAccount'), $ADAT['toPolicy']); - for ($i=0; $i<$ADAT['accounts']['count']; $i++) { - if ($ADAT['mail'] == $ADAT['accounts'][$i]['mail'][0] && $ADAT['accounts'][$i]['mail'][0] != '') { - $ADAT['account'] = array( - 'policy' => $ADAT['toPolicy'], - 'userAccount' => $ADAT['accounts'][$i]['userAccount'][0], - 'userCn' => $ADAT['accounts'][$i]['userCn'][0], - 'mail' => current(explode(' ',str_replace(';',' ',trim($ADAT['accounts'][$i]['mail'][0])))), - ); - break; - } - } - } - - // Recovery - if (is_array($ADAT['account'])) { - $recoveryRequest = generatePasswordRecoveryRequest($ADAT['account']); - if ($recoveryRequest!=false) { - $ADAT['account']['url'] = $recoveryRequest; - // levél generálása és kiküldése - $body = '
Az alábbi linkre kattintva magadhatod az új MaYoR-jelszavadat.
-Ha nem te küldted az igénylést, tekintsd a levelet tárgytalannak!
-'.$recoveryRequest.'
-'.__SUPPORT_EMAIL_NAME.' ('.__SUPPORT_EMAIL_ADDRESS.')
-'; - /* MAIL */ - if (__EMAIL_ENABLED===true) { - $mail = new PHPMailer(); - $mail->CharSet = 'UTF-8'; - $mail->SetFrom(__SUPPORT_EMAIL_ADDRESS,__SUPPORT_EMAIL_NAME); - $mail->AddAddress($ADAT['account']['mail'], $ADAT['account']['userCn']); - $mail->Subject = "[MaYoR] Jelszóemlékeztető"; - $mail->MsgHTML($body); - $mail->Send(); - } else { - //dump(__EMAIL_ENABLED); - //dump(__SUPPORT_EMAIL_ADDRESS); - //dump(__SUPPORT_EMAIL_NAME); - } - /* -- */ -// $_SESSION['alert'][] = 'info:success'; - } else { -// $_SESSION['alert'][] = 'info:success'; // nem üzenünk hibát - } - } else { -// $_SESSION['alert'][] = 'message:wrong_data:Nincs ilyen azonosító, vagy nincs rögzítve e-mail cím az azonosítóhoz! ('.$ADAT['userAccount'].')'; - } - - } - -?> \ No newline at end of file diff --git a/mayor-orig/www/policy/public/auth/forgotten.php b/mayor-orig/www/policy/public/auth/forgotten.php deleted file mode 100644 index bd751c83..00000000 --- a/mayor-orig/www/policy/public/auth/forgotten.php +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/mayor-orig/www/policy/public/auth/login-pre.php b/mayor-orig/www/policy/public/auth/login-pre.php deleted file mode 100644 index c524751f..00000000 --- a/mayor-orig/www/policy/public/auth/login-pre.php +++ /dev/null @@ -1,86 +0,0 @@ - $userAccount, 'password' => $userPassword, 'policy' => $toPolicy, 'skin'=>$toSkin); - if ($sessionID != '') $accountInformation['sessionID'] = $sessionID; - - if ($userAccount != '' and $userPassword != '') { - - $result = userAuthentication($userAccount, $userPassword, $accountInformation, $toPolicy); // ??? toPolicy benne van az AccountInformation-ben!!! Ldap backend only? - logLogin($toPolicy, $userAccount, $result); - if ($result === _AUTH_SUCCESS) { - $sessionID = newSession($accountInformation, $toPolicy); - if ($toSkin == '') $toSkin = $skin; - header('Location: '.location("index.php?page=$toPage&sub=$toSub&f=$toF&sessionID=$sessionID&policy=$toPolicy&lang=$lang&skin=$toSkin", array('alertOLD'))); - } elseif ($result === _AUTH_EXPIRED) { - $_SESSION['alert'][] = 'message:force_pw_update'; - header('Location: '.location("index.php?policy=public&page=password&f=changeMyPassword&userAccount=".$userAccount."&toPolicy=$toPolicy&skin=$toSkin", array('alertOLD'))); - } elseif ($result >= _AUTH_FAILURE) { - // sikertelen azonosítás - a hibaüzenetet a függvény generálja - //$NOF = @getFailedLoginCount($toPolicy,$userAccount); - //if ($NOF>1) sleep(min($NOF,10,rand(1,10))); // harden brute force attempts - } else { - // Ilyen csak hibás függvényműködés esetén lehet: - $_SESSION['alert'][] = "message:default:hibás visszatérési érték:userAuthentication:($result)"; - } - } else { - $_SESSION['alert'][] = 'message:empty_field'; - } - } - -?> diff --git a/mayor-orig/www/policy/public/auth/login.php b/mayor-orig/www/policy/public/auth/login.php deleted file mode 100644 index c86bf24b..00000000 --- a/mayor-orig/www/policy/public/auth/login.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php b/mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php deleted file mode 100644 index 53328c7c..00000000 --- a/mayor-orig/www/policy/public/naplo/rpc/rpc-pre.php +++ /dev/null @@ -1,48 +0,0 @@ -setRemoteOMKod($initOMKod); - $REQUEST = $RPC->processRequest($rpcDetails); - $func = $REQUEST->func; - } - catch (Exception $e) - { - $func=''; - $DATA = array('error'=>$e->getMessage()); - } - // processing - - // MASTER BOSS -> portal/rpc/rpc, ez itt ELAVULT - $DATA = array(); - if (isset($func) && $func!='') { - switch ($func) { - case 'getVersion': - case 'ping': - $DATA = $RPC->prepareReply( - array('func'=>'getVersion','response_revision'=>_MAYORREV,'pong') - ); - $RPC->setResponse($DATA); - break; - case 'checkRegistration': - $otherPublicKey = getSslPublicKeyByOMKod($REQUEST->OMKOD); - if ($otherPublicKey===false) $valid=0; - elseif ($REQUEST->publicKey == $otherPublicKey) $valid=1; - else $valid=2; - $DATA = $RPC->prepareReply( - array('func'=>$func,'response'=>serialize($REQUEST),'valid'=>$valid) - ); - $RPC->setResponse($DATA); - default: - break; - } - } -?> diff --git a/mayor-orig/www/policy/public/naplo/rpc/rpc.php b/mayor-orig/www/policy/public/naplo/rpc/rpc.php deleted file mode 100644 index be00b0a5..00000000 --- a/mayor-orig/www/policy/public/naplo/rpc/rpc.php +++ /dev/null @@ -1,7 +0,0 @@ -0) putResponse($DATA); // reply - -?> diff --git a/mayor-orig/www/policy/public/password/changeMyPassword-pre.php b/mayor-orig/www/policy/public/password/changeMyPassword-pre.php deleted file mode 100644 index e9ef2f3c..00000000 --- a/mayor-orig/www/policy/public/password/changeMyPassword-pre.php +++ /dev/null @@ -1,72 +0,0 @@ -= _AUTH_FAILURE) { - $_SESSION['alert'][] = 'message:auth_failure'; // megj: a hibaüzenetet a userAuthentication egyébként generálja. kell ez? - } else { - - if (changeMyPassword($userAccount, $userPassword, $newPassword, $toPolicy)) { -// Újra be kell jelentkezni mindenképp... -// updateSessionPassword($userAccount, $toPolicy, $verification); -// if (validUser($sessionID,$policy)) -// header('Location: '.location("index.php?policy=$toPolicy&sessionID=".$sessionID, array('alert'))); -// else - header('Location: '.location("index.php?page=auth&f=login&toPolicy=$toPolicy", array('alert'))); - } else { - $_SESSION['alert'][] = 'message:pw_change_failed'; - } - } - - } - - } // action - - } else { - - $_SESSION['alert'][] = 'page:pw_change_disabled'; - - } - -?> diff --git a/mayor-orig/www/policy/public/password/changeMyPassword.php b/mayor-orig/www/policy/public/password/changeMyPassword.php deleted file mode 100644 index 29ebbf10..00000000 --- a/mayor-orig/www/policy/public/password/changeMyPassword.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/mayor-orig/www/policy/public/password/resetPassword-pre.php b/mayor-orig/www/policy/public/password/resetPassword-pre.php deleted file mode 100644 index 3590f27a..00000000 --- a/mayor-orig/www/policy/public/password/resetPassword-pre.php +++ /dev/null @@ -1,68 +0,0 @@ -= NOW()"; - $r = db_query($q, array('debug'=>false,'fv'=>'getPasswordRecoveryRequest','modul'=>'login','result'=>'record','values'=>array($selector))); - } - if (!is_array($r)) { - $_SESSION['alert']['page'] = 'message:wrong_data:A jelszó-helyreállítási kérelem nem létezik, vagy lejárt!'; - } else { - - $calc = hash('sha256', hex2bin($validator)); - if (hash_equals($calc, $r['token'])) { - // The reset token is valid. Authenticate the user. - //dump($r); - $ADAT = $r; - $ADAT['validator'] = $validator; - - $toPolicy = $r['policy']; - $userAccount = $r['userAccount']; - - if (file_exists(_CONFIGDIR."/$toPolicy-conf.php")) { - require_once(_CONFIGDIR."/$toPolicy-conf.php"); - } - - if ($AUTH[$toPolicy]['enablePasswordReset']) { - - if ($action == 'resetPassword') { - - if (file_exists('include/backend/'.$AUTH[$toPolicy]['backend'].'/session/base.php')) { - require_once('include/backend/'.$AUTH[$toPolicy]['backend'].'/session/base.php'); - } - if (file_exists('include/backend/'.$AUTH[$toPolicy]['backend'].'/password/changePassword.php')) { - require_once('include/backend/'.$AUTH[$toPolicy]['backend'].'/password/changePassword.php'); - } - - $newPassword = readVariable($_POST['newPassword'], 'emptystringnull'); - $verification = readVariable($_POST['verification'], 'emptystringnull'); - - if ($verification == '' or $newPassword == '') { - $_SESSION['alert'][] = 'message:empty_field'; - } elseif ($verification != $newPassword) { - $_SESSION['alert'][] = 'message:pw_not_match'; - } else { - if (changePassword($userAccount, $newPassword, $toPolicy)) { - $q = "DELETE FROM accountRecovery WHERE userAccount = '%s'"; - db_query($q, array('debug'=>false,'fv'=>'getPasswordRecoveryRequest','modul'=>'login','result'=>'delete','values'=>array($userAccount))); - header('Location: '.location("index.php?page=auth&f=login&toPolicy=$toPolicy", array('alert'))); - } else { - $_SESSION['alert'][] = 'message:pw_change_failed'; - } - } - } - - } else { - $_SESSION['alert'][] = 'page:pw_reset_disabled'; - } - - } else { - $_SESSION['alert']['page'] = 'message:insufficient_access:A jelszó-helyreállítási kérelem nem érvényes!'; - } - - } - -?> diff --git a/mayor-orig/www/policy/public/password/resetPassword.php b/mayor-orig/www/policy/public/password/resetPassword.php deleted file mode 100644 index eaefcc8c..00000000 --- a/mayor-orig/www/policy/public/password/resetPassword.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/mayor-orig/www/policy/public/portal/portal/hir-pre.php b/mayor-orig/www/policy/public/portal/portal/hir-pre.php deleted file mode 100644 index 7e88f0f3..00000000 --- a/mayor-orig/www/policy/public/portal/portal/hir-pre.php +++ /dev/null @@ -1,24 +0,0 @@ -=1) { - if (_POLICY=='private') - $FILTER=array('id'=>$hirId); - else - $FILTER=array('id'=>$hirId,'flag'=>array(1),'class'=>array(1)); - - if (defined('__PORTAL_RESTRICT_CID')) - $FILTER['cid'] = explode(',',__PORTAL_RESTRICT_CID); - - $ADAT['hirek'] = getHirek($FILTER); - /* opengraph attributumok */ - $OG = array('title'=>$ADAT['hirek']['szovegek'][0]['cim'],'getparameter'=>'hirId='.$hirId); - if ($ADAT['hirek']['szovegek'][0]['pic']!='') { - $OG['image'] = $ADAT['hirek']['szovegek'][0]['pic']; - } - } - - -?> diff --git a/mayor-orig/www/policy/public/portal/portal/hir.php b/mayor-orig/www/policy/public/portal/portal/hir.php deleted file mode 100644 index 6a7ee860..00000000 --- a/mayor-orig/www/policy/public/portal/portal/hir.php +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/mayor-orig/www/policy/public/portal/portal/portal-pre.php b/mayor-orig/www/policy/public/portal/portal/portal-pre.php deleted file mode 100644 index d02f5484..00000000 --- a/mayor-orig/www/policy/public/portal/portal/portal-pre.php +++ /dev/null @@ -1,37 +0,0 @@ -=24) {$nap=$nap+1;} - - $ADAT['nevnap']['ma'] = getNevnap($honap,$nap); - $ADAT['nevnap']['holnap'] = getNevnap($honap,$nap+1); - -// $ADAT['nevnap']['ma'] = getNevnap(date('m'),date('d')); -// $ADAT['nevnap']['holnap'] = getNevnap(date('m'),date('d')+1); - - $FILTER=array('tolDt'=>date('Y-m-d H:i:s'), 'igDt'=>date('Y-m-d H:i:s'),'flag'=>array(1),'class'=>array(1)); - if (defined('__PORTAL_RESTRICT_CID')) - $FILTER['cid'] = explode(',',__PORTAL_RESTRICT_CID); - - $ADAT['hirek'] = getHirek($FILTER); - $ADAT['kerdoiv'] = getKerdoiv(_POLICY); - - $kerdoivId = readVariable($_POST['kerdoivId'],'numeric',$ADAT['kerdoiv']['kerdes']['sorszam']); - $vId = readVariable($_POST['vId'],'numeric'); - $szavazotte = szavazotte($kerdoivId); - // Kérdőív - <<<< - if ($action == 'szavaz' && $szavazotte==false) { - szavaz($vId,1,$kerdoivId); - $szavazotte = true; - $_SESSION['kerdoivSzavazott'] = true; - } - $ADAT['kerdoiv'] = getKerdoiv(); - $ADAT['kerdoiv']['szavazott'] = $szavazotte; - // Kérdőív - >>>> - -?> diff --git a/mayor-orig/www/policy/public/portal/portal/portal.php b/mayor-orig/www/policy/public/portal/portal/portal.php deleted file mode 100644 index 96275bf4..00000000 --- a/mayor-orig/www/policy/public/portal/portal/portal.php +++ /dev/null @@ -1,37 +0,0 @@ - diff --git a/mayor-orig/www/policy/public/portal/portal/portal_demo.classic.php b/mayor-orig/www/policy/public/portal/portal/portal_demo.classic.php deleted file mode 100644 index 31aebc95..00000000 --- a/mayor-orig/www/policy/public/portal/portal/portal_demo.classic.php +++ /dev/null @@ -1,43 +0,0 @@ - - -'; - - - echo ''; - - putDoboz('MaYoR-じしょ',$TXT['japszotar'],array('header-color'=>'#bb0088')); - - echo ' | '; - echo ''; - - putHirek($ADAT); - - echo ' | '; - echo '';
-
- putDoboz('Névnapok','Ma: '.$ADAT['nevnap']['ma'].' Holnap: '.$ADAT['nevnap']['holnap'],array('header-color'=>'rgb(138,128,238)')); - - - if (is_array($ADAT['kerdoiv']['kerdes']) && count($ADAT['kerdoiv']['kerdes']) > 0) - putDoboz('Kérdőív', genKerdoiv($ADAT['kerdoiv']), array('header-color'=>'rgb(238,82,38)')); - - echo ' | ';
- echo '