mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-06 16:35:03 -04:00
Add an error 401 handler, and make it start counting invalid password guesses instead of 404 errors for rate limiting
This commit is contained in:
parent
2a50bbc3bc
commit
79b87c3e30
7 changed files with 56 additions and 28 deletions
|
@ -472,7 +472,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
|
||||
if event["type"] == Web.REQUEST_OTHER:
|
||||
if event["path"] != '/favicon.ico' and event["path"] != "/{}/shutdown".format(mode.web.shutdown_slug):
|
||||
self.status_bar.showMessage('[#{0:d}] {1:s}: {2:s}'.format(mode.web.error404_count, strings._('other_page_loaded'), event["path"]))
|
||||
self.status_bar.showMessage('{0:s}: {1:s}'.format(strings._('other_page_loaded'), event["path"]))
|
||||
|
||||
if event["type"] == Web.REQUEST_INVALID_SLUG:
|
||||
self.status_bar.showMessage('[#{0:d}] {1:s}: {2:s}'.format(mode.web.invalid_slugs_count, strings._('invalid_slug_guess'), event["data"]))
|
||||
|
||||
mode.timer_callback()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue