Skip to content

Commit

Permalink
2.1.27
Browse files Browse the repository at this point in the history
Fix for ##1866
  • Loading branch information
nilsteampassnet committed Aug 16, 2017
1 parent 77e75c9 commit 7e0875a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Database password is encrypted in settings.php file
PHPMailer library updated to 5.2.23
Configuration variables are not set in SESSION anymore. Now read from tp.config.php file.
#1866 CSV import with empty url leads to value 0
#1862 Import from Keepass.xml to Personalfolder no access to Item
#1857 API: Folders created at level 0 instead of correct level
#1856 Robustified tp.config.php creation in case of upgrade
Expand Down
10 changes: 5 additions & 5 deletions sources/import.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ function sanitiseString($str, $crLFReplacement)
prefix_table("items"),
array(
'label' => substr($item[0], 0, 500),
'description' => $item[4],
'description' => empty($item[4]) ? '' : $item[4],
'pw' => $encrypt['string'],
'pw_iv' => $encrypt['iv'],
'url' => substr($item[3], 0, 500),
'url' => empty($item[3]) ? '' : substr($item[3], 0, 500),
'id_tree' => filter_input(INPUT_POST, 'folder', FILTER_SANITIZE_NUMBER_INT),
'login' => substr($item[1], 0, 200),
'login' => empty($item[1]) ? '' : substr($item[1], 0, 200),
'anyone_can_modify' => filter_input(INPUT_POST, 'import_csv_anyone_can_modify', FILTER_SANITIZE_STRING) === "true" ? 1 : 0
)
);
Expand Down Expand Up @@ -339,10 +339,10 @@ function sanitiseString($str, $crLFReplacement)
array(
'id' => $newId,
'label' => substr($item[0], 0, 500),
'description' => $item[4],
'description' => empty($item[4]) ? '' : $item[4],
'id_tree' => filter_input(INPUT_POST, 'folder', FILTER_SANITIZE_NUMBER_INT),
'perso' => $personalFolder == 0 ? 0 : 1,
'login' => substr($item[1], 0, 500),
'login' => empty($item[1]) ? '' : substr($item[1], 0, 500),
'folder' => $data_fld['title'],
'author' => $_SESSION['user_id'],
'timestamp' => time(),
Expand Down
5 changes: 2 additions & 3 deletions sources/main.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,8 @@ function sendEmail($subject, $textMail, $email, $textMailAlt = "")
$mail->SMTPDebug = 0; //value 1 can be used to debug
$mail->Port = $SETTINGS['email_port']; //COULD BE USED
$mail->CharSet = "utf-8";
$smtp_security = $SETTINGS['email_security'];
if ($smtp_security == "tls" || $smtp_security == "ssl") {
$mail->SMTPSecure = $smtp_security;
if ($smtp_security === "tls" || $smtp_security === "ssl") {
$mail->SMTPSecure = $SETTINGS['email_security'];
}
$mail->isSmtp(); // send via SMTP
$mail->Host = $SETTINGS['email_smtp_server']; // SMTP servers
Expand Down

0 comments on commit 7e0875a

Please sign in to comment.