aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-base
diff options
context:
space:
mode:
authorM.Gergo2020-09-02 21:02:17 +0200
committerM.Gergo2020-09-02 21:02:17 +0200
commitcf6a58003f47139501a2907f8a4bc400b23fda66 (patch)
treefb7f9e17b609143987ca2f324e27c610886284a9 /mayor-orig/mayor-base
parent9bfbb60898b55ba4e1bd50c052c7ec4aaafc1ff8 (diff)
parent9044c44af70eff76d875137de553d5904e475f6d (diff)
downloadmayor-cf6a58003f47139501a2907f8a4bc400b23fda66.tar.gz
mayor-cf6a58003f47139501a2907f8a4bc400b23fda66.zip
Merge branch 'MaYor-dev'
Diffstat (limited to 'mayor-orig/mayor-base')
-rw-r--r--mayor-orig/mayor-base/log/mayor-base.rev2
-rw-r--r--mayor-orig/mayor-base/www/include/base/mysql.php2
-rw-r--r--mayor-orig/mayor-base/www/include/base/rights.php5
-rw-r--r--mayor-orig/mayor-base/www/lang/hu_HU/base/base.php2
-rw-r--r--mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php1
-rw-r--r--mayor-orig/mayor-base/www/skin/classic/base/javascript/base.jquery.min.js1
-rw-r--r--mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml9
-rw-r--r--mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js32
8 files changed, 51 insertions, 3 deletions
diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev
index 146427d5..d197bb6d 100644
--- a/mayor-orig/mayor-base/log/mayor-base.rev
+++ b/mayor-orig/mayor-base/log/mayor-base.rev
@@ -1 +1 @@
-4652
+4675
diff --git a/mayor-orig/mayor-base/www/include/base/mysql.php b/mayor-orig/mayor-base/www/include/base/mysql.php
index 12aeb771..819fdcd0 100644
--- a/mayor-orig/mayor-base/www/include/base/mysql.php
+++ b/mayor-orig/mayor-base/www/include/base/mysql.php
@@ -91,9 +91,11 @@
mysqli_set_charset($lr, "utf8");
mysqli_query($lr, "SET NAMES utf8");
mysqli_query($lr, "SET collation_connection='utf8_hungarian_ci'");
+ mysqli_query($lr, "SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))");
} else {
mysql_query("SET NAMES utf8", $lr);
mysql_query("SET collation_connection='utf8_hungarian_ci'", $lr);
+ mysql_query("SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))", $lr);
}
} else {
$_SESSION['alert'][] = "message:sql_select_db_failure:db_connect/${SET['fv']}:$modul:".$MYSQL_DATA[$modul]['db'];
diff --git a/mayor-orig/mayor-base/www/include/base/rights.php b/mayor-orig/mayor-base/www/include/base/rights.php
index dc6b7aa7..c30a927d 100644
--- a/mayor-orig/mayor-base/www/include/base/rights.php
+++ b/mayor-orig/mayor-base/www/include/base/rights.php
@@ -250,17 +250,20 @@ function validUser($sessionID,$policy,$skin='',$lang='') {
}
if (count($_POST)>0) {
if (!empty($_POST['mayorToken'])) {
+ if ($page=='naplo'&&$sub=='tanev'&&$f=='targyBontasX') {
+ //skip check :( TODO!!!!
if (hash_equals($_SESSION['mayorToken'], $_POST['mayorToken'])) {
// OK, token regenerálás + visszakuldjuk az ETAG-ben
$_SESSION['mayorToken'] = pseudoTokenGenerator();
} else {
if ($_POST['action']!='') { /* Ha nincs action formváltozó, nincs szükség hibaüzenetre, a form nem módosít, de most... */
- $_SESSION['alert'][] = 'message:not_valid_form:pnu2';
+ $_SESSION['alert'][] = 'message:not_valid_form:pnu2'.$page.$sub.$f;
$_JSON['result'] = false;
}
unset($_POST['action']);
unset($action);
}
+ }
} else { // klasszikus ellenőrzés, fallback
echo 'FATAL ERROR 696';
die();
diff --git a/mayor-orig/mayor-base/www/lang/hu_HU/base/base.php b/mayor-orig/mayor-base/www/lang/hu_HU/base/base.php
index 7396952b..c95d417b 100644
--- a/mayor-orig/mayor-base/www/lang/hu_HU/base/base.php
+++ b/mayor-orig/mayor-base/www/lang/hu_HU/base/base.php
@@ -8,7 +8,7 @@
*/
define('_MAIN_TITLE','MaYoR');
-define('_MAIN_FOOTER','<a href="http://www.mayor.hu./">MaYoR</a> - 2002-2019 &copy; <a href="LICENSE.txt">GPL</a>');
+define('_MAIN_FOOTER','<a href="http://www.mayor.hu./">MaYoR</a> - 2002-2020 &copy; <a href="LICENSE.txt">GPL</a>');
define('_TANAR','tanár');
define('_DIAK','diák');
diff --git a/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php b/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php
index 9c56a329..94007ff8 100644
--- a/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php
+++ b/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php
@@ -12,5 +12,6 @@ define('_USERNAME','Felhasználói név');
define('_NEW_PASSWORD','Új jelszó');
define('_VERIFICATION','Megerősítés');
define('_OK','OK');
+define('_PWGEN','Ajánlott jelszó');
?>
diff --git a/mayor-orig/mayor-base/www/skin/classic/base/javascript/base.jquery.min.js b/mayor-orig/mayor-base/www/skin/classic/base/javascript/base.jquery.min.js
index f4b27b06..003422ac 100644
--- a/mayor-orig/mayor-base/www/skin/classic/base/javascript/base.jquery.min.js
+++ b/mayor-orig/mayor-base/www/skin/classic/base/javascript/base.jquery.min.js
@@ -1,3 +1,4 @@
+
var debug = false;
function _debug(str) {
if (debug) console.log(str);
diff --git a/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml b/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml
index 59dab0ea..295f6eeb 100644
--- a/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml
+++ b/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml
@@ -33,6 +33,15 @@
echo '<tbody>'."\n";
echo '<tr>'."\n";
echo '<td>'."\n";
+ echo _PWGEN;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="txtPwgen" type="text" value="" maxlength="32" />'."\n";
+ echo '<div id="btnPwgen" class="icon-fork" style="cursor: pointer"></div>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
echo _USERNAME;
echo '</td>'."\n";
echo '<td>'."\n";
diff --git a/mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js b/mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js
new file mode 100644
index 00000000..221c2f98
--- /dev/null
+++ b/mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js
@@ -0,0 +1,32 @@
+$(function() {
+
+ var str = randString($('#newpassword'));
+ $("#btnPwgen").click(function() {
+ $('#newPassword').val(str);
+ $('#verification').val(str);
+ });
+ $('#txtPwgen').val(str);
+
+});
+
+function randString(id){
+ var dataSet = 'a-z,A-Z,0-9'.split(',');
+ var possible = '';
+ if($.inArray('a-z', dataSet) >= 0){
+ possible += 'abcdefghijklmnopqrstuvwxyz';
+ }
+ if($.inArray('A-Z', dataSet) >= 0){
+ possible += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ }
+ if($.inArray('0-9', dataSet) >= 0){
+ possible += '0123456789';
+ }
+ if($.inArray('#', dataSet) >= 0){
+ possible += '![]{}()%&*$#^<>~@|';
+ }
+ var text = '';
+ for(var i=0; i < 10; i++) {
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
+ }
+ return text;
+}