@plegall, Can you try this on as many browsers as possible ? I'm not sure all browsers follow the http header redirects if status code is 401 (the http protocol specify it for 3xx status codes but not for 401)
@plegall, Can you try this on as many browsers as possible ? I'm not sure all browsers follow the http header redirects if status code is 401 (the http protocol specify it for 3xx status codes but not for 401)
<!-- github-comment-id:222450944 -->
@modus75 you're right. I even think that the HTTP code automatically becomes 302 when redirecting. You can't have a redirect and code 401, it is not logical.
So I propose to set_status_header(401) only when we do no redirect (the first case of access_denied). Do you agree?
@modus75 you're right. I even think that the HTTP code automatically becomes 302 when redirecting. You can't have a redirect and code 401, it is not logical.
So I propose to set_status_header(401) only when we do no redirect (the first case of access_denied). Do you agree?
<!-- github-comment-id:222460267 -->
It's ok with me (because I don't use this case), but it's somehow strange to redirect in case of authorization error...
It's ok with me (because I don't use this case), but it's somehow strange to redirect in case of authorization error...
<!-- github-comment-id:222470077 -->
the idea behind guest_access=false is to force connection. Whatever the page the visitor tries to open, he is redirected to identification.php as long as he is not connected. Including the home page.
the idea behind guest_access=false is to force connection. Whatever the page the visitor tries to open, he is redirected to identification.php as long as he is not connected. Including the home page.
<!-- github-comment-id:222475415 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If $conf['guest_access'] is false, we'd better perform an http redirect and not an html redirect.
@plegall, Can you try this on as many browsers as possible ? I'm not sure all browsers follow the http header redirects if status code is 401 (the http protocol specify it for 3xx status codes but not for 401)
@modus75 you're right. I even think that the HTTP code automatically becomes 302 when redirecting. You can't have a redirect and code 401, it is not logical.
So I propose to set_status_header(401) only when we do no redirect (the first case of access_denied). Do you agree?
It's ok with me (because I don't use this case), but it's somehow strange to redirect in case of authorization error...
the idea behind guest_access=false is to force connection. Whatever the page the visitor tries to open, he is redirected to identification.php as long as he is not connected. Including the home page.