mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 17:36:01 +03:00
[GH-ISSUE #3661] webmail search internal server error (when query is words with space) #1880
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#1880
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 @xinomilo on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3661
Impacted versions
Steps to reproduce
try to search for any 2 words with spaces in webmail.
Current behavior
internal server error produced if search query contains spaces. example "word word". (same with any 2 words with space).
uwsgi log :
example.net [pid: 3944542|app: 1|req: 131/1189] xxx.xxx.xxx.xxx () {60 vars in 1109 bytes} [Wed Aug 6 11:07:31 2025] GET /api/v2/webmail/emails/?mailbox=INBOX&page=1&search=word+word => generated 116 bytes in 891 msecs (HTTP/2.0 500) 5 headers in 173 bytes (2 switches on core 0)
browser red popup msg : { "error": "UID command error: BAD [b'Error in IMAP command UID SORT: Unknown argument WORD (0.001 + 0.000 secs).']" }
Report at /api/v2/webmail/emails/
Internal Server Error: /api/v2/webmail/emails/
Request Method: GET
Request URL: https://example.net/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=word+word
Django Version: 5.2.4
Exception Location: , line , in
Raised during: modoboa.webmail.viewsets.UserEmailViewSet
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.11.2
Python Path:
['.',
'',
'/usr/lib/python311.zip',
'/usr/lib/python3.11',
'/usr/lib/python3.11/lib-dynload',
'/srv/modoboa/env/lib/python3.11/site-packages']
Server time: Wed, 06 Aug 2025 11:08:17 +0000
Traceback
Request information
USER
user@example.net
GET
Variable Value
mailbox
'INBOX'
page
'1'
search
'word word'
POST
No POST data
FILES
No FILES data
COOKIES
Variable Value
csrftoken
'********************'
django_language
'el'
sessionid
'********************'
Expected behavior
webmail search works.
thanks in advance,