summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-05-20 19:04:50 -0700
committerMicah Lee <micah@micahflee.com>2019-05-20 19:04:50 -0700
commit79b87c3e30480708af6d824a19430d24d2693dd4 (patch)
tree62e221785ef80d963138c062575e2bcdf3240748 /share
parent2a50bbc3bc3324d9aca3b1ac3e57ae8fd9eee08c (diff)
downloadonionshare-79b87c3e30480708af6d824a19430d24d2693dd4.tar.gz
onionshare-79b87c3e30480708af6d824a19430d24d2693dd4.zip
Add an error 401 handler, and make it start counting invalid password guesses instead of 404 errors for rate limiting
Diffstat (limited to 'share')
-rw-r--r--share/locale/en.json3
-rw-r--r--share/templates/401.html19
2 files changed, 21 insertions, 1 deletions
diff --git a/share/locale/en.json b/share/locale/en.json
index 7183e734..6dea9860 100644
--- a/share/locale/en.json
+++ b/share/locale/en.json
@@ -3,6 +3,7 @@
"not_a_readable_file": "{0:s} is not a readable file.",
"no_available_port": "Could not find an available port to start the onion service",
"other_page_loaded": "Address loaded",
+ "invalid_slug_guess": "Invalid password guess",
"close_on_autostop_timer": "Stopped because auto-stop timer ran out",
"closing_automatically": "Stopped because transfer is complete",
"large_filesize": "Warning: Sending a large share could take hours",
@@ -34,7 +35,7 @@
"gui_receive_quit_warning": "You're in the process of receiving files. Are you sure you want to quit OnionShare?",
"gui_quit_warning_quit": "Quit",
"gui_quit_warning_dont_quit": "Cancel",
- "error_rate_limit": "Someone has made too many wrong attempts on your address, which means they could be trying to guess it, so OnionShare has stopped the server. Start sharing again and send the recipient a new address to share.",
+ "error_rate_limit": "Someone has made too many wrong attempts to guess your password, so OnionShare has stopped the server. Start sharing again and send the recipient a new address to share.",
"zip_progress_bar_format": "Compressing: %p%",
"error_stealth_not_supported": "To use client authorization, you need at least both Tor 0.2.9.1-alpha (or Tor Browser 6.5) and python3-stem 1.5.0.",
"error_ephemeral_not_supported": "OnionShare requires at least both Tor 0.2.7.1 and python3-stem 1.4.0.",
diff --git a/share/templates/401.html b/share/templates/401.html
new file mode 100644
index 00000000..9d3989a3
--- /dev/null
+++ b/share/templates/401.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>OnionShare: 401 Unauthorized Access</title>
+ <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
+</head>
+
+<body>
+ <div class="info-wrapper">
+ <div class="info">
+ <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p class="info-header">401 Unauthorized Access</p>
+ </div>
+ </div>
+</body>
+
+</html>