diff --git a/docker-compose.yml b/docker-compose.yml index 4192906cc3053e0ada6bee371d200bf6308757e6..df6afec33a60e1858efb083f3301e117819ad25e 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 4b26b7973cfa586ca48cf69b54000da6415918f1..4a25df2f6f8caf6b66e1f83350c35ef73c08bbf4 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 7ec63214662e06c118b85750c64a0917bde28aa2..a192899d5194dcd8664ff965ef10a75bdd661fd4 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 } ]