summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authoremma peel <emma.peel@riseup.net>2019-07-26 11:30:20 +0000
committeremma peel <emma.peel@riseup.net>2019-07-26 11:30:20 +0000
commit7ab240fd7f787de93c9c724ea1cf06566b7be065 (patch)
tree4171da7f225bc0120aada1481bcd969f36d1bffe /share
parent11aeecaa639a6d799fd88fde3eb97b75aca380a6 (diff)
parent9a327f26eaacad79abf535cc30d52d5ed735ae05 (diff)
downloadonionshare-7ab240fd7f787de93c9c724ea1cf06566b7be065.tar.gz
onionshare-7ab240fd7f787de93c9c724ea1cf06566b7be065.zip
Merge branch 'develop' of github.com:micahflee/onionshare into develop
Diffstat (limited to 'share')
-rw-r--r--share/locale/en.json11
-rw-r--r--share/static/css/style.css17
-rw-r--r--share/static/img/warning.pngbin804 -> 0 bytes
-rw-r--r--share/static/js/receive-noscript.js2
-rw-r--r--share/static/js/receive.js2
-rw-r--r--share/templates/401.html19
-rw-r--r--share/templates/403.html6
-rw-r--r--share/templates/404.html6
-rw-r--r--share/templates/denied.html2
-rw-r--r--share/templates/listing.html47
-rw-r--r--share/templates/receive.html28
-rw-r--r--share/templates/receive_noscript_xss.html35
-rw-r--r--share/templates/send.html16
-rw-r--r--share/templates/thankyou.html8
14 files changed, 101 insertions, 98 deletions
diff --git a/share/locale/en.json b/share/locale/en.json
index 40e3a1d4..2063a415 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_password_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.",
@@ -114,6 +115,7 @@
"gui_use_legacy_v2_onions_checkbox": "Use legacy addresses",
"gui_save_private_key_checkbox": "Use a persistent address",
"gui_share_url_description": "<b>Anyone</b> with this OnionShare address can <b>download</b> your files using the <b>Tor Browser</b>: <img src='{}' />",
+ "gui_website_url_description": "<b>Anyone</b> with this OnionShare address can <b>visit</b> your website using the <b>Tor Browser</b>: <img src='{}' />",
"gui_receive_url_description": "<b>Anyone</b> with this OnionShare address can <b>upload</b> files to your computer using the <b>Tor Browser</b>: <img src='{}' />",
"gui_url_label_persistent": "This share will not auto-stop.<br><br>Every subsequent share reuses the address. (To use one-time addresses, turn off \"Use persistent address\" in the settings.)",
"gui_url_label_stay_open": "This share will not auto-stop.",
@@ -135,6 +137,7 @@
"gui_receive_mode_warning": "Receive mode lets people upload files to your computer.<br><br><b>Some files can potentially take control of your computer if you open them. Only open things from people you trust, or if you know what you are doing.</b>",
"gui_mode_share_button": "Share Files",
"gui_mode_receive_button": "Receive Files",
+ "gui_mode_website_button": "Publish Website",
"gui_settings_receiving_label": "Receiving settings",
"gui_settings_data_dir_label": "Save files to",
"gui_settings_data_dir_browse_button": "Browse",
@@ -145,6 +148,8 @@
"systray_menu_exit": "Quit",
"systray_page_loaded_title": "Page Loaded",
"systray_page_loaded_message": "OnionShare address loaded",
+ "systray_site_loaded_title": "Site Loaded",
+ "systray_site_loaded_message": "OnionShare site loaded",
"systray_share_started_title": "Sharing Started",
"systray_share_started_message": "Starting to send files to someone",
"systray_share_completed_title": "Sharing Complete",
@@ -153,6 +158,8 @@
"systray_share_canceled_message": "Someone canceled receiving your files",
"systray_receive_started_title": "Receiving Started",
"systray_receive_started_message": "Someone is sending files to you",
+ "systray_website_started_title": "Starting sharing website",
+ "systray_website_started_message": "Someone is visiting your website",
"gui_all_modes_history": "History",
"gui_all_modes_clear_history": "Clear All",
"gui_all_modes_transfer_started": "Started {}",
@@ -165,8 +172,10 @@
"gui_all_modes_progress_eta": "{0:s}, ETA: {1:s}, %p%",
"gui_share_mode_no_files": "No Files Sent Yet",
"gui_share_mode_autostop_timer_waiting": "Waiting to finish sending",
+ "gui_website_mode_no_files": "No Website Shared Yet",
"gui_receive_mode_no_files": "No Files Received Yet",
"gui_receive_mode_autostop_timer_waiting": "Waiting to finish receiving",
+ "gui_visit_started": "Someone has visited your website {}",
"receive_mode_upload_starting": "Upload of total size {} is starting",
"days_first_letter": "d",
"hours_first_letter": "h",
diff --git a/share/static/css/style.css b/share/static/css/style.css
index e445e5de..f2ded524 100644
--- a/share/static/css/style.css
+++ b/share/static/css/style.css
@@ -222,20 +222,3 @@ li.info {
color: #666666;
margin: 0 0 20px 0;
}
-
-div#noscript {
- text-align: center;
- color: #d709df;
- padding: 1em;
- line-height: 150%;
- margin: 0 auto;
-}
-
-div#noscript a, div#noscript a:visited {
- color: #d709df;
-}
-
-.disable-noscript-xss-wrapper {
- max-width: 900px;
- margin: 0 auto;
-}
diff --git a/share/static/img/warning.png b/share/static/img/warning.png
deleted file mode 100644
index 9be8cbaf..00000000
--- a/share/static/img/warning.png
+++ /dev/null
Binary files differ
diff --git a/share/static/js/receive-noscript.js b/share/static/js/receive-noscript.js
deleted file mode 100644
index 0f4ac1bc..00000000
--- a/share/static/js/receive-noscript.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Hide the noscript div, because our javascript is executing
-document.getElementById('noscript').style.display = 'none';
diff --git a/share/static/js/receive.js b/share/static/js/receive.js
index c29c726c..cbd60954 100644
--- a/share/static/js/receive.js
+++ b/share/static/js/receive.js
@@ -121,7 +121,7 @@ $(function(){
$('#uploads').append($upload_div);
// Send the request
- ajax.open('POST', window.location.pathname.replace(/\/$/, '') + '/upload-ajax', true);
+ ajax.open('POST', '/upload-ajax', true);
ajax.send(formData);
});
});
diff --git a/share/templates/401.html b/share/templates/401.html
new file mode 100644
index 00000000..dc50f534
--- /dev/null
+++ b/share/templates/401.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>OnionShare: 401 Unauthorized Access</title>
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
+</head>
+
+<body>
+ <div class="info-wrapper">
+ <div class="info">
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
+ <p class="info-header">401 Unauthorized Access</p>
+ </div>
+ </div>
+</body>
+
+</html>
diff --git a/share/templates/403.html b/share/templates/403.html
index f3ea4e0e..2ebab09a 100644
--- a/share/templates/403.html
+++ b/share/templates/403.html
@@ -3,14 +3,14 @@
<head>
<title>OnionShare: 403 Forbidden</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">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/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><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="info-header">You are not allowed to perform that action at this time.</p>
</div>
</div>
diff --git a/share/templates/404.html b/share/templates/404.html
index 1c5d7d2d..375c125d 100644
--- a/share/templates/404.html
+++ b/share/templates/404.html
@@ -3,14 +3,14 @@
<head>
<title>OnionShare: 404 Not Found</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">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/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><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="info-header">404 Not Found</p>
</div>
</div>
diff --git a/share/templates/denied.html b/share/templates/denied.html
index 94fb379b..ad4d0b21 100644
--- a/share/templates/denied.html
+++ b/share/templates/denied.html
@@ -3,7 +3,7 @@
<head>
<title>OnionShare</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
diff --git a/share/templates/listing.html b/share/templates/listing.html
new file mode 100644
index 00000000..e394f842
--- /dev/null
+++ b/share/templates/listing.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>OnionShare</title>
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link href="{{ static_url_path }}/css/style.css" rel="stylesheet" type="text/css" />
+ </head>
+ <body>
+
+ <header class="clearfix">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
+ <h1>OnionShare</h1>
+ </header>
+
+ <table class="file-list" id="file-list">
+ <tr>
+ <th id="filename-header">Filename</th>
+ <th id="size-header">Size</th>
+ <th></th>
+ </tr>
+
+ {% for info in dirs %}
+ <tr>
+ <td>
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
+ <a href="{{ info.basename }}">
+ {{ info.basename }}
+ </a>
+ </td>
+ <td>&mdash;</td>
+ </tr>
+ {% endfor %}
+
+ {% for info in files %}
+ <tr>
+ <td>
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_file.png" />
+ <a href="{{ info.basename }}">
+ {{ info.basename }}
+ </a>
+ </td>
+ <td>{{ info.size_human }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </body>
+</html>
diff --git a/share/templates/receive.html b/share/templates/receive.html
index 4f207a03..59a3ebe4 100644
--- a/share/templates/receive.html
+++ b/share/templates/receive.html
@@ -2,31 +2,18 @@
<html>
<head>
<title>OnionShare</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">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head>
<body>
<header class="clearfix">
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
<div class="upload-wrapper">
- <!--
- We are not using a <noscript> tag because it only works when the security slider is set to
- Safest, not Safer: https://trac.torproject.org/projects/tor/ticket/29506
- -->
- <div id="noscript">
- <p>
- <img src="/static/img/warning.png" title="Warning" /><strong>Warning:</strong> Due to a bug in Tor Browser and Firefox, uploads
- sometimes never finish. To upload reliably, either set your Tor Browser
- <a rel="noreferrer" target="_blank" href="https://tb-manual.torproject.org/en-US/security-slider/">security slider</a>
- to Standard or
- <a target="_blank" href="/noscript-xss-instructions">turn off your Tor Browser's NoScript XSS setting</a>.</p>
- </div>
-
- <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="upload-header">Send Files</p>
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
@@ -45,14 +32,13 @@
</ul>
</div>
- <form id="send" method="post" enctype="multipart/form-data" action="{{ upload_action }}">
+ <form id="send" method="post" enctype="multipart/form-data" action="/upload">
<p><input type="file" id="file-select" name="file[]" multiple /></p>
<p><button type="submit" id="send-button" class="button">Send Files</button></p>
</form>
</div>
- <script src="/static/js/receive-noscript.js"></script>
- <script src="/static/js/jquery-3.4.0.min.js"></script>
- <script async src="/static/js/receive.js"></script>
+ <script src="{{ static_url_path }}/js/jquery-3.4.0.min.js"></script>
+ <script async src="{{ static_url_path }}/js/receive.js"></script>
</body>
</html>
diff --git a/share/templates/receive_noscript_xss.html b/share/templates/receive_noscript_xss.html
deleted file mode 100644
index bce78524..00000000
--- a/share/templates/receive_noscript_xss.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>OnionShare</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>
-
- <header class="clearfix">
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
- <h1>OnionShare</h1>
- </header>
-
- <div class="disable-noscript-xss-wrapper">
- <h3>Disable your Tor Browser's NoScript XSS setting</h3>
-
- <p>If your security slider is set to Safest, JavaScript is disabled so XSS vulnerabilities won't affect you,
- which makes it safe to disable NoScript's XSS protections.</p>
-
- <p>Here is how to disable this setting:</p>
-
- <ol>
- <li>Click the menu icon in the top-right of Tor Browser and open "Add-ons"</li>
- <li>Next to the NoScript add-on, click the "Preferences" button</li>
- <li>Switch to the "Advanced" tab</li>
- <li>Uncheck "Sanitize cross-site suspicious requests"</li>
- </ol>
-
- <p>If you'd like to learn technical details about this issue, check
- <a rel="noreferrer" href="https://github.com/micahflee/onionshare/issues/899">this issue</a>
- on GitHub.</p>
- </div>
- </body>
-</html>
diff --git a/share/templates/send.html b/share/templates/send.html
index 2a56829a..e0076c0f 100644
--- a/share/templates/send.html
+++ b/share/templates/send.html
@@ -3,8 +3,8 @@
<head>
<title>OnionShare</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">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
<meta name="onionshare-filename" content="{{ filename }}">
<meta name="onionshare-filesize" content="{{ filesize }}">
</head>
@@ -15,14 +15,10 @@
<div class="right">
<ul>
<li>Total size: <strong>{{ filesize_human }}</strong> {% if is_zipped %} (compressed){% endif %}</li>
- {% if slug %}
- <li><a class="button" href='/{{ slug }}/download'>Download Files</a></li>
- {% else %}
<li><a class="button" href='/download'>Download Files</a></li>
- {% endif %}
</ul>
</div>
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
@@ -35,7 +31,7 @@
{% for info in file_info.dirs %}
<tr>
<td>
- <img width="30" height="30" title="" alt="" src="/static/img/web_folder.png" />
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
{{ info.basename }}
</td>
<td>{{ info.size_human }}</td>
@@ -45,7 +41,7 @@
{% for info in file_info.files %}
<tr>
<td>
- <img width="30" height="30" title="" alt="" src="/static/img/web_file.png" />
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_file.png" />
{{ info.basename }}
</td>
<td>{{ info.size_human }}</td>
@@ -53,7 +49,7 @@
</tr>
{% endfor %}
</table>
- <script async src="/static/js/send.js" charset="utf-8"></script>
+ <script async src="{{ static_url_path }}/js/send.js" charset="utf-8"></script>
</body>
</html>
diff --git a/share/templates/thankyou.html b/share/templates/thankyou.html
index c4b39cde..b7e2b97c 100644
--- a/share/templates/thankyou.html
+++ b/share/templates/thankyou.html
@@ -3,19 +3,19 @@
<head>
<title>OnionShare is closed</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">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head>
<body>
<header class="clearfix">
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
<div class="info-wrapper">
<div class="info">
- <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="info-header">Thank you for using OnionShare</p>
<p class="info-description">You may now close this window.</p>
</div>