From 2b5ece8a4b050ba9b07adf4f00816a056a841534 Mon Sep 17 00:00:00 2001
From: rayhanp1402 <rayhan.hanif14maulana@gmail.com>
Date: Tue, 24 Oct 2023 15:21:39 +0700
Subject: [PATCH] ubah port dan sedikit revisi password check

---
 docker-compose.yml                 | 7 ++++---
 src/public/javascript/validator.js | 5 -----
 src/setting/account/edit/index.php | 2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 4192906..df6afec 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,8 +6,7 @@ services:
       dockerfile: Dockerfile
     env_file: "./php/.env"
     ports:
-      - 80:80
-      - 443:443
+      - 8002:80
     hostname: web-tubes-1
     volumes:
       - "./src:/var/www/html"
@@ -15,12 +14,14 @@ services:
   db:
     image: mysql:latest
     env_file: "./mysql/.env"
+    ports:
+      - 3308:3306
     volumes:
       - "./db:/docker-entrypoint-initdb.d" # this is how we persist a sql db even when container stops
   phpmyadmin:
     image: phpmyadmin/phpmyadmin
     ports:
-      - 8001:80
+      - 4002:80
     environment:
       - PMA_HOST=db
       - PMA_PORT=3306
diff --git a/src/public/javascript/validator.js b/src/public/javascript/validator.js
index 4b26b79..4a25df2 100644
--- a/src/public/javascript/validator.js
+++ b/src/public/javascript/validator.js
@@ -181,35 +181,30 @@ function videoCheck(videoFile, megaByteLimit) {
 
 function passwordCheck(password) {
   if(!password.match(oneDigit)) {
-    console.log("Masuk one digit");
     return {
       validity: false,
       message: "Password must have at least a single digit!",
     };
   }
   else if(!password.match(oneLowercase)) {
-    console.log("Masuk one lowercase");
     return {
       validity: false,
       message: "Password must have at least a lowercase character!",
     };
   }
   else if(!password.match(oneUppercase)) {
-    console.log("Masuk one uppercase");
     return {
       validity: false,
       message: "Password must have at least an uppercase character!",
     };
   }
   else if(!password.match(oneSpecial)) {
-    console.log("Masuk one special");
     return {
       validity: false,
       message: "Password must have at least one of these characters *.!@#$%^&(){} !",
     };
   }
   else {
-    console.log("Sukses");
     return { validity: true, message: `` };
   }
 }
\ No newline at end of file
diff --git a/src/setting/account/edit/index.php b/src/setting/account/edit/index.php
index 7ec6321..a192899 100644
--- a/src/setting/account/edit/index.php
+++ b/src/setting/account/edit/index.php
@@ -101,7 +101,7 @@ AuthMiddleware::getInstance()->unsecureRoute();
                 },
                 {
                     fieldName: "password",
-                    validatorFunction: (password) => lengthCheck('password', password, 6, 50, true) && passwordCheck(password),
+                    validatorFunction: (password) => lengthCheck('password', password, 6, 50, true),
                     isFile: false
                 }
             ]
-- 
GitLab