100 Commits

Author SHA1 Message Date
Saptak S
31a5d5141c Allows only specific unicode characters for username
Added a function to remove all characters apart from characters which
fall under the unicode categories of letters and numbers. Also added a
list of allowed special characters.
2024-03-08 21:00:19 +05:30
Saptak S
1179f871b1 Raise error from waitress if not shutdown 2023-10-21 18:41:02 +05:30
Miguel Jacq
796eb2b06a Add trailing slash on directories in website mode to assist with relative asset links 2023-10-17 17:45:23 +11:00
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
5d6e4ecd01 Use a TemporaryDirectory instead of NamedTemporaryFile to avoid opening an already open file in Windows 2022-02-09 18:19:50 -08:00
Micah Lee
4988734396 Merge branch 'ros-fixes' into release-2.5 2022-01-17 09:51:25 -08:00
Micah Lee
ba1fde54a9 Update copyright year to 2022 2022-01-16 16:15:49 -08:00
Micah Lee
3d880afe7a Merge branch 'develop' of github.com:onionshare/onionshare into ros-fixes 2022-01-16 15:49:33 -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
Micah Lee
5f17b47d1a Fix permission denied error in Windows, which was introduced using tempfile.NamedTemporaryFile, by using a TemporaryDirectory instead 2021-12-21 14:28:23 -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
167f4a8cc1 Add temp file to cleanup list just once when its first created 2021-12-02 18:51:06 -08:00
Micah Lee
6c72e9e7a5 Fix CLI tests 2021-12-01 21:01:32 -08: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
Micah Lee
926359de3c Use NamedTemporaryFile instead of TemporaryFile, to fix crash when sharing one file 2021-12-01 20:10:51 -08:00
Saptak S
4df863ce4d Checks if username is ASCII string else throw an error 2021-11-30 01:19:29 +05:30
Saptak S
b525a190e9 Removes invisible whitespace characters from username in chat 2021-11-19 15:25:10 +05:30
Micah Lee
c80303df35 Use a NamedTemporaryFile instead of TemporaryFile for streamed gzip files 2021-11-18 20:17:39 -08:00
Micah Lee
9663f78147 Use high level tempfile classes that clean up after themselves 2021-11-18 20:03:18 -08:00
Micah Lee
c29ffdf9fa Merge branch 'advisory-fix-1' of github.com:onionshare/onionshare-ghsa-jh82-c5jw-pxpc into ros-fixes 2021-11-18 19:16:00 -08:00
Micah Lee
3641f829ff Merge branch 'chat-session-handling' of github.com:onionshare/onionshare-ghsa-gjj5-998g-v36v into ros-fixes 2021-11-18 19:15:24 -08:00
Saptak S
132bbb0db9 Refuses connection if another session is already active 2021-11-14 23:44:16 +05:30
Saptak S
e9e2afe2ee Adds username validation for socketio event handler as well 2021-11-14 23:28:17 +05:30
Saptak S
6031f36185 Renames message event to chat_message 2021-11-14 21:06:47 +05:30
Saptak S
7f846ae2fd Removed room from chat
- Uses the global room instead of adding and leaving room for users
- Removes the joining event and triggers connection status from
server as soon as a connection event is received in server side
2021-11-14 20:58:21 +05:30
Miguel Jacq
7c41721d42 Use microseconds for Receive Mode dir/file names 2021-11-09 12:30:48 +11:00
Miguel Jacq
ff45a5c76b Support sending a custom Content-Security-Policy header in Website mode 2021-11-08 16:31:05 +11:00
Saptak S
19da3d73a3 Removes trailing slash from directories inside directories 2021-09-04 20:41:22 +05:30
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 Sengupta
4f69e387e0 Merge pull request #1399 from easyteacher/develop
Make last_modified and if_date timezone-aware (Fix #1398)
2021-09-04 00:13:12 +05:30
Fushan Wen
8baad0eeb5 Make last_modified and if_date timezone-aware
Fix #1398
2021-09-03 00:07:48 +08: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
81fc11ef74 fix typo 2021-05-31 12:23:32 +00:00
whew
8c7e75f194 Merge branch 'develop' into add_security_headers 2021-05-31 12:13:58 +00:00
whew
da1e6eb866 resolve conflict in chat_mode.py 2021-05-31 12:05:31 +00:00
whew
2d79bcdfcc resolve conflict in web.py 2021-05-31 12:04:24 +00:00
Micah Lee
8e284f1027 Merge branch 'fix_405_error_and_other_methods' of https://github.com/mig5/onionshare into mig5-fix_405_error_and_other_methods 2021-05-25 16:27:26 -07:00