Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsteampassnet committed Oct 11, 2017
2 parents cf50b1e + f5a7653 commit b9af30e
Show file tree
Hide file tree
Showing 33 changed files with 117 additions and 35 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
Fixed some other security failures (credit to ​security at Amossys)
Improved security regarding uploading files
Fixed issue while restoring DB from administration page
Fixed "PW copy to clipboard" log unconsistency in specific case
Improved / Fixed administration task for encrypting/decrypting files
Improved security regarding item history display
Improved the possibility to define the access level on Roles when creating new folder
Added filter in Roles
New: confirm deletion of attachment
#1956 Warning appears on Category and API pages in admin mode
Expand Down
14 changes: 12 additions & 2 deletions folders.load.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<script type="text/javascript">
//<![CDATA[
$(function() {
$("#span_new_rep_roles").hide();

//Launch the datatables pluggin
var tableFolders = $("#t_folders").dataTable({
Expand Down Expand Up @@ -61,7 +62,7 @@
$("#new_folder_wait").hide();

//empty dialogbox
$("#div_add_group input, #div_add_group select").val("");
$("#div_add_group input, #div_add_group select, #new_rep_roles").val("");
$("#add_node_renewal_period").val("0");
$("#folder_block_modif, #folder_block_creation").val("0");
$("#parent_id").val("na");
Expand Down Expand Up @@ -89,7 +90,8 @@
"parent_id": $('#parent_id').val().replace(/"/g,'&quot;') ,
"renewal_period": $('#add_node_renewal_period').val().replace(/"/g,'&quot;') ,
"block_creation": $("#folder_block_creation").val() ,
"block_modif": $("#folder_block_modif").val()
"block_modif": $("#folder_block_modif").val(),
"access_level": $("#new_rep_roles").val()
};

//send query
Expand Down Expand Up @@ -334,6 +336,14 @@ function(data) {
$("#click_refresh_folders_list").click(function() {
tableFolders.api().ajax.reload();
});

$("#parent_id").change(function() {
if ($(this).val() === "0") {
$("#span_new_rep_roles").show();
} else {
$("#span_new_rep_roles").hide();
}
})
});


Expand Down
19 changes: 14 additions & 5 deletions folders.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,33 +116,42 @@
<div id="div_add_group" style="display:none;">
<div id="addgroup_show_error" style="text-align:center;margin:2px;display:none;" class="ui-state-error ui-corner-all"></div>
<label for="ajouter_groupe_titre" class="label_cpm">'.$LANG['group_title'].'</label>
<label for="ajouter_groupe_titre" class="label_cpm">'.addslashes($LANG['group_title']).'</label>
<input type="text" id="ajouter_groupe_titre" class="input_text text ui-widget-content ui-corner-all" />
<label for="parent_id" class="label_cpm">'.addslashes($LANG['group_parent']).'</label>
<select id="parent_id" class="input_text text ui-widget-content ui-corner-all">
'.$droplist.'
</select>
<label for="new_rep_complexite" class="label_cpm">'.$LANG['complex_asked'].'</label>
<label for="new_rep_complexite" class="label_cpm">'.addslashes($LANG['complex_asked']).'</label>
<select id="new_rep_complexite" class="input_text text ui-widget-content ui-corner-all">';
foreach ($SETTINGS_EXT['pwComplexity'] as $complex) {
echo '<option value="'.$complex[0].'">'.$complex[1].'</option>';
}
echo '
</select>
<label for="add_node_renewal_period" class="label_cpm">'.$LANG['group_pw_duration'].'</label>
<span id="span_new_rep_roles">
<label for="new_rep_roles" class="label_cpm">'.addslashes($LANG['access_level_for_roles']).'</label>
<select id="new_rep_roles" class="input_text text ui-widget-content ui-corner-all">
<option value="">'.$LANG['no_access'].'</option>
<option value="R">'.$LANG['read'].'</option>
<option value="W">'.$LANG['write'].'</option>
</select>
</span>
<label for="add_node_renewal_period" class="label_cpm">'.addslashes($LANG['group_pw_duration']).'</label>
<input type="text" id="add_node_renewal_period" value="0" class="input_text text ui-widget-content ui-corner-all" />
<label for="folder_block_creation" class="">'.$LANG['auth_creation_without_complexity'].'</label>
<label for="folder_block_creation" class="">'.addslashes($LANG['auth_creation_without_complexity']).'</label>
<select id="folder_block_creation" class="ui-widget-content ui-corner-all">
<option value="0">'.$LANG['no'].'</option>
<option value="1">'.$LANG['yes'].'</option>
</select>
<div style="margin-top:10px;">
<label for="folder_block_modif">'.$LANG['auth_modification_without_complexity'].'</label>
<label for="folder_block_modif">'.addslashes($LANG['auth_modification_without_complexity']).'</label>
<select id="folder_block_modif" class="ui-widget-content ui-corner-all">
<option value="0">'.$LANG['no'].'</option>
<option value="1">'.$LANG['yes'].'</option>
Expand Down
1 change: 1 addition & 0 deletions includes/language/arabic.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/bulgarian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/catalan.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/chinese.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/czech.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/dutch.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
3 changes: 2 additions & 1 deletion includes/language/english.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
/**
*
* @file english.php
Expand All @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'user_ga_code' => 'Email Google Authentication to user',
Expand Down
1 change: 1 addition & 0 deletions includes/language/estonian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/french.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Droit associé des Roles',
'user_ga_code' => 'Envoyer le code Google Authenticator à l\'utilisateur par email',
'send_ga_code' => 'Google Authenticator pour l\'utilisateur',
'error_no_email' => 'Cet utilisateur n\'a pas de courriel de défini !',
Expand Down
1 change: 1 addition & 0 deletions includes/language/german.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/greek.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/hungarian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/italian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/japanese.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/norwegian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/polish.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/portuguese.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/portuguese_br.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/romanian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/russian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/spanish.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/swedish.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/turkish.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/ukrainian.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
1 change: 1 addition & 0 deletions includes/language/vietnamese.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
global $LANG;
$LANG = array (
'access_level_for_roles' => 'Associated access for Roles',
'admin_script_backup_secret' => 'Passkey for backup execution',
'admin_script_backup_secret_tip' => 'The backup passkey needs to be provided to start the backup. It has to be added a key parameter to script.backup.php. Example:scripts.backup.php?key=your_passkey',
'text' => 'Text',
Expand Down
10 changes: 6 additions & 4 deletions items.load.php
Original file line number Diff line number Diff line change
Expand Up @@ -3932,15 +3932,17 @@ function() {
/*
* permits to save
*/
function itemLog(log_case)
function itemLog(log_case, item_id)
{
console.log("> "+item_id);
item_id = item_id || $('#id_item').val();
$.post(
"sources/items.logs.php",
{
type : log_case,
id_item : $('#id_item').val(),
id_item : item_id,
folder_id : $('#hid_cat').val(),
hid_label : $('#hid_label').val(),
hid_label : $('#hid_label').val(),
key : "<?php echo $_SESSION['key']; ?>"
}
);
Expand Down Expand Up @@ -4025,7 +4027,7 @@ function proceed_list_update(stop_proceeding)
var clipboard = new Clipboard('.mini_pw');
clipboard.on('success', function(e) {
$("#message_box").html("<?php echo addslashes($LANG['pw_copied_clipboard']); ?>").show().fadeOut(1000);
itemLog("item_password_copied");
itemLog("item_password_copied", e.trigger.dataset.clipboardId);
e.clearSelection();
});

Expand Down
12 changes: 12 additions & 0 deletions profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@
$arraFlags[$record['label']] = $record['label'];
}

// Prepare Headers
header('Access-Control-Allow-Origin: *');
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>User Profile</title>
</head>
<body>';

echo '
<input type="hidden" id="profile_user_token" value="" />
<table style="margin-left:7px;">
Expand Down Expand Up @@ -717,3 +727,5 @@ function(data){
);
}
</script>
</body>
</html>
Loading

0 comments on commit b9af30e

Please sign in to comment.