mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #1241] Browser receives html, expects json #1010
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1010
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stooj on GitHub (Sep 20, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1241
Impacted versions
Steps to reproduce
Clean installation on a clean 2GB Digital Ocean Ubuntu 16.04 droplet, try to change the admin password to something else.
Current behavior
I enter in the default password and a new password (currently just alphanumeric characters, 17 characters long).
When I click on the
Updatebutton, a POST occurs, but nginx returns a 500 error and the page stays the same.Expected behavior
The password should be updated and a success message should be shown.
I have had a look with developer tools in Chromium and Firefox, and it looks like an HTML payload is being received instead of a json payload.
The console log is:
VM168 seems to be at fault, which is:
Sorry if I have missed any information; please let me know if I can help with more.
Cheers!
@tonioo commented on GitHub (Sep 21, 2017):
Please set DEBUG to True inside settings.py and reload uwsgi, you should see a complete traceback.
@stooj commented on GitHub (Sep 21, 2017):
Aah!
Certificate is a letsencrypt one, generated using the installer.
@tonioo commented on GitHub (Sep 21, 2017):
Looks your secret key is too long. Have you modified it?
@stooj commented on GitHub (Sep 21, 2017):
No, I haven't.
I customized the installer.cfg.template before I installed, but haven't made any changes to settings (apart from teh debug flag, obviously)
Here are the changes I made:
(domain is a real one, of course)
@tonioo commented on GitHub (Sep 22, 2017):
The secret key is not in the config file, you can modify it through the admin panel.
@stooj commented on GitHub (Sep 22, 2017):
OK, I'm sure I haven't edited the secret key accidentally, because I went straight to changing the admin password.
The length of the key is 12. When you say "too long", is there a hard-limit, or is it "too long for my instance"?
It starts with a
%symbol, would that act as an escape somehow?@stooj commented on GitHub (Sep 22, 2017):
The secret key shown in the web interface is quite different to the secret key in
settings.py. The one insettings.pylooks like a proper django secret key, length 50.@tonioo commented on GitHub (Sep 22, 2017):
Yes, they are different and this is normal. The key len (the one in the web interface) should be 16, 24, or 32 characters. Can you try to change it?
@stooj commented on GitHub (Sep 22, 2017):
Yes. That has solved the issue :D
I am almost certain that I didn't change the secret key; I assumed it was the django one and would break the db if I changed it.
Is there any way that it may not have been set correctly during installation?
@tonioo commented on GitHub (Dec 3, 2017):
I don't think so. I close the issue for now.