Skip to content
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

Can't edit long Sieve script in WebApp after Python upgrade to 3.9.x #895

Open
3 tasks done
Smith4545 opened this issue Aug 11, 2023 · 1 comment
Open
3 tasks done
Labels

Comments

@Smith4545
Copy link

Prerequisites

  • Tried the most recent nightly build
  • Checked if your issue is already reported.
  • Answered all the questions in this template (Or provide a working crystal ball).

What happened?

Recently we upgraded our server running the WebApp from Debian 10 to Debian 11. This meant that we moved from Python 3.7.3 to Python 3.9.2. We aren't using any virtualenv, but the native system packages (due to virtually no dependencies).

With this upgrade the Webapp the following Bug was introduced:

  1. Authenticate
  2. Open up a "long" Sieve-Skript (in our case: about 900 lines)
  3. The Connection between WebApp and Sieve-Server gets terminated.

What did you expect to happen?

  • The connection shouldn't have been terminated.

Logs and Traces

We redirect our logging to Journald and I turned up the loglevel to logging.DEBUG

Aug 11 09:18:23 python3[223370]: 2023-08-11 09:18:23 INFO [handle_request] websocket.py : Websocket Request for /websocket/REDACTED
Aug 11 09:18:33 python3[223370]: 2023-08-11 09:18:33 DEBUG [run] messagepump.py : bytearray(b'AUTHENTICATE "PLAIN" REDACTED"\r\n')
Aug 11 09:18:33 python3[223370]: 2023-08-11 09:18:33 DEBUG [run] messagepump.py : b'OK "Logged in."\r\n'
Aug 11 09:18:33 python3[223370]: 2023-08-11 09:18:33 DEBUG [run] messagepump.py : bytearray(b'LISTSCRIPTS\r\n')
Aug 11 09:18:33 python3[223370]: 2023-08-11 09:18:33 DEBUG [run] messagepump.py : b'"managesieve" ACTIVE\r\nOK "Listscripts completed."\r\n'
Aug 11 09:18:38 python3[223370]: 2023-08-11 09:18:38 DEBUG [run] messagepump.py : bytearray(b'GETSCRIPT "managesieve"\r\n')
Aug 11 09:18:38 python3[223370]: 2023-08-11 09:18:38 DEBUG [run] messagepump.py : b'{32169}\r\n' ...

the script follows in 8 blocks

Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 DEBUG [run] messagepump.py : bytearray(b'CHECKSCRIPT {32169+}\r\nrequire "copy"; ...

a part of the script follows

Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 DEBUG [__exit__] sievesocket.py : <class 'Exception'>
Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 DEBUG [__exit__] sievesocket.py : Client to server messages have to be masked.
Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 DEBUG [__exit__] sievesocket.py : <traceback object at 0x7f75b8941ec0>
Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 DEBUG [__exit__] websocket.py : On Exit
Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 WARNING [handle_message] webserver.py : Client to server messages have to be masked.
Aug 11 09:18:39 python3[223370]: 2023-08-11 09:18:39 WARNING [handle_message] webserver.py : Traceback (most recent call last):
Aug 11 09:18:39 python3[223370]:   File "/opt/thsmi/sieve/sieve-0.6.1-web/script/webserver.py", line 65, in handle_message
Aug 11 09:18:39 python3[223370]:     handler.handle_request(context, request)
Aug 11 09:18:39 python3[223370]:   File "/opt/thsmi/sieve/sieve-0.6.1-web/script/handler/websocket.py", line 48, in handle_request
Aug 11 09:18:39 python3[223370]:     MessagePump().run(websocket, sievesocket)
Aug 11 09:18:39 python3[223370]:   File "/opt/thsmi/sieve/sieve-0.6.1-web/script/messagepump.py", line 26, in run
Aug 11 09:18:39 python3[223370]:     data = server.recv()
Aug 11 09:18:39 python3[223370]:   File "/opt/thsmi/sieve/sieve-0.6.1-web/script/websocket.py", line 145, in recv
Aug 11 09:18:39 python3[223370]:     raise Exception("Client to server messages have to be masked.")
Aug 11 09:18:39 python3[223370]: Exception: Client to server messages have to be masked.

Which Version

Include information about your system, server and most important if it is about the app or webextension.

@Smith4545
Copy link
Author

As addition: This is not an issue on short Sieve-Scripts.

@thsmi thsmi added the WebApp label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants