From 80aedddf2231b62ba9354bf6ab603e7987a771ef Mon Sep 17 00:00:00 2001 From: Ziga Date: Tue, 31 Jan 2023 20:01:32 +0100 Subject: [PATCH] Updated Home page, Password will be random generated on each Admin Login if admin forgot to set it and small visual bugs --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- server/docker/etc/s6-overlay/scripts/runas-user | 16 ++++++++++++++++ server/src/Settings.php | 10 +++++----- server/src/website/home.php | 8 ++++---- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9bba289..66b701c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GitHub forks](https://img.shields.io/github/forks/Rabbit-Company/Passky-Server?style=for-the-badge)](https://github.com/Rabbit-Company/Passky-Server/network) [![GitHub license](https://img.shields.io/github/license/Rabbit-Company/Passky-Server?color=blue&style=for-the-badge)](https://github.com/Rabbit-Company/Passky-Server/blob/main/LICENSE) -### [Download from Rabbit Store](https://rabbitstore.org/?app=com.rabbit-company.passky) +### [Download from Official Website](https://passky.org/download) ## Passky Clients diff --git a/package-lock.json b/package-lock.json index 9d5f959..d4daa2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "passky-server", - "version": "8.1.0", + "version": "8.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "passky-server", - "version": "8.1.0", + "version": "8.1.1", "license": "GPL-3.0", "devDependencies": { "tailwindcss": "^3.2.4" diff --git a/package.json b/package.json index a0f3794..1cac3b1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "passky-server", "description": "Server for Passky (password manager)", - "version": "8.1.0", + "version": "8.1.1", "main": "tailwind.config.js", "scripts": { "build": "npx tailwindcss -i ./tailwind.css -o ./server/src/website/css/tailwind.min.css --minify" diff --git a/server/docker/etc/s6-overlay/scripts/runas-user b/server/docker/etc/s6-overlay/scripts/runas-user index b441220..f4c9151 100644 --- a/server/docker/etc/s6-overlay/scripts/runas-user +++ b/server/docker/etc/s6-overlay/scripts/runas-user @@ -17,6 +17,22 @@ echo ' ------------------------------------------------------------------- ' +if [[ -z $DATABASE_ENGINE ]]; then + DATABASE_ENGINE=sqlite +fi + +if [[ -z $ACCOUNT_MAX ]]; then + ACCOUNT_MAX=100 +fi + +if [[ -z $ACCOUNT_MAX_PASSWORDS ]]; then + ACCOUNT_MAX_PASSWORDS=1000 +fi + +if [[ -z $ACCOUNT_PREMIUM ]]; then + ACCOUNT_PREMIUM=-1 +fi + echo ' -------------------------------------------- Settings diff --git a/server/src/Settings.php b/server/src/Settings.php index 2e0410d..0f586b7 100644 --- a/server/src/Settings.php +++ b/server/src/Settings.php @@ -21,7 +21,7 @@ class Settings{ */ public static function getVersion() : string{ - return '8.1.0'; + return '8.1.1'; } public static function getLocation() : string{ @@ -43,7 +43,7 @@ public static function getAdminUsername() : string{ } public static function getAdminPassword() : string{ - return getenv('ADMIN_PASSWORD', true) ?: getenv('ADMIN_PASSWORD') ?: 'fehu2UPmpragklWoJcbr4BajxoaGns'; + return getenv('ADMIN_PASSWORD', true) ?: getenv('ADMIN_PASSWORD') ?: hash('sha256', 'passky' . random_int(PHP_INT_MIN, PHP_INT_MAX) . random_int(PHP_INT_MIN, PHP_INT_MAX)); } public static function getCFTSiteKey() : string{ @@ -165,7 +165,7 @@ public static function getRedisLocalPassword() : string{ */ public static function getMail() : bool{ - return in_array(getenv('MAIL_ENABLED', true), ['true', '1'], true); + return getenv('MAIL_ENABLED', true) === 'true'; } public static function getMailHost() : string{ @@ -185,7 +185,7 @@ public static function getMailPassword() : string{ } public static function getMailTLS() : bool{ - return in_array(getenv('MAIL_USE_TLS', true), ['true', '1'], true); + return getenv('MAIL_USE_TLS', true) === 'true'; } /* @@ -227,7 +227,7 @@ public static function getYubiId() : int{ */ public static function getLimiter() : bool{ - return in_array(getenv('LIMITER_ENABLED', true), ['true', '1'], true); + return getenv('LIMITER_ENABLED', true) === 'true'; } public static function getLimiterGetInfo() : int{ diff --git a/server/src/website/home.php b/server/src/website/home.php index 4973ae6..0d0dbcc 100644 --- a/server/src/website/home.php +++ b/server/src/website/home.php @@ -3,14 +3,14 @@

Passky Server

-

If you see this page, that means your Passky Server has been successfully installed.

+

The successful installation of the Passky Server is indicated by the appearance of this page.

How do I use it?

1. Download Passky Client

-

Passky Client can be accessed right from the Website or it can be downloaded from Rabbit Store.

+

The Passky Client can be obtained from the Official Website or accessed directly through the https://vault.passky.org portal.

2. Connect to your Passky Server

-

When you open Passky Client, you will see the first field called "Server". In this field enter URL of your Passky Server:

+

Upon opening the Passky Client, you will encounter the first field labeled "Server". In this field, please enter the URL of your Passky Server:

3. Sign in or Sign up

-

Now you can fill rest of the fields and click on "Sign in" or "Sign up" button.

+

You may now complete the remaining fields and proceed by clicking on either the "Sign In" or "Sign Up" button.