-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login fails when BASE_PATH set #10837
Comments
Checking developer console in an incognito window, I see the following response headers from the POST to login:
I note that the csrftoken and sessionid have path Logging into a VM which is running Netbox v3.2.9 (but also with
That seems to confirm my theory. Maybe this isn't a Netbox issue, but a Django one, since upgrading Netbox would also have rebuilt the virtualenv. |
On my test VM, I wound it back from 3.3.7 to 3.3.5, and I find that login is successful again (and the cookies have I wound it forward to 3.3.6, and it stopped working ( Aha: almost certainly it's this from the 3.3.6 release notes:
... which in turn came from PR #10706 |
This is a quick-and-dirty patch that fixes it for me. I'll leave you to decide whether you want to DRY this.
|
Thanks for tracking this down @candlerb! |
Thanks for pointing this out. In https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/settings.py#L81 makes sure
just to be super explicit (or use a comment on your line that |
NetBox version
v3.3.7
Python version
3.8
Steps to Reproduce
BASE_PATH = 'netbox/'
. Adjust Apache config accordingly.Expected Behavior
Should be able to login normally.
Observed Behavior
First time you click on the Log In button: you get the login page, and then you are returned to the front screen with a pop-up saying "Logged in as admin". However at this point you are still logged out, and the top-right button shows "Log In" rather than your username. Subsequent clicks of this button just refresh the screen, but you are still logged out.
Tested with Chrome and Firefox: identical behaviour.
This worked with v3.3.5 but doesn't work with v3.3.7.
I haven't determined exactly where it changed, but I have reproduced this on two independent systems.This broke in v3.3.6.The text was updated successfully, but these errors were encountered: