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

Use OS-standard method to save and load files (Qt or other) #1

Open
Semphriss opened this issue May 28, 2024 · 1 comment
Open

Use OS-standard method to save and load files (Qt or other) #1

Semphriss opened this issue May 28, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Semphriss
Copy link
Owner

Semphriss commented May 28, 2024

Currently, Annotate uses a basic Python command that runs a CGI server that the webapp can connect to, and that CGI server handles the files.

This is ugly for several reasons:

  • Running that Python code requires full access to the system to access the necessary modules.
  • The CGI server has a problem where it will read data indefinitely, resulting in the bug documented at www/js/file_manager.mjs in the action function. (reference commit: 09fd270) This forces the user to wait exactly 1 second each time a file is saved.
  • The security is bad.
  • The code is only as stable as a Bash script can get.

The most likely replacement would be a QtWebView, unfortunately I am not even remotely familiar enough with Qt to implement the replacement.

I open this issue in the hopes that someone more experienced than me could provide some help there. If someone wants to give it a try, the only modifications needed should be in www/js/file_manager.mjs (and deleting the cgi-bin folder).

@Semphriss Semphriss added the help wanted Extra attention is needed label May 28, 2024
@Semphriss
Copy link
Owner Author

With 7904bbe, I've replaced the Python script with a custom C++ webserver. It removes the need for unconfined mode and the read-indefinitely bug, but the security is just as bad (if not worse) and probably quite inconvenient to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant