Preprečujem sledenje z odprtimi okni.

Pojačana varnost hashanja (a pozor, pri geslih ostaja MD5/SHA1/... kombo zarazi družljivosti).

Nadgradnja md5 bo poseben...tretma.
This commit is contained in:
May Doušak 2023-01-23 20:39:16 +01:00
parent b2bfe93693
commit 29c3fb4482
20 changed files with 11 additions and 100 deletions

View File

@ -5,7 +5,6 @@
* To change the template for this generated file go to * To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates * Window - Preferences - PHPeclipse - PHP - Code Templates
*/ */
//error_reporting(E_ALL);
set_time_limit(1800); set_time_limit(1800);

View File

@ -5,7 +5,6 @@
* To change the template for this generated file go to * To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates * Window - Preferences - PHPeclipse - PHP - Code Templates
*/ */
//error_reporting(E_ALL);
set_time_limit(1800); set_time_limit(1800);

View File

@ -7990,13 +7990,13 @@ class SurveyAdminSettings {
$arrayTestni = array(); $arrayTestni = array();
for ($i=1; $i<=$_POST['stevilo_vnosov']; $i++) { for ($i=1; $i<=$_POST['stevilo_vnosov']; $i++) {
session_start(); session_start();
$_SESSION['progressBar'][$this->anketa]['current'] = $i; $_SESSION['progressBar'][$this->anketa]['current'] = $i;
session_commit(); session_commit();
// izberemo random hash, ki se ni v bazi (to more bit, ker je index na fieldu cookie) // izberemo random hash, ki se ni v bazi (to more bit, ker je index na fieldu cookie)
do { do {
$rand = md5(random_int(1, mt_getrandmax()).'@'.$_SERVER['REMOTE_ADDR']); $rand = md5(random_int(1, PHP_INT_MAX).'@'.$_SERVER['REMOTE_ADDR']);
$sql1 = sisplet_query("SELECT id FROM srv_user WHERE cookie = '$rand'"); $sql1 = sisplet_query("SELECT id FROM srv_user WHERE cookie = '$rand'");
} while (mysqli_num_rows($sql1) > 0); } while (mysqli_num_rows($sql1) > 0);

View File

@ -8,17 +8,6 @@ include_once 'definition.php';
include_once '../../function.php'; include_once '../../function.php';
include_once '../../vendor/autoload.php'; include_once '../../vendor/autoload.php';
# error reporting
if (isDebug()){
# error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', '1');
}
else{
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
ini_set('display_errors', '0');
}
Common::start(); Common::start();
sisplet_query("BEGIN"); sisplet_query("BEGIN");

View File

@ -5,11 +5,6 @@
* *
**/ **/
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once '../../../definition.php'; include_once '../../../definition.php';
include_once '../../../../../function.php'; include_once '../../../../../function.php';
include_once '../../../../../vendor/autoload.php'; include_once '../../../../../vendor/autoload.php';

View File

@ -1,7 +1,5 @@
<?php <?php
error_reporting(E_ALL);
/** /**
* @package JAMA * @package JAMA
*/ */

View File

@ -8,19 +8,6 @@ include_once('../../vendor/autoload.php');
global $site_path, $global_user_id, $admin_type, $lang; global $site_path, $global_user_id, $admin_type, $lang;
# error reporting
if(isDebug()){
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', '1');
}
else{
//error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
error_reporting(0);
ini_set('display_errors', '0');
}
/****** DEFINITIONS ******/ /****** DEFINITIONS ******/
define("M_ANALIZA_DESCRIPTOR", "descriptor"); define("M_ANALIZA_DESCRIPTOR", "descriptor");
define("M_ANALIZA_FREQUENCY", "frequency"); define("M_ANALIZA_FREQUENCY", "frequency");

View File

@ -90,11 +90,7 @@ class SurveyGorenje{
</soapenv:Envelope> </soapenv:Envelope>
*/ */
public static function sendGorenjeRekID($rek_id){ public static function sendGorenjeRekID($rek_id){
/*ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);*/
$gorenje_wsdl = 'http://partners.gorenje.com/SAGWCFServices/SAGService.svc?wsdl'; $gorenje_wsdl = 'http://partners.gorenje.com/SAGWCFServices/SAGService.svc?wsdl';
$options = array( $options = array(

View File

@ -1,11 +1,5 @@
<?php <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once '../../function.php'; include_once '../../function.php';
include_once 'classes/class.DisplayCheck.php'; include_once 'classes/class.DisplayCheck.php';

View File

@ -2,12 +2,6 @@
session_start(); session_start();
//phpinfo();
/*error_reporting(1);
ini_set('display_errors', 'On');*/
include_once('classes/class.Display.php'); include_once('classes/class.Display.php');
// Inicializiramo razred za prikaz // Inicializiramo razred za prikaz

View File

@ -1,7 +1,5 @@
<?php <?php
session_start(); session_start();
ini_set('display_errors', 1);
error_reporting (E_ALL);
require_once "lib/strpcapi.php"; require_once "lib/strpcapi.php";
require_once "lib/invfoxapi.php"; require_once "lib/invfoxapi.php";

View File

@ -1,11 +1,6 @@
<?php <?php
session_start(); session_start();
//phpinfo();
error_reporting(0);
//ini_set('display_errors', 'On');
include_once('classes/DisplayController.php'); include_once('classes/DisplayController.php');

View File

@ -1,7 +1,5 @@
<?php <?php
error_reporting(E_ALL ^ E_NOTICE);
if (!function_exists('apache_request_headers')) { if (!function_exists('apache_request_headers')) {
function apache_request_headers() function apache_request_headers()
{ {

View File

@ -138,7 +138,7 @@ include('settings.php');
<body style="background-color:#FFFFFF;background-image:none;"> <body style="background-color:#FFFFFF;background-image:none;">
<div id="outercontainer" class=""><div id="container"> <div id="outercontainer" class=""><div id="container">
<div id="logo"> <div id="logo">
<a href="<?php echo $site_url; ?>" title="1KA spletne ankete" target="_blank">1KA</a> <a href="<?php echo $site_url; ?>" title="1KA spletne ankete" target="_blank" rel="noopener">1KA</a>
<div id="logo_right"></div> <div id="logo_right"></div>
</div> </div>
<h1>Vnos kode za dostop do samoevalvacije</h1> <h1>Vnos kode za dostop do samoevalvacije</h1>
@ -158,9 +158,9 @@ include('settings.php');
</form> </form>
</div> </div>
<div id="footer_survey"> <div id="footer_survey">
<p class="footer_1ka"><a href="http://www.1ka.si" target="_blank">1KA - spletne ankete</a></p> <p class="footer_1ka"><a href="http://www.1ka.si" target="_blank" rel="noopener">1KA - spletne ankete</a></p>
<p class="privacy"><a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1" target="_blank">Anketa </a> <a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1#cookies" target="_blank">brez piškotkov</a>, <a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1#ip" target="_blank">brez IP sledenja</a></p> <p class="privacy"><a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1" target="_blank" rel="noopener">Anketa </a> <a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1#cookies" target="_blank" rel="noopener">brez piškotkov</a>, <a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1#ip" target="_blank" rel="noopener">brez IP sledenja</a></p>
<p class="privacy_link"><a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1" target="_blank">Politika zasebnosti</a></p> <p class="privacy_link"><a href="https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka/politika-zasebnosti?from1ka=1" target="_blank" rel="noopener">Politika zasebnosti</a></p>
</div> </div>
</div> </div>

View File

@ -24,8 +24,6 @@ if (in_array($site_url, [
// Error reporting // Error reporting
if (/*ENVIRONMENT == 'dev' ||*/ isDebug()) { if (/*ENVIRONMENT == 'dev' ||*/ isDebug()) {
error_reporting(E_ALL);
ini_set("display_errors", 1);
//ERROR blackscreen prikaz //ERROR blackscreen prikaz
if (class_exists('\Whoops\Run)')) { if (class_exists('\Whoops\Run)')) {
@ -34,12 +32,8 @@ if (/*ENVIRONMENT == 'dev' ||*/ isDebug()) {
$whoops->register(); $whoops->register();
} }
} else {
error_reporting(0);
ini_set("display_errors", 0);
} }
//DB connection //DB connection
define('DB_TYPE', 'mysql'); define('DB_TYPE', 'mysql');
define('DB_HOST', $mysql_server); define('DB_HOST', $mysql_server);

View File

@ -6,12 +6,6 @@
* *
*/ */
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
include_once('../../function.php'); include_once('../../function.php');
include_once('../../vendor/autoload.php'); include_once('../../vendor/autoload.php');
include_once($site_path.'/settings_optional.php'); include_once($site_path.'/settings_optional.php');

View File

@ -8,10 +8,6 @@
die(); die();
/*ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);*/
include_once('../../function.php'); include_once('../../function.php');
include_once('../../vendor/autoload.php'); include_once('../../vendor/autoload.php');

View File

@ -6,12 +6,6 @@
* *
*/ */
/*ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);*/
include_once('../../function.php'); include_once('../../function.php');
include_once('../../vendor/autoload.php'); include_once('../../vendor/autoload.php');

View File

@ -6,13 +6,8 @@
* *
*/ */
die(); die();
/*ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);*/
include_once('../../function.php'); include_once('../../function.php');
include_once('../../vendor/autoload.php'); include_once('../../vendor/autoload.php');

View File

@ -4,12 +4,8 @@
*/ */
set_time_limit(36000); // 10 ur set_time_limit(36000); // 10 ur
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once '../../function.php'; include_once '../../function.php';
include_once '../../admin/survey/definition.php'; include_once '../../admin/survey/definition.php';
include_once '../../vendor/autoload.php'; include_once '../../vendor/autoload.php';