37 Commits

Author SHA1 Message Date
Saptak S
1179f871b1 Raise error from waitress if not shutdown 2023-10-21 18:41:02 +05:30
Miguel Jacq
db2d920497 Raise a Waitress exception into the UI with a modal dialog and reset the share if it occurs 2023-05-31 15:38:52 +10:00
Miguel Jacq
675599399a Stop Waitress immediately rather than waiting 2023-05-30 16:19:37 +10:00
Miguel Jacq
81cd90bab6 Removed some deprecation warnings spotted in pytest output. Harden waitress 2023-05-30 10:46:11 +10:00
Miguel Jacq
f50a552df4 Switch to Waitress and Flask-Compress in lieu of werkzeug server 2023-05-29 14:46:17 +10:00
Micah Lee
a5af14062d Fix stubbed_show_server_banner function, so CLI tests pass 2022-09-30 13:27:25 -07:00
Micah Lee
31bf763baa Remove cleanup_tempfiles altogether because they are not being used 2022-02-13 10:40:55 -08:00
Micah Lee
ba1fde54a9 Update copyright year to 2022 2022-01-16 16:15:49 -08:00
Micah Lee
26ad8a22ad Solve obnoxious cx_Freeze issue that broke websockets by enforcing async_mode=gevent, and including the correct modules in the build 2021-12-21 16:55:59 -08:00
Micah Lee
c74c23d658 Enable websocket logs in verbose mode 2021-12-21 15:01:35 -08:00
Miguel Jacq
e00db31de5 Force the MIME type for .js files to be text/javascript, to override silly OS databases/registries with incorrect settings, which Flask would otherwise depend on 2021-12-17 17:53:15 +11:00
Micah Lee
5322d4f037 Merge branch 'develop' into 1470_tempfiles 2021-12-01 20:37:45 -08:00
Micah Lee
2ff5f53c69 Explicitly cleanup temp files and dirs 2021-12-01 20:34:54 -08:00
Miguel Jacq
ff45a5c76b Support sending a custom Content-Security-Policy header in Website mode 2021-11-08 16:31:05 +11:00
Micah Lee
78aa64aab9 Merge pull request #1416 from SaptakS/fix-chat-shutdown
Adds exception for ConnectionError in chat mode during shutdown
2021-09-03 13:23:43 -07:00
Saptak S
5d3a0cfa38 Adds exception for ConnectionError in chat mode during shutdown
The way flask-socketio stops a connection when running using
eventlet is by raising SystemExit to abort all the processes.
Hence the connections are closed and no response is returned
So I am just catching the ConnectionError to check if it was
chat mode, in which case it's okay.
2021-09-02 18:57:21 +05:30
Miguel Jacq
0f3a5fdabf Merge develop and resolve conflict 2021-08-30 13:41:15 +10:00
Miguel Jacq
baba958040 Remove rate-limit related code, and a couple more places where flask-httpauth was referenced 2021-08-28 09:41:09 +10:00
Miguel Jacq
5d9554438f ClientAuthV3 fixes
* Remove Client Auth as an explicit option (it's on by default).
 * Update wording about Public mode
 * Fix tuple error when raising TorTooOldStealth exception in CLI
 * Move Private Key button next to URL button in GUI
 * Replace visual references of ClientAuth to Private Key
 * Remove HTTPAuth Flask dependency and remove a lot of code to do with password generation,
   401 auth triggers/invalid password rate limit detection etc
 * Test updates
 * Remove obsolete locale keys
2021-08-27 15:52:29 +10:00
Micah Lee
961e920878 Remove endpoint altogether because it's not needed 2021-08-20 11:59:26 -07:00
Twann
d83a4e3ebc Fix issue #1365 2021-08-19 16:15:53 +02:00
whew
8d0b261fb7 fix another typo... 2021-05-31 12:28:57 +00:00
whew
2d79bcdfcc resolve conflict in web.py 2021-05-31 12:04:24 +00:00
whew
c9bc5759c1 Update web.py 2021-05-13 08:17:51 +00:00
Miguel Jacq
aa7a6e321b Move the 'supports_file_requests' attribute into the actual modes rather than the Web class 2021-05-11 09:25:22 +10:00
Miguel Jacq
52d625203c Adds attribute self.mode_supports_file_requests in Web class. Don't send REQUEST_INDIVIDUAL_FILE_STARTED to the frontend if the mode doesn't support this, so that we don't trigger a chain reaction of toggling history widgets and the like. Set this attribute to True by default since most modes use it, but turn it off for Chat mode. Prevents an exception when sending a bad HTTP method or a 404 to a chat room 2021-05-11 08:41:17 +10:00
Miguel Jacq
d1cbe2faf6 Fix HTTP return code for custom 500 internal server error handler 2021-05-10 15:57:23 +10:00
Miguel Jacq
92027345d0 Register the 405 error handler properly. Enforce the appropriate methods for each route (GET or POST only, with OPTIONS disabled). Add tests for invalid methods. Add a friendlier 500 internal server error handler 2021-05-10 11:23:44 +10:00
Miguel Jacq
ff5e73a2ae Move the cleanup() function from Onionshare class to Web class, so that the list of files to be cleaned up is always available (needed for website temp files) 2021-05-04 16:21:42 +10:00
Micah Lee
34b791abcf GUI displays "Read Message" button when a receive mode submission includes a message 2021-04-30 17:16:02 -07:00
Micah Lee
cfbf07b903 Fix flake8 issues found in cli 2021-04-29 17:13:05 -07:00
Miguel Jacq
a21498067c Update the Content-Security-Policy: remove style-src and script-src which are inherited by default-src. Add frame-ancestors, form-action and base-uri which do not inherit default-src 2021-04-29 10:09:44 +10:00
Saptak S
934136b345 Force shutdowns the socket server on closing chat server 2021-04-19 02:59:22 +05:30
Aksh Gupta
6805f6acae chore: refactor code quality issues 2021-03-10 22:59:47 +05:30
Micah Lee
4f5f75cc25 Update copyright year to 2021 2021-02-22 13:35:14 -08:00
Tim Gates
52f6ee7b47 docs: fix simple typo, progess -> progress
There is a small typo in cli/onionshare_cli/web/web.py.

Should read `progress` rather than `progess`.
2020-12-24 10:34:47 +11:00
Micah Lee
a54f99adf6 Add onionshare CLI to cli folder, move GUI to desktop folder, and start refactoring it to work with briefcase 2020-10-12 22:40:55 -07:00