Skip to content

Commit

Permalink
2.1.23.2
Browse files Browse the repository at this point in the history
* Fix an issue during previous release creation under Github
* Fix issue "this page doesn't exist"
  • Loading branch information
nilsteampassnet committed Sep 22, 2015
1 parent 82031ba commit 4eae4d8
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 74 deletions.
26 changes: 24 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,31 @@ class="ui-state-highlight ui-corner-all" id="div_maintenance">
</span>
</div>';
}

if ((!isset($_SESSION['validite_pw']) || $_SESSION['validite_pw'] == false) && !empty($_SESSION['user_id'])) {
//Check if password is valid
echo '
<div style="margin:auto;padding:4px;width:300px;" class="ui-state-focus ui-corner-all">
<h3>'.$LANG['index_change_pw'].'</h3>
<div style="height:20px;text-align:center;margin:2px;display:none;" id="change_pwd_error" class=""></div>
<div style="text-align:center;margin:5px;padding:3px;" id="change_pwd_complexPw" class="ui-widget ui-state-active ui-corner-all">'.
$LANG['complex_asked'].' : '.$_SESSION['settings']['pwComplexity'][$_SESSION['user_pw_complexity']][1].
'</div>
<div id="pw_strength" style="margin:0 0 10px 30px;"></div>
<table>
<tr>
<td>'.$LANG['index_new_pw'].' :</td><td><input type="password" size="15" name="new_pw" id="new_pw"/></td>
</tr>
<tr><td>'.$LANG['index_change_pw_confirmation'].' :</td><td><input type="password" size="15" name="new_pw2" id="new_pw2" onkeypress="if (event.keyCode == 13) ChangeMyPass();" /></td></tr>
</table>
<input type="hidden" id="pw_strength_value" />
<input type="button" onClick="ChangeMyPass()" onkeypress="if (event.keyCode == 13) ChangeMyPass();" class="ui-state-default ui-corner-all" style="padding:4px;width:150px;margin:10px 0 0 80px;" value="'.$LANG['index_change_pw_button'].'" />
</div>
<script type="text/javascript">
$("#new_pw").focus();
</script>';
}
// Display pages
if (isset($_SESSION['validite_pw']) && $_SESSION['validite_pw'] == true && !empty($_GET['page']) && !empty($_SESSION['user_id'])) {
elseif (isset($_SESSION['validite_pw']) && $_SESSION['validite_pw'] == true && !empty($_GET['page']) && !empty($_SESSION['user_id'])) {
if (!extension_loaded('mcrypt')) {
$_SESSION['error']['code'] = ERR_NO_MCRYPT;
include $_SESSION['settings']['cpassman_dir'].'/error.php';
Expand Down
22 changes: 16 additions & 6 deletions install/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ function CheckPage()
error = "Fields need to be filled in!";
} else {
data = '{"root_path":"'+$("#root_path").val()+'", "url_path":"'+$("#url_path").val()+'"}';
tasks = ["folder*install", "folder*includes", "folder*files", "folder*upload", "extension*mcrypt", "extension*mbstring", "extension*openssl", "extension*bcmath", "extension*iconv", "function*mysqli_fetch_all", "version*php", "ini*max_execution_time", "folder*includes/avatars"];
tasks = ["folder*install", "folder*includes", "folder*files", "folder*upload", "extension*mcrypt", "extension*mbstring", "extension*openssl", "extension*bcmath", "extension*iconv", "function*mysqli_fetch_all", "version*php", "ini*max_execution_time", "folder*includes/avatars", "extension*xml"];
multiple = true;
$("#hid_abspath").val($("#root_path").val());
$("#hid_url_path").val($("#url_path").val());
}
}

Expand All @@ -65,9 +67,14 @@ function CheckPage()
if ($("#db_host").val() == "" || $("#db_db").val() == "" || $("#db_login").val() == "" || $("#db_port").val() == "") {
error = "Paths need to be filled in!";
} else {
data = '{"db_host":"'+$("#db_host").val()+'", "db_bdd":"'+$("#db_bdd").val()+'", "db_login":"'+$("#db_login").val()+'", "db_pw":"'+$("#db_pw").val()+'", "db_port":"'+$("#db_port").val()+'"}';
data = '{"db_host":"'+$("#db_host").val()+'", "db_bdd":"'+$("#db_bdd").val()+'", "db_login":"'+$("#db_login").val()+'", "db_pw":"'+$("#db_pw").val()+'", "db_port":"'+$("#db_port").val()+'", "abspath":"'+$("#hid_abspath").val()+'", "url_path":"'+$("#hid_url_path").val()+'"}';
tasks = ["connection*test"];
multiple = "";
$("#hid_db_host").val($("#db_host").val());
$("#hid_db_bdd").val($("#db_bdd").val());
$("#hid_db_login").val($("#db_login").val());
$("#hid_db_pwd").val($("#db_pw").val());
$("#hid_db_port").val($("#db_port").val());
}
}

Expand All @@ -89,7 +96,7 @@ function CheckPage()
// STEP 5
if (step == "5") {
data = '';
tasks = ["table*items", "table*log_items", "table*misc", "table*nested_tree", "table*rights", "table*users", "entry*admin", "table*tags", "table*log_system", "table*files", "table*cache", "table*roles_title", "table*roles_values", "table*kb", "table*kb_categories", "table*kb_items", "table*restriction_to_roles", "table*keys", "table*languages", "table*emails", "table*automatic_del", "table*items_edition", "table*categories", "table*categories_items", "table*categories_folders", "table*api", "table*otv", "table*suggestion"];
tasks = ["table*items", "table*log_items", "table*misc", "table*nested_tree", "table*rights", "table*users", "entry*admin", "table*tags", "table*log_system", "table*files", "table*cache", "table*roles_title", "table*roles_values", "table*kb", "table*kb_categories", "table*kb_items", "table*restriction_to_roles", "table*languages", "table*emails", "table*automatic_del", "table*items_edition", "table*categories", "table*categories_items", "table*categories_folders", "table*api", "table*otv", "table*suggestion"];
multiple = true;
}

Expand All @@ -114,7 +121,7 @@ function CheckPage()
$("#step_res").val("true");
var ajaxReqs = [];
for (index = 0; index < tasks.length; ++index) {
var tsk = tasks[index].split("*");
var tsk = tasks[index].split("*");//console.log(tsk[1]);
ajaxReqs.push($.ajax({
url: "install.queries.php",
type : 'POST',
Expand All @@ -124,6 +131,7 @@ function CheckPage()
data: aes_encrypt(data), //
activity: aes_encrypt(tsk[0]),
task: aes_encrypt(tsk[1]),
db: aes_encrypt('{"db_host" : "'+$("#hid_db_host").val()+'", "db_bdd" : "'+$("#hid_db_bdd").val()+'", "db_login" : "'+$("#hid_db_login").val()+'", "db_pw" : "'+$("#hid_db_pwd").val()+'", "db_port" : "'+$("#hid_db_port").val()+'"}'),
index: index,
multiple: multiple
},
Expand All @@ -147,11 +155,12 @@ function CheckPage()
}
}));
}
$.when.apply($, ajaxReqs).done(function() {
$.when.apply($, ajaxReqs).done(function(data, statut) {
setTimeout(function(){
// all requests are complete
if ($("#step_res").val() == "false") {
$("#step_error").show().html("At least one task has failed! Please correct and relaunch.");
data = $.parseJSON(data.responseText);
$("#step_error").show().html("At least one task has failed! Please correct and relaunch. ");
$("#res_"+step).html("<img src=\"images/exclamation-red.png\">");
} else {
$("#but_launch").prop("disabled", true);
Expand Down Expand Up @@ -179,6 +188,7 @@ function CheckPage()
data: aes_encrypt(data),
activity: aes_encrypt(tsk[0]),
task: aes_encrypt(tsk[1]),
db: aes_encrypt('{"db_host" : "'+$("#hid_db_host").val()+'", "db_bdd" : "'+$("#hid_db_bdd").val()+'", "db_login" : "'+$("#hid_db_login").val()+'", "db_pw" : "'+$("#hid_db_pwd").val()+'", "db_port" : "'+$("#hid_db_port").val()+'"}'),
index: index,
multiple: multiple
},
Expand Down
11 changes: 9 additions & 2 deletions install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@

echo '
<input type="hidden" id="page_id" value="1" />
<input type="hidden" id="step_res" value="" />';
<input type="hidden" id="step_res" value="" />
<input type="hidden" id="hid_db_host" value="" />
<input type="hidden" id="hid_db_login" value="" />
<input type="hidden" id="hid_db_pwd" value="" />
<input type="hidden" id="hid_db_port" value="" />
<input type="hidden" id="hid_db_bdd" value="" />
<input type="hidden" id="hid_abspath" value="" />
<input type="hidden" id="hid_url_path" value="" />';
// # LOADER
echo '
<div style="position:absolute;top:49%;left:49%;display:none;z-index:9999999;" id="loader"><img src="../includes/images/76.gif" /></div>';
Expand Down Expand Up @@ -115,6 +122,7 @@
<li>PHP extension "openssl" is loaded&nbsp;<span id="res2_check6"></span></li>
<li>PHP extension "bcmath" is loaded&nbsp;<span id="res2_check7"></span></li>
<li>PHP extension "iconv" is loaded&nbsp;<span id="res2_check8"></span></li>
<li>PHP extension "xml" is loaded&nbsp;<span id="res2_check13"></span></li>
<li>PHP function "mysqli_fetch_all" is available&nbsp;<span id="res2_check9"></span></li>
<li>PHP version is greater or equal to 5.3.0&nbsp;<span id="res2_check10"></span></li>
<li>Execution time limit&nbsp;<span id="res2_check11"></span></li>
Expand Down Expand Up @@ -222,7 +230,6 @@
<li>Add table "kb_categories"&nbsp;<span id="res5_check14"></span></li>
<li>Add table "kb_items"&nbsp;<span id="res5_check15"></span></li>
<li>Add table "restriction_to_roles"&nbsp;<span id="res5_check16"></span></li>
<li>Add table "keys"&nbsp;<span id="res5_check17"></span></li>
<li>Add table "languages"&nbsp;<span id="res5_check18"></span></li>
<li>Add table "emails"&nbsp;<span id="res5_check19"></span></li>
<li>Add table "automatic_del"&nbsp;<span id="res5_check20"></span></li>
Expand Down
Loading

0 comments on commit 4eae4d8

Please sign in to comment.