[GH-ISSUE #606] Can't log in as normal user #570

Closed
opened 2026-02-27 11:12:26 +03:00 by kerem · 10 comments
Owner

Originally created by @piwats on GitHub (Sep 23, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/606

This is the error I get when I try to login as a normal user in modoboa:
admin login is fine, normal user is obviously not:

Environment:

Request Method: GET
Request URL: https://mysite.com/modoboa/

Django Version: 1.5.10
Python Version: 2.7.7
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'south',
'reversion',
'modoboa',
'modoboa.core',
'modoboa.lib',
'modoboa.extensions.admin',
'modoboa.extensions.postfix_relay_domains',
'modoboa.extensions.limits',
'modoboa.extensions.postfix_autoreply',
'modoboa.extensions.webmail',
'modoboa.extensions.stats',
'modoboa.extensions.sievefilters',
'modoboa.extensions.amavis')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.transaction.TransactionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'modoboa.lib.middleware.AjaxLoginRedirect',
'modoboa.lib.middleware.CommonExceptionCatcher',
'modoboa.lib.middleware.ExtControlMiddleware',
'modoboa.lib.middleware.RequestCatcherMiddleware')

Traceback:
File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  2.             return view_func(request, _args, *_kwargs)
    
    File "/usr/lib64/python2.7/site-packages/modoboa/lib/webutils.py" in topredirection
  3.         path = infos["url"] if infos["url"] else infos["name"]
    

Exception Type: TypeError at /
Exception Value: 'NoneType' object has no attribute 'getitem'


Also I find this lines in the log:

Internal Server Error: /modoboa/quarantine/process/
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py", line 113, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, _args, *_kwargs)
File "/usr/lib64/python2.7/site-packages/modoboa/extensions/amavis/views.py", line 268, in process
return delete(request, ids)
File "/usr/lib64/python2.7/site-packages/modoboa/extensions/amavis/lib.py", line 30, in wrapped_f
return f(request, _args, *_kwargs)
File "/usr/lib64/python2.7/site-packages/modoboa/extensions/amavis/views.py", line 163, in delete
r, i = mid.split()
ValueError: too many values to unpack

What is going on?

-Paul

Originally created by @piwats on GitHub (Sep 23, 2014). Original GitHub issue: https://github.com/modoboa/modoboa/issues/606 This is the error I get when I try to login as a normal user in modoboa: admin login is fine, normal user is obviously not: Environment: Request Method: GET Request URL: https://mysite.com/modoboa/ Django Version: 1.5.10 Python Version: 2.7.7 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'south', 'reversion', 'modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.extensions.admin', 'modoboa.extensions.postfix_relay_domains', 'modoboa.extensions.limits', 'modoboa.extensions.postfix_autoreply', 'modoboa.extensions.webmail', 'modoboa.extensions.stats', 'modoboa.extensions.sievefilters', 'modoboa.extensions.amavis') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.transaction.TransactionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'modoboa.lib.middleware.AjaxLoginRedirect', 'modoboa.lib.middleware.CommonExceptionCatcher', 'modoboa.lib.middleware.ExtControlMiddleware', 'modoboa.lib.middleware.RequestCatcherMiddleware') Traceback: File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py" in get_response 1. response = callback(request, _callback_args, *_callback_kwargs) File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view 2. return view_func(request, _args, *_kwargs) File "/usr/lib64/python2.7/site-packages/modoboa/lib/webutils.py" in topredirection 3. path = infos["url"] if infos["url"] else infos["name"] Exception Type: TypeError at / Exception Value: 'NoneType' object has no attribute '**getitem**' --- Also I find this lines in the log: Internal Server Error: /modoboa/quarantine/process/ Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py", line 113, in get_response response = callback(request, _callback_args, *_callback_kwargs) File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view return view_func(request, _args, *_kwargs) File "/usr/lib64/python2.7/site-packages/modoboa/extensions/amavis/views.py", line 268, in process return delete(request, ids) File "/usr/lib64/python2.7/site-packages/modoboa/extensions/amavis/lib.py", line 30, in wrapped_f return f(request, _args, *_kwargs) File "/usr/lib64/python2.7/site-packages/modoboa/extensions/amavis/views.py", line 163, in delete r, i = mid.split() ValueError: too many values to unpack What is going on? -Paul
kerem closed this issue 2026-02-27 11:12:26 +03:00
Author
Owner

@tonioo commented on GitHub (Sep 24, 2014):

Did you change something recently? If you have updated to 1.1.6, don't forget to restart uwsgi (or the alternative you use).

<!-- gh-comment-id:56632090 --> @tonioo commented on GitHub (Sep 24, 2014): Did you change something recently? If you have updated to 1.1.6, don't forget to restart uwsgi (or the alternative you use).
Author
Owner

@piwats commented on GitHub (Sep 24, 2014):

apart the update to 1.1.6 I haven't changed anything.

I rerun collectstatic and migratedb, now this comes, when I try to login as a normal user:

Internal Server Error: /modoboa/
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py", line 113, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, _args, *_kwargs)
File "/usr/lib64/python2.7/site-packages/modoboa/lib/webutils.py", line 159, in topredirection
path = infos["url"] if infos["url"] else infos["name"]
TypeError: 'NoneType' object has no attribute 'getitem'

<!-- gh-comment-id:56690895 --> @piwats commented on GitHub (Sep 24, 2014): apart the update to 1.1.6 I haven't changed anything. I rerun collectstatic and migratedb, now this comes, when I try to login as a normal user: Internal Server Error: /modoboa/ Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py", line 113, in get_response response = callback(request, _callback_args, *_callback_kwargs) File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view return view_func(request, _args, *_kwargs) File "/usr/lib64/python2.7/site-packages/modoboa/lib/webutils.py", line 159, in topredirection path = infos["url"] if infos["url"] else infos["name"] TypeError: 'NoneType' object has no attribute '__getitem__'
Author
Owner

@tonioo commented on GitHub (Sep 24, 2014):

Have you restarted apache/nginx/uwsgi/whatever ?

<!-- gh-comment-id:56695106 --> @tonioo commented on GitHub (Sep 24, 2014): Have you restarted apache/nginx/uwsgi/whatever ?
Author
Owner

@piwats commented on GitHub (Sep 24, 2014):

Yes,

nginx was restarted,
uwsgi, too.

this comes only when I login as a normal user. Admin log in is just fine....

<!-- gh-comment-id:56701202 --> @piwats commented on GitHub (Sep 24, 2014): Yes, nginx was restarted, uwsgi, too. this comes only when I login as a normal user. Admin log in is just fine....
Author
Owner

@tonioo commented on GitHub (Sep 24, 2014):

I can't reproduce your issue... Can you tell me what is the value of the "Default top redirection" parameter ?

<!-- gh-comment-id:56719593 --> @tonioo commented on GitHub (Sep 24, 2014): I can't reproduce your issue... Can you tell me what is the value of the "Default top redirection" parameter ?
Author
Owner

@piwats commented on GitHub (Sep 24, 2014):

When login was not possible, Default top redirect. was amavis.

I changed to webmail, now login is possible...

When changed back to amavis, now it also does work.

I'm a bit clueless and confused right now, why this even happened....

Bug is to be closed? Is it a bug at all?

<!-- gh-comment-id:56726470 --> @piwats commented on GitHub (Sep 24, 2014): When login was not possible, Default top redirect. was amavis. I changed to webmail, now login is possible... When changed back to amavis, now it also does work. I'm a bit clueless and confused right now, why this even happened.... Bug is to be closed? Is it a bug at all?
Author
Owner

@tonioo commented on GitHub (Sep 24, 2014):

I don't really know... Leave it opened, I'll try to investigate a bit.

<!-- gh-comment-id:56730930 --> @tonioo commented on GitHub (Sep 24, 2014): I don't really know... Leave it opened, I'll try to investigate a bit.
Author
Owner

@machinefixer commented on GitHub (Jan 28, 2015):

I got same problem, and I didn't see any error alert in my modoboa log.
Here's my package version list:

  • Ubuntu 14.04
  • Nginx/1.4.6(Ubuntu)
  • Postfix/2.11.0
  • Dovecot/2.2.9
  • Modoboa/1.2.0
  • Gunicorn/19.1.1
  • Django/1.6.10

Any idea?

<!-- gh-comment-id:71809848 --> @machinefixer commented on GitHub (Jan 28, 2015): I got same problem, and I didn't see any error alert in my modoboa log. Here's my package version list: - Ubuntu 14.04 - Nginx/1.4.6(Ubuntu) - Postfix/2.11.0 - Dovecot/2.2.9 - Modoboa/1.2.0 - Gunicorn/19.1.1 - Django/1.6.10 Any idea?
Author
Owner

@tonioo commented on GitHub (Jan 28, 2015):

Try with DEBUG = True (settings.py) and please use a tool like firebug to catch AJAX errors.

<!-- gh-comment-id:71810080 --> @tonioo commented on GitHub (Jan 28, 2015): Try with DEBUG = True (settings.py) and please use a tool like firebug to catch AJAX errors.
Author
Owner

@machinefixer commented on GitHub (Jan 28, 2015):

I just fixed my problem. I forgot that I create a test user 'abc' on my Ubuntu before I install modoboa, and later I create a test normal user with same user name 'abc@mydomain' in Modoboa, so it seems the Modoboa user name conflict with the system user.
After I delete my system test user, I am able to login into Modoboa as 'abc@mydomain'.

<!-- gh-comment-id:71815091 --> @machinefixer commented on GitHub (Jan 28, 2015): I just fixed my problem. I forgot that I create a test user 'abc' on my Ubuntu before I install modoboa, and later I create a test normal user with same user name 'abc@mydomain' in Modoboa, so it seems the Modoboa user name conflict with the system user. After I delete my system test user, I am able to login into Modoboa as 'abc@mydomain'.
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/modoboa-modoboa#570
No description provided.