Replies: 4 comments 11 replies
-
I don't know the answer. My instance is at https://bin.langille.org and uses the code in question. Please feel free to test your theory there. :) |
Beta Was this translation helpful? Give feedback.
-
The current wiki page is very different from what I submitted initially. Here is a link to my verison: https://github.com/PrivateBin/PrivateBin/wiki/Restrict-upload-using-NGINX/5c904dd8e5ee29882c8f735ea7aca96287866a99 In my case, there is one catch-all case, which is cookie-protected, and the auth endpoint, which is password-protected. As far as I can see, there is no problem in that. However, you are right that in the current edit, all files ending in .php are not protected at all. This is definitely bad and should be fixed. My personal config at the moment looks like this: server {
server_name foo.bar;
location / {
if ($request_method = GET) {
error_page 418 = @noauth;
return 418;
}
proxy_pass http://privatebin:8080;
}
location @noauth {
internal;
auth_request off;
proxy_pass http://privatebin:8080;
}
listen 443 ssl http2;
# set up an auth provider here
auth_request /auth;
} |
Beta Was this translation helpful? Give feedback.
-
I don't know how to convert the |
Beta Was this translation helpful? Give feedback.
-
I duplicated the |
Beta Was this translation helpful? Give feedback.
-
I randomly looked at https://github.com/PrivateBin/PrivateBin/wiki/Restrict-upload-using-NGINX and is not there a problem?
Problem
The
limit_except
is in the/
block. As such, the password authentication is only required for that access case.The
\.php$
block itself below is still unprotected.Idea
As such, POST requests to
/
should be catched by the authentication, that works, but if I directly send a POST to/index.php
from the outside, won't this circumvent the nginx authentication?Or did I understand the nginx config wrong here?
Question
@ViRb3 @dlangille edited the page, maybe you have a test instance with that config or can confirm/deny this?
Beta Was this translation helpful? Give feedback.
All reactions