mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.94k stars 1.17k forks source link

Issues setting rspamd UI password #4836

Closed Grinch closed 1 year ago

Grinch commented 2 years ago

Contribution guidelines

I've found a bug and checked that ...

Description

Attempting to set the rspamd password results in the web interface throwing the following error.

local variable 'matched' referenced before assignment

Logs

mailcowdockerized-php-fpm-mailcow-1    | fd4d:6169:6c63:6f77::4 -  02/Nov/2022:22:06:56 -0500 "HEAD /settings.php" 304
mailcowdockerized-nginx-mailcow-1      | 172.22.1.6 - - [02/Nov/2022:22:06:56 -0500] "HEAD /settings.php HTTP/1.1" 304 0 "-" "rspamd-3.2"
mailcowdockerized-php-fpm-mailcow-1    | 172.22.1.3 -  02/Nov/2022:22:06:59 -0500 "GET /settings.php" 200
mailcowdockerized-nginx-mailcow-1      | 172.22.1.10 - - [02/Nov/2022:22:06:59 -0500] "GET /settings.php HTTP/1.1" 200 722 "-" "-"
mailcowdockerized-php-fpm-mailcow-1    | 172.22.1.3 -  02/Nov/2022:22:06:59 -0500 "POST /admin.php" 200
mailcowdockerized-nginx-mailcow-1      | 10.52.16.2 - - [02/Nov/2022:22:06:59 -0500] "POST /admin HTTP/2.0" 200 31164 "https://mail.inspirenxe.org/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26"
mailcowdockerized-php-fpm-mailcow-1    | fd4d:6169:6c63:6f77::4 -  02/Nov/2022:22:06:59 -0500 "GET /json_api.php" 200
mailcowdockerized-nginx-mailcow-1      | 10.52.16.2 - - [02/Nov/2022:22:06:59 -0500] "GET /api/v1/get/presets/rspamd HTTP/2.0" 200 504 "*redacted*" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26"
mailcowdockerized-php-fpm-mailcow-1    | 172.22.1.3 -  02/Nov/2022:22:06:59 -0500 "GET /json_api.php" 200
mailcowdockerized-nginx-mailcow-1      | 10.52.16.2 - - [02/Nov/2022:22:06:59 -0500] "GET /api/v1/get/passwordpolicy/html HTTP/2.0" 200 86 "*redacted*" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26"
mailcowdockerized-php-fpm-mailcow-1    | fd4d:6169:6c63:6f77::4 -  02/Nov/2022:22:06:59 -0500 "GET /json_api.php" 200
mailcowdockerized-nginx-mailcow-1      | 10.52.16.2 - - [02/Nov/2022:22:06:59 -0500] "GET /api/v1/get/admin/all?_=1667444819750 HTTP/2.0" 200 113 "*redacted*" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26"
mailcowdockerized-php-fpm-mailcow-1    | 172.22.1.3 -  02/Nov/2022:22:06:59 -0500 "GET /json_api.php" 200
mailcowdockerized-nginx-mailcow-1      | 10.52.16.2 - - [02/Nov/2022:22:06:59 -0500] "GET /api/v1/get/domain-admin/all?_=1667444819751 HTTP/2.0" 200 22 "*redacted*" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26"

Steps to reproduce

  1. Login to admin panel
  2. Go to System -> Configuration -> Access -> Rspamd UI
  3. Attempt to set a matching password of 6 characters or more
  4. Observe error

System information

Question Answer
My operating system Ubuntu 22.04.1
Is Apparmor, SELinux or similar active? No
Virtualization technology (KVM, VMware, Xen, etc - LXC and OpenVZ are not supported ESXi
Server/VM specifications (Memory, CPU Cores) 8GB RAM, 2 cores
Docker version (docker version) 20.10.21
docker-compose version (docker-compose version) 2.12.2
mailcow version (git describe --tags `git rev-list --tags --max-count=1`) 2022-10a
Reverse proxy (custom solution) n/a
FreddleSpl0it commented 1 year ago

do you use the nightly builds?

Grinch commented 1 year ago

Yes, it was on a nightly build.

FreddleSpl0it commented 1 year ago

ok, i noticed the error last week too. the dockerapi tries to run the script set_worker_password.sh here but in the rspamd container the script is called set_web_password.sh. will be fixed soon.

DerLinkman commented 1 year ago

Fixed in nightly