[GH-ISSUE #4088] satisfy_any toggle not working #2657

Closed
opened 2026-02-26 07:36:21 +03:00 by kerem · 13 comments
Owner

Originally created by @mikeymasonic on GitHub (Oct 19, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4088

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
Whenever I set "Satisfy Any" in an access list details section, it doesn't work. For instance if I have an HTTP Auth setup and an IP route, if I access that particular proxy on a whitelisted IP, I get prompted for HTTP authentication. If I go to the proxy with a non whitelisted IP, I get 403 Forbidden and no HTTP Auth prompt. The check box does save the previous saved state however.

I've taken a look at the config files and I notice this near the end:

# Access checks must...
    
    satisfy all;

If I manually change this to satisfy any;, everything works as expected.

Another unrelated issue, I notice in the GUI I'm on version v2.12.1, but in my docker instance I see: NPM_BUILD_VERSION | 2.11.3

If I login to my docker container I see: Version 2.11.3 (35d7a3a) 2024-07-01 11:42:06 UTC
I've pulled the latest image several times.

Nginx Proxy Manager Version

v2.12.1

To Reproduce
Steps to reproduce the behavior:

  1. Access Lists
  2. Edit an existing list
  3. Add a valid whitelist ip
  4. Add an HTTP login/password
  5. Ensure Satisfy Any is checked
  6. Save
  7. Try to access proxy with your whitelisted IP, you'll still see an HTTP login
  8. Try to access proxy with non whitelisted IP, you'll get 403 - Forbidden
  9. If you manually change your proxy config file from satisfy all; to satisfy any;, everything works as expected

Expected behavior

  • No HTTP Auth prompt if using a whitelisted IP and access
  • HTTP Auth prompt if using a non whitelisted IP instead of a 403

Screenshots

Operating System

Using a docker instance on Ubuntu

Additional context

Originally created by @mikeymasonic on GitHub (Oct 19, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4088 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** Whenever I set "Satisfy Any" in an access list details section, it doesn't work. For instance if I have an HTTP Auth setup and an IP route, if I access that particular proxy on a whitelisted IP, I get prompted for HTTP authentication. If I go to the proxy with a non whitelisted IP, I get 403 Forbidden and no HTTP Auth prompt. The check box does save the previous saved state however. I've taken a look at the config files and I notice this near the end: ``` # Access checks must... satisfy all; ``` If I manually change this to `satisfy any;`, everything works as expected. Another unrelated issue, I notice in the GUI I'm on version v2.12.1, but in my docker instance I see: `NPM_BUILD_VERSION | 2.11.3` If I login to my docker container I see: `Version 2.11.3 (35d7a3a) 2024-07-01 11:42:06 UTC` I've pulled the latest image several times. **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> v2.12.1 **To Reproduce** Steps to reproduce the behavior: 1. Access Lists 2. Edit an existing list 3. Add a valid whitelist ip 4. Add an HTTP login/password 5. Ensure `Satisfy Any` is checked 6. Save 7. Try to access proxy with your whitelisted IP, you'll still see an HTTP login 8. Try to access proxy with non whitelisted IP, you'll get 403 - Forbidden 9. If you manually change your proxy config file from `satisfy all;` to `satisfy any;`, everything works as expected **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> - No HTTP Auth prompt if using a whitelisted IP and access - HTTP Auth prompt if using a non whitelisted IP instead of a 403 **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Using a docker instance on Ubuntu **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. -->
kerem 2026-02-26 07:36:21 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@binary-person commented on GitHub (Oct 23, 2024):

it seems that rolling back to "2.11.3" fixes it, but updating it to "2.12.0" and "2.12.1" breaks it

<!-- gh-comment-id:2433024372 --> @binary-person commented on GitHub (Oct 23, 2024): it seems that rolling back to "2.11.3" fixes it, but updating it to "2.12.0" and "2.12.1" breaks it
Author
Owner

@Gabri3lZ commented on GitHub (Oct 23, 2024):

It looks like the commit 4572b205c9 changed some model types from integer to boolean (one of them is the satisfy_any field). But the evaluation still checks for "satisfy_any == 1".

I don't know if this is the only case the evaluation does not match the model type anymore though.

<!-- gh-comment-id:2433311728 --> @Gabri3lZ commented on GitHub (Oct 23, 2024): It looks like the commit 4572b205c912db498706e9a3e8f1891c94129c88 changed some model types from integer to boolean (one of them is the satisfy_any field). But the evaluation still checks for "satisfy_any == 1". I don't know if this is the only case the evaluation does not match the model type anymore though.
Author
Owner

@Gabri3lZ commented on GitHub (Oct 25, 2024):

Should be fixed by dad8d0c from @chrismaffey

<!-- gh-comment-id:2437532336 --> @Gabri3lZ commented on GitHub (Oct 25, 2024): Should be fixed by dad8d0c from @chrismaffey
Author
Owner

@bill340 commented on GitHub (Oct 27, 2024):

satisfy any is always overwritten to satisfy all in the .conf file after restarting the Nginx container.
So the toggle in the GUI and also what I write in the .conf file is not used, but overwritten again...

<!-- gh-comment-id:2440172018 --> @bill340 commented on GitHub (Oct 27, 2024): satisfy any is always overwritten to satisfy all in the .conf file after restarting the Nginx container. So the toggle in the GUI and also what I write in the .conf file is not used, but overwritten again...
Author
Owner

@allenwakeup commented on GitHub (Nov 5, 2024):

/backend/templates/_access.conf (line 20)
change from
{% if access_list.satisfy_any == 1 %}
to
{% if access_list.satisfy_any == 1 or access_list.satisfy_any == true %}

docker v2.12.1

<!-- gh-comment-id:2456912251 --> @allenwakeup commented on GitHub (Nov 5, 2024): /backend/templates/_access.conf (line 20) change from {% if access_list.satisfy_any == 1 %} to {% if access_list.satisfy_any == 1 or access_list.satisfy_any == true %} docker v2.12.1
Author
Owner

@ghisch commented on GitHub (Nov 5, 2024):

You can temporarily use nginxproxymanager/nginx-proxy-manager-dev:pr-4107 as it was fixed 2W ago in https://github.com/NginxProxyManager/nginx-proxy-manager/pull/4107.

Should be fixed in next release I guess.

<!-- gh-comment-id:2457887707 --> @ghisch commented on GitHub (Nov 5, 2024): You can temporarily use `nginxproxymanager/nginx-proxy-manager-dev:pr-4107` as it was fixed 2W ago in https://github.com/NginxProxyManager/nginx-proxy-manager/pull/4107. Should be fixed in next release I guess.
Author
Owner

@deluxestyle commented on GitHub (Dec 17, 2024):

is there any update on this?
already looking for alternatives as I don't get the developer build running

<!-- gh-comment-id:2549401930 --> @deluxestyle commented on GitHub (Dec 17, 2024): is there any update on this? already looking for alternatives as I don't get the developer build running
Author
Owner

@mikeymasonic commented on GitHub (Dec 17, 2024):

@deluxestyle, I tried with the latest developer build as it shows that the PR has been merged, I use this with docker: nginxproxymanager/nginx-proxy-manager-dev:latest to pull the image. That said, it still doesn't work for me 🫠 .

Here is a script I wrote you can run on whatever machine hosts your docker instance, it changes anything that says satisfy all to satisfy any in the proxy_host/*.conf section. I just run this whenever I have to make a change, it's annoying but it works.

sudo docker exec nginxpm bash -c 'for file in /data/nginx/proxy_host/*.conf; do sed -i "s/satisfy all;/satisfy any;/g" "$file"; done'

Hope this is helpful while we wait!

<!-- gh-comment-id:2549612001 --> @mikeymasonic commented on GitHub (Dec 17, 2024): @deluxestyle, I tried with the latest developer build as it shows that the PR has been merged, I use this with docker: `nginxproxymanager/nginx-proxy-manager-dev:latest` to pull the image. That said, it still doesn't work for me 🫠 . Here is a script I wrote you can run on whatever machine hosts your docker instance, it changes anything that says `satisfy all` to `satisfy any` in the `proxy_host/*.conf` section. I just run this whenever I have to make a change, it's annoying but it works. ``` sudo docker exec nginxpm bash -c 'for file in /data/nginx/proxy_host/*.conf; do sed -i "s/satisfy all;/satisfy any;/g" "$file"; done' ``` Hope this is helpful while we wait!
Author
Owner

@Percy2Live commented on GitHub (Dec 30, 2024):

This seems to be fixed with 2.12.2

<!-- gh-comment-id:2564896581 --> @Percy2Live commented on GitHub (Dec 30, 2024): This seems to be fixed with 2.12.2
Author
Owner

@FaySmash commented on GitHub (Jan 4, 2025):

I can confirm that it is fixed in 2.12.2

<!-- gh-comment-id:2571273046 --> @FaySmash commented on GitHub (Jan 4, 2025): I can confirm that it is fixed in 2.12.2
Author
Owner

@vorwd commented on GitHub (Jan 6, 2025):

confirmed 2.12.2 fixes.

<!-- gh-comment-id:2572748860 --> @vorwd commented on GitHub (Jan 6, 2025): confirmed 2.12.2 fixes.
Author
Owner

@mgeha commented on GitHub (Jan 21, 2025):

2.12.2 fixes it here as well.

<!-- gh-comment-id:2605272224 --> @mgeha commented on GitHub (Jan 21, 2025): 2.12.2 fixes it here as well.
Author
Owner

@mikeymasonic commented on GitHub (Jan 21, 2025):

Fixed in 2.12.2!

<!-- gh-comment-id:2605710215 --> @mikeymasonic commented on GitHub (Jan 21, 2025): Fixed in 2.12.2!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2657
No description provided.