72 Commits

Author SHA1 Message Date
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
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
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
Miguel Jacq
1e5e886577 Prevent usernames in Chat mode of length 128 chars or more 2021-05-14 10:44:14 +10:00
whew
c9bc5759c1 Update web.py 2021-05-13 08:17:51 +00:00
whew
4e335800a5 Update share_mode.py 2021-05-13 08:15:17 +00:00
whew
a2ba9e5f1d Update send_base_mode.py 2021-05-13 08:14:33 +00:00
whew
6652ae5a5b Update receive_mode.py 2021-05-13 08:13:43 +00:00
whew
64b6abdf64 Update chat_mode.py 2021-05-13 08:11:29 +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
c2bd0a6a22 Disable OPTIONS on the update-session-username route on Chat mode 2021-05-11 08:39:44 +10:00
Miguel Jacq
e409141362 Website mode doesn't need to support POST as a method 2021-05-11 08:14:49 +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
Micah Lee
cde0c30c9d Merge branch 'develop' into 1275_fix_website_mode 2021-05-04 20:02:54 -07:00
Micah Lee
4f87088932 When building the self.files, use forward slashes instead of backslashes in Windows 2021-05-04 20:01:30 -07:00
Miguel Jacq
7092e4ebee Remove unnecessary cleanup_filenames appending in the CompressThread. Ensure we also remove the temp dir that a Zip file is made within, by setting the temp dir in ZipWriter as a variable 2021-05-04 16:42:23 +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
ddbd7a2fb9 Fix GUI tests 2021-05-02 14:34:09 -07: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
abf5b05280 If no files are uploaded, delete the empty receive mode dir that was created 2021-04-30 15:57:11 -07:00
Micah Lee
64234ad72f Remove periods from receive mode time folder names, and save the message outside of the time folder 2021-04-30 15:53:23 -07:00
Micah Lee
031b5c9e92 If a text message is received, save it in the ReceiveModeRequest object, and add includes_text=True to REQUEST_STARTED 2021-04-30 14:12:41 -07:00
Micah Lee
cfbf07b903 Fix flake8 issues found in cli 2021-04-29 17:13:05 -07:00
Micah Lee
754c7d96dd Merge branch 'develop' into 1305_receive_messages 2021-04-29 16:58:33 -07:00
Micah Lee
4ff41f7735 Merge pull request #1337 from mig5/update_csp
Update the Content-Security-Policy
2021-04-29 01:24:04 +00: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
Micah Lee
ea17eacf43 WIP: Starting to make messages in receive mode work in GUI 2021-04-28 19:10:26 -04:00
Saptak Sengupta
8f9d21f783 Merge pull request #1327 from micahflee/1306_customization
Allow custom title for each onion service
2021-04-28 14:43:10 +05:30
Micah Lee
b343d391b3 Allow sending messages as well as uploading files in receive mode 2021-04-25 20:46:06 -04:00