NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.83k stars 2.65k forks source link

Acces Lists broken in 2.9.20 #2692

Closed IUxp8xz9 closed 1 year ago

IUxp8xz9 commented 1 year ago

Checklist

Describe the bug Since today, I cannot successfully add Access Lists. In the GUI i get an Internal Server Error, in the logs I get:

at ChildProcess.exithandler (node:child_process:402:12)

    at ChildProcess.emit (node:events:513:28)

    at maybeClose (node:internal/child_process:1100:16)

    at Socket. (node:internal/child_process:458:11)

    at Socket.emit (node:events:513:28)

    at Pipe. (node:net:301:12)

[3/16/2023] [5:32:16 PM] [Access   ] › ✔  success   Built Access file #7 for: Ich

[3/16/2023] [5:32:16 PM] [Express  ] › ⚠  warning   Command failed: /usr/bin/htpasswd

Nginx Proxy Manager Version v2.9.20, image pulled today at 3 a.m.

To Reproduce Steps to reproduce the behavior:

  1. Go to Access Lists
  2. Click on Add Access List
  3. Fill out the form, click on Save
  4. See error: Internal Server Error
  5. Refresh the page, list exists, editing gives the same error
  6. Add list to proxy host, host switches to offline, gives 403 error.

Expected behavior Working as in version 2.9.19

Additional context Going back to 2.9.19 fixes the error.

Microbolt commented 1 year ago

I'm having issues with ACL's too. I get an internal server error when I try to edit an ACL or an host that is using an ACL and when it writes out the nginx.conf it will only show the ; where the rules are normally at. For example

I'm running with docker using the image jc21/nginx-proxy-manager:2

Upon launch I was getting an error nginx: [emerg] unexpected ";" in /data/nginx/proxy_host/10.conf:64

If I look inside of 10.conf looks like where the ACL ips should be are blank lines with just a semicolon at end:

location / {
    # Access Rules
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    deny all;
    # Access checks must...
    satisfy all;

Workaround that got me back up and running (if it helps anyone else)

That will rebuild the ACL and get you back up and running.

SpecialAro commented 1 year ago

I confirm that I'm having the same issue and that rolling back to 2.9.19 solves it.

jc21 commented 1 year ago

@Microbolt your issue is due to a problem with ObjectionJS not returning prototyped objects anymore, something has changed somewhere in the dependencies, but I'm looking into it.

jc21 commented 1 year ago

Please try the github-develop docker image tag for these fixes

ghost commented 1 year ago

Can confirm the fix for ACL works in the github-develop branch (and the cert configs are not nuked :) ). Related: #2691