Skip to content

Commit

Permalink
Merge pull request #22 from Rabbit-Company/dev
Browse files Browse the repository at this point in the history
v8.0.2
  • Loading branch information
zigazajc007 authored Dec 13, 2022
2 parents c772942 + 799bc1f commit 9016d98
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ BACKUP_LOCATION=
# Provide SMTP credentials
MAIL_ENABLED=false
MAIL_HOST=
MAIL_PORT=
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_USE_TLS=
MAIL_USE_TLS=true

#
# ACCOUNT SETTINGS
Expand Down
2 changes: 1 addition & 1 deletion api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"require": {
"paragonie/constant_time_encoding": "^2",
"pragmarx/google2fa": "v8.0.1",
"phpmailer/phpmailer": "^6.6"
"phpmailer/phpmailer": "^6.7"
}
}
2 changes: 1 addition & 1 deletion api/src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ public static function forgotUsername(string $email) : string{
$mail->SMTPAuth = true;
$mail->Username = Settings::getMailUsername();
$mail->Password = Settings::getMailPassword();
$mail->SMTPSecure = (Settings::getMailTLS()) ? PHPMailer::ENCRYPTION_STARTTLS : PHPMailer::ENCRYPTION_SMTPS;
$mail->SMTPSecure = (Settings::getMailTLS()) ? PHPMailer::ENCRYPTION_SMTPS : PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = Settings::getMailPort();

$mail->setFrom(Settings::getMailUsername(), 'Passky');
Expand Down
4 changes: 2 additions & 2 deletions api/src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Settings{
*/

public static function getVersion() : string{
return '8.0.1';
return '8.0.2';
}

public static function getLocation() : string{
Expand Down Expand Up @@ -135,7 +135,7 @@ public static function getMailHost() : string{
}

public static function getMailPort() : int{
return getenv('MAIL_PORT', true) ?: getenv('MAIL_PORT') ?: 587;
return getenv('MAIL_PORT', true) ?: getenv('MAIL_PORT') ?: 465;
}

public static function getMailUsername() : string{
Expand Down
1 change: 1 addition & 0 deletions api/src/website/actions/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
$result = file_get_contents('https://challenges.cloudflare.com/turnstile/v0/siteverify', false, $context);
$result = json_decode($result, true);

if(Settings::getCFTSiteKey() === '1x00000000000000000000AA') $result['action'] = 'login';
if($result['success'] !== true || $result['action'] !== 'login'){
header('Location: ../..');
exit();
Expand Down
6 changes: 3 additions & 3 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ then

echo -e "\n${blue}${bold}Provide SMTP port.${blue}"
echo -e "Setting up SMTP is not required."
echo -e "Example: 587"
echo -e "Example: 465"
printf "\n${green}SMTP port: "
read MAIL_PORT
while [[ ! "$MAIL_PORT" =~ ^[0-9]{1,5}$ ]];
Expand Down Expand Up @@ -248,10 +248,10 @@ then
echo "MAIL_PASSWORD=${MAIL_PASSWORD}" >> .env
else
echo "MAIL_HOST=" >> .env
echo "MAIL_PORT=" >> .env
echo "MAIL_PORT=465" >> .env
echo "MAIL_USERNAME=" >> .env
echo "MAIL_PASSWORD=" >> .env
echo "MAIL_USE_TLS=" >> .env
echo "MAIL_USE_TLS=true" >> .env
fi

echo -e "\n\n${gray}----------------------------------------------------------------------------------------------------------------------------------${none}"
Expand Down
8 changes: 4 additions & 4 deletions installerGUI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ then
MAIL_HOST=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP host.\n\nSetting up SMTP is not required." 12 78 mail.passky.org 3>&1 1>&2 2>&3)
echo "MAIL_HOST=${MAIL_HOST}" >> .env

MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required." 12 78 587 3>&1 1>&2 2>&3)
MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required." 12 78 465 3>&1 1>&2 2>&3)
while [[ ! "$MAIL_PORT" =~ ^[0-9]{1,5}$ ]];
do
MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required.\n\n'${MAIL_PORT}' is not a valid port. Port must be a number between 1 and 65535." 14 78 587 3>&1 1>&2 2>&3)
MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required.\n\n'${MAIL_PORT}' is not a valid port. Port must be a number between 1 and 65535." 14 78 465 3>&1 1>&2 2>&3)
done
echo "MAIL_PORT=${MAIL_PORT}" >> .env

Expand All @@ -104,10 +104,10 @@ then
else
echo "MAIL_ENABLED=false" >> .env
echo "MAIL_HOST=" >> .env
echo "MAIL_PORT=" >> .env
echo "MAIL_PORT=465" >> .env
echo "MAIL_USERNAME=" >> .env
echo "MAIL_PASSWORD=" >> .env
echo "MAIL_USE_TLS=" >> .env
echo "MAIL_USE_TLS=true" >> .env
fi

if (whiptail --title "Passky Installer - Mail Settings" --yesno "Do you want backups to be enabled?\n\nBackup perform every day and will export database to external server thru SSH (Using SCP).\n\nIf you don't have any external server ready for backups, leave it disabled." 14 78);
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "passky-server",
"description": "Server for Passky (password manager)",
"version": "8.0.1",
"version": "8.0.2",
"main": "tailwind.config.js",
"scripts": {
"build": "npx tailwindcss -i ./tailwind.css -o ./api/src/website/css/tailwind.min.css --minify"
Expand Down

0 comments on commit 9016d98

Please sign in to comment.