tor-commits
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 1 participants
- 216208 discussions
[translation/communitytpo-contentspot_completed] https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot_completed
by translation@torproject.org 21 Feb '21
by translation@torproject.org 21 Feb '21
21 Feb '21
commit 4922e23479707d76b91d15f4a97483660db7d259
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Feb 21 20:15:20 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-conten…
---
contents+es-AR.po | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/contents+es-AR.po b/contents+es-AR.po
index eae292561b..2b2b8bad31 100644
--- a/contents+es-AR.po
+++ b/contents+es-AR.po
@@ -1854,7 +1854,7 @@ msgstr "#Canal de IRC"
#: https//community.torproject.org/localization/becoming-tor-translator/
#: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
msgid "We hang out in the #tor-l10n channel on the oftc IRC network."
-msgstr "Nos podés envontrar en el canal #tor-l10n en la red IRC de oftc."
+msgstr "Nos podés encontrar en el canal #tor-l10n en la red IRC de oftc."
#: https//community.torproject.org/localization/becoming-tor-translator/
#: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
@@ -4350,8 +4350,8 @@ msgid ""
"These talking points will help you to explain how onion services offer "
"various privacy and security benefits to their users."
msgstr ""
-"Estos puntos para charlar te ayudarán a explicar cómo los servicios onion "
-"ofrecen varios beneficios de privacidad y seguridad a sus usuarios."
+"Estos puntos para charlar te van a ayudar a explicar cómo los servicios "
+"onion ofrecen varios beneficios de privacidad y seguridad a sus usuarios."
#: https//community.torproject.org/onion-services/talk/
#: (content/onion-services/talk/contents+en.lrpage.body)
1
0
[translation/communitytpo-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot
by translation@torproject.org 21 Feb '21
by translation@torproject.org 21 Feb '21
21 Feb '21
commit 0518ab715d663c20b8adcabc0ea796ad90ea74e2
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Feb 21 20:15:12 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-conten…
---
contents+es-AR.po | 6 +++---
contents+es.po | 48 ++++++++++++++++++++++++------------------------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/contents+es-AR.po b/contents+es-AR.po
index eae292561b..2b2b8bad31 100644
--- a/contents+es-AR.po
+++ b/contents+es-AR.po
@@ -1854,7 +1854,7 @@ msgstr "#Canal de IRC"
#: https//community.torproject.org/localization/becoming-tor-translator/
#: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
msgid "We hang out in the #tor-l10n channel on the oftc IRC network."
-msgstr "Nos podés envontrar en el canal #tor-l10n en la red IRC de oftc."
+msgstr "Nos podés encontrar en el canal #tor-l10n en la red IRC de oftc."
#: https//community.torproject.org/localization/becoming-tor-translator/
#: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
@@ -4350,8 +4350,8 @@ msgid ""
"These talking points will help you to explain how onion services offer "
"various privacy and security benefits to their users."
msgstr ""
-"Estos puntos para charlar te ayudarán a explicar cómo los servicios onion "
-"ofrecen varios beneficios de privacidad y seguridad a sus usuarios."
+"Estos puntos para charlar te van a ayudar a explicar cómo los servicios "
+"onion ofrecen varios beneficios de privacidad y seguridad a sus usuarios."
#: https//community.torproject.org/onion-services/talk/
#: (content/onion-services/talk/contents+en.lrpage.body)
diff --git a/contents+es.po b/contents+es.po
index b004dfe410..f65d88ccbf 100644
--- a/contents+es.po
+++ b/contents+es.po
@@ -1631,7 +1631,7 @@ msgid ""
"portal/support-portal/) to help."
msgstr ""
"* El [portal de Soporte](https://support.torproject.org/) también es un "
-"recurcso valioso para todos los usuarios de Tor, mirá las [estadísticas de "
+"recurcso valioso para todos los usuarios de Tor, mira las [estadísticas de "
"traducción del portal de Soporte de Tor](https://torpat.ch/support-locales) "
"o [traducí](https://www.transifex.com/otf/tor-project-support-community-"
"portal/support-portal/) para ayudar."
@@ -1645,7 +1645,7 @@ msgid ""
"portal/communitytpo-contentspot/) it."
msgstr ""
"* El [portal Comunitario](https://community.torproject.org/) es este sitio "
-"web, donde podés encontrar maneras de contribuir a Tor. Ayudanos a "
+"web, donde puedes encontrar maneras de contribuir a Tor. Ayúdanos a "
"[traducirlo](https://www.transifex.com/otf/tor-project-support-community-"
"portal/communitytpo-contentspot/)."
@@ -1689,11 +1689,11 @@ msgid ""
"source strings, etc. Please introduce yourself and ask any questions you may"
" have after following up this instructions."
msgstr ""
-"Para comunicarte con otros traductores, por favor unite a la [lista de "
+"Para comunicarte con otros traductores, por favor únete a la [lista de "
"correo de adaptación local de Tor](https://lists.torproject.org/cgi-"
"bin/mailman/listinfo/tor-l10n), donde organizamos las traducciones, tomamos "
"decisiones, informamos errores en el material original, etc. Por favor, "
-"presentate y hacé cualquier pregunta que pudieras tener después de seguir "
+"preséntate y haz cualquier pregunta que pudieras tener después de seguir "
"estas instrucciones."
#: https//community.torproject.org/localization/becoming-tor-translator/
@@ -1856,7 +1856,7 @@ msgstr "#Canal de IRC"
#: https//community.torproject.org/localization/becoming-tor-translator/
#: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
msgid "We hang out in the #tor-l10n channel on the oftc IRC network."
-msgstr "Nos podés envontrar en el canal #tor-l10n en la red IRC de oftc."
+msgstr "Nos puedes encontrar en el canal #tor-l10n en la red IRC de oftc."
#: https//community.torproject.org/localization/becoming-tor-translator/
#: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
@@ -1864,7 +1864,7 @@ msgid ""
"Please [join us to talk about localization](https://support.torproject.org"
"/get-in-touch/#irc-help) (l10n)!"
msgstr ""
-"Por favor, [acercate para hablar acerca de adaptación "
+"Por favor, [acércate para hablar acerca de adaptación "
"local](https://support.torproject.org/get-in-touch/#irc-help) (l10n)!"
#: https//community.torproject.org/relay/getting-help/
@@ -2416,7 +2416,7 @@ msgid ""
"Click below on type of relay do you want to host and don't forget to read "
"[Relay post-install and good practices](/relay/setup/post-install/)."
msgstr ""
-"Cliqueá abajo en qué tipo de repetidor querés alojar, y no te olvidés de "
+"Cliquea abajo en qué tipo de repetidor quieres alojar, y no te olvides de "
"leer [Postinstalación de un repetidor y buenas prácticas](/relay/setup/post-"
"install/)."
@@ -2508,7 +2508,7 @@ msgid ""
"If you have less than 10 Mbit/s but at least 1 Mbit/s we recommend you run a"
" [bridge with obfs4 support](/relay/setup/bridge/)."
msgstr ""
-"Si tenés menos que 10 Mbit/s pero al menos 1 Mbit/s, te recomendamos que "
+"Si tienes menos que 10 Mbit/s pero al menos 1 Mbit/s, te recomendamos que "
"corras un [puente con soporte obfs4](relay/setup/bridge)."
#: https//community.torproject.org/relay/relays-requirements/
@@ -2937,7 +2937,7 @@ msgid ""
"ba92-3d58c8345a32&?ref=sol08a2)."
msgstr ""
"Por ejemplo, si un usuario descarga un material bajo derecho de autor "
-"mientras está usando tu repetidor de salida, vos como operador podrías "
+"mientras está usando tu repetidor de salida, tú, como operador, podrías "
"recibir una [misiva "
"DMCA](https://www.dmca.com/Solutions/view.aspx?ID=712f28a5-93f2-467b-"
"ba92-3d58c8345a32&?ref=sol08a2)."
@@ -3558,12 +3558,12 @@ msgstr ""
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.title)
msgid "Organize a Tor meetup"
-msgstr "Organizá una reunión Tor"
+msgstr "Organiza una reunión Tor"
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.subtitle)
msgid "Learn how to organize a Tor meetup with your friends."
-msgstr "Aprendé cómo organizar una reunión Tor con tus amigos."
+msgstr "Aprende cómo organizar una reunión Tor con tus amigos."
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.body)
@@ -3585,7 +3585,7 @@ msgstr "### Paso 1"
msgid ""
"Connect with a local space that will allow you to meet for an hour or two."
msgstr ""
-"Relacionate con un espacio local que te permita reunirte por una hora o dos."
+"Relaciónate con un espacio local que te permita reunirte por una hora o dos."
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.body)
@@ -3594,7 +3594,7 @@ msgid ""
"are some spaces that you can usually host your event."
msgstr ""
"Una biblioteca pública, un centro social, un espacio de hackeo o una sala en"
-" una universidad son algunos de los espacios en los que usualmente podés "
+" una universidad son algunos de los espacios en los que usualmente puedes "
"realizar tu evento."
#: https//community.torproject.org/outreach/meetup/
@@ -3608,7 +3608,7 @@ msgid ""
"Choose a date and time that is convenient for your group and the local "
"space."
msgstr ""
-"Elegí una fecha y hora que sean convenientes para tu grupo, y el espacio "
+"Elige una fecha y hora que sean convenientes para tu grupo, y el espacio "
"local."
#: https//community.torproject.org/outreach/meetup/
@@ -3625,7 +3625,7 @@ msgid ""
"After confirming a local and date, create a poster and an online invitation "
"to spread the event."
msgstr ""
-"Después de confirmar un lugar y fecha, creá un afiche y una invitación en "
+"Después de confirmar un lugar y fecha, crea un afiche y una invitación en "
"línea para difundir el evento."
#: https//community.torproject.org/outreach/meetup/
@@ -3639,8 +3639,8 @@ msgid ""
"Find a meetup facilitator and draft an agenda, for example, question & "
"answer about Tor, how to setup relays."
msgstr ""
-"Encontrá un facilitador para las reuniones y esbozá una agenda, por ejemplo,"
-" preguntas y respuestas acerca de Tor, como configurar repetidores."
+"Encuentra un facilitador para las reuniones y esboza una agenda, por "
+"ejemplo, preguntas y respuestas acerca de Tor, como configurar repetidores."
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.body)
@@ -3648,7 +3648,7 @@ msgid ""
"Read and follow our [best "
"practices](https://community.torproject.org/training/best-practices/)."
msgstr ""
-"Leé y seguí nuestras [mejores "
+"Lee y sigue nuestras [mejores "
"prácticas](https://community.torproject.org/training/best-practices/)."
#: https//community.torproject.org/outreach/meetup/
@@ -3663,7 +3663,7 @@ msgid ""
"[posters](https://community.torproject.org/outreach/kit/) nearby the local, "
"so people can find easily."
msgstr ""
-"Antes de la reunión, organizá el espacio. Comprá algunos aperitivos, colgá "
+"Antes de la reunión, organiza el espacio. Compra algunos aperitivos, cuelga "
"algún [afiche](https://community.torproject.org/outreach/kit/) cerca del "
"lugar, de manera que la gente pueda encontrarlo fácilmente."
@@ -3671,7 +3671,7 @@ msgstr ""
#: (content/outreach/meetup/contents+en.lrpage.body)
msgid "If you have some printed materials and/or Tor swag, put it on a table."
msgstr ""
-"Si tenés algunos materiales impresos y/o prendas para ostentar Tor, ponelos "
+"Si tienes algunos materiales impresos y/o prendas para ostentar Tor, ponlos "
"en una mesa."
#: https//community.torproject.org/outreach/meetup/
@@ -3682,7 +3682,7 @@ msgstr "### Paso 5"
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.body)
msgid "Load your presentation and wait a few minutes to people arrive."
-msgstr "Cargá tu presentación y esperá unos minutos para que llegue la gente."
+msgstr "Carga tu presentación y espera unos minutos para que llegue la gente."
#: https//community.torproject.org/outreach/meetup/
#: (content/outreach/meetup/contents+en.lrpage.body)
@@ -3690,7 +3690,7 @@ msgid ""
"During the activity take notes about questions, how many knew about Tor "
"before, how many are relay operators, etc"
msgstr ""
-"Durante la actividad, tomá nota acerca de preguntas, cuántos sabían acerca "
+"Durante la actividad, toma nota acerca de preguntas, cuántos sabían acerca "
"de Tor con anterioridad, cuántos son operadores de repetidores, etc"
#: https//community.torproject.org/outreach/meetup/
@@ -3705,7 +3705,7 @@ msgid ""
"notes to [Tor Community Team](https://lists.torproject.org/cgi-"
"bin/mailman/listinfo/tor-community-team) mailing list."
msgstr ""
-"Después de la reunión, limpiá el espacio, remové los afiches y subí tus "
+"Después de la reunión, limpia el espacio, remueve los afiches y sube tus "
"notas a la lista de correo del [Equipo Comunitario "
"Tor](https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-community-"
"team)."
@@ -4329,7 +4329,7 @@ msgstr "Hablando acerca de onions"
#: (content/onion-services/talk/contents+en.lrpage.subtitle)
msgid "Become an onion advocate and explain the importance of onion services."
msgstr ""
-"Volvete un defensor de onion, y explicá la importancia de los servicios "
+"Vuélvete un defensor de onion, y explica la importancia de los servicios "
"onion."
#: https//community.torproject.org/onion-services/talk/
1
0
[translation/support-portal_completed] https://gitweb.torproject.org/translation.git/commit/?h=support-portal_completed
by translation@torproject.org 21 Feb '21
by translation@torproject.org 21 Feb '21
21 Feb '21
commit 1a1ff38633bd622543332319d78409d36be31272
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Feb 21 19:48:07 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=support-portal_comp…
---
contents+es-AR.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contents+es-AR.po b/contents+es-AR.po
index 9d7d732d4d..8b051fdf97 100644
--- a/contents+es-AR.po
+++ b/contents+es-AR.po
@@ -10982,7 +10982,7 @@ msgid ""
"lines from above (Note, use whatever is the current experimental version "
"instead of 0.4.5.x from the example below):"
msgstr ""
-"Si querés intentar con paquetes experimentales, agregá estos **además** de "
+"Si querés intentar con paquetes experimentales, agregá estas **además** de "
"las líneas de arriba (Nota: usá cualquiera sea la versión experimental "
"actual, en vez de 0.4.5.x como en el ejemplo de abajo):"
1
0
[translation/support-portal] https://gitweb.torproject.org/translation.git/commit/?h=support-portal
by translation@torproject.org 21 Feb '21
by translation@torproject.org 21 Feb '21
21 Feb '21
commit 2f5e6d3e2c48f9140109c849f32f5511d04e4383
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Feb 21 19:48:01 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=support-portal
---
contents+es-AR.po | 2 +-
contents+es.po | 106 +++++++++++++++++++++++++++---------------------------
2 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/contents+es-AR.po b/contents+es-AR.po
index 9d7d732d4d..8b051fdf97 100644
--- a/contents+es-AR.po
+++ b/contents+es-AR.po
@@ -10982,7 +10982,7 @@ msgid ""
"lines from above (Note, use whatever is the current experimental version "
"instead of 0.4.5.x from the example below):"
msgstr ""
-"Si querés intentar con paquetes experimentales, agregá estos **además** de "
+"Si querés intentar con paquetes experimentales, agregá estas **además** de "
"las líneas de arriba (Nota: usá cualquiera sea la versión experimental "
"actual, en vez de 0.4.5.x como en el ejemplo de abajo):"
diff --git a/contents+es.po b/contents+es.po
index 703bdc5615..6d8a2fae4e 100644
--- a/contents+es.po
+++ b/contents+es.po
@@ -5732,7 +5732,7 @@ msgid ""
"Browser](https://support.torproject.org/#tbb-10), it is common for anti-"
"virus/anti-malware software to cause this type of issue."
msgstr ""
-"Si estás corriendo un antivirus, por favor mirá [Mi protección antivirus y "
+"Si estás ejecutando un antivirus, por favor mira [Mi protección antivirus y "
"contra malware está bloqueándome de acceder al Navegador "
"Tor](https://support.torproject.org/#tbb-10), es común que programas "
"antivirus/protectores contra programas maliciosos causen este tipo de "
@@ -5960,8 +5960,8 @@ msgstr ""
"Y si alguien robó tu cookie de Google, podría terminar iniciando sesión "
"desde lugares inusuales (aunque, por supuesto, también puede que no). Por lo"
" que el resumen es que, ya que estás usando al Navegador Tor, esta medida de"
-" seguridad que usa Google no es tan útil para vos, porque está llena de "
-"falsos positivos. Vas a tener que usar otros abordajes, como mirar si algo "
+" seguridad que usa Google no es tan útil para ti, porque está llena de "
+"falsos positivos. Tendrás que usar otros abordajes, como mirar si algo "
"aparece raro en la cuenta, o mirar las fechas y horas para inicios de sesión"
" recientes y preguntarte si realmente lo hiciste en esas oportunidades."
@@ -6497,11 +6497,11 @@ msgid ""
"through the Tor network; a version of Orbot is also inside of the Tor "
"Browser for Android, and is what enables it to connect to the Tor network."
msgstr ""
-"Por otro lado, Orbot es un proxy que te va a habilitar para enviar los datos"
-" desde tus otras aplicaciones (clientes de correo electrónico, aplicaciones "
-"de mensagería instantánea, etc.) a través de la red Tor; una versión de "
-"Orbot también está dentro del Navegador Tor para Android, y es lo que lo "
-"habilita para conectarse a la red Tor."
+"Por otro lado, Orbot es un proxy que te permitará enviar los datos desde tus"
+" otras aplicaciones (clientes de correo electrónico, aplicaciones de "
+"mensagería instantánea, etc.) a través de la red Tor; una versión de Orbot "
+"también está dentro del Navegador Tor para Android, y es lo que lo habilita "
+"para conectarse a la red Tor."
#: https//support.torproject.org/tormobile/tormobile-6/
#: (content/tormobile/tormobile-6/contents+en.lrquestion.description)
@@ -6518,8 +6518,8 @@ msgid ""
"Depending on how you want to use the Tor network, either one or both of "
"these could be a great option."
msgstr ""
-"Dependiendo de cómo querés usar a la red Tor, cualquiera de estos, o ambos, "
-"podría ser una gran opción."
+"Dependiendo de cómo quieras usar a la red Tor, cualquiera de estos, o ambos,"
+" podría ser una gran opción."
#: https//support.torproject.org/tormobile/tormobile-7/
#: (content/tormobile/tormobile-7/contents+en.lrquestion.title)
@@ -6752,9 +6752,9 @@ msgid ""
" to the [hamburger menu (\"≡\")](../../glossary/hamburger-menu), then click "
"on \"Preferences\", and finally on \"Tor\" in the side bar."
msgstr ""
-"Si no ves esta opción y tenés al Navegador Tor abierto, podés navegar hasta "
-"el [menú hamburguesa (\"≡\")](../../glossary/hamburger-menu), cliquear luego"
-" en \"Preferencias\", y finalmente en \"Tor\" en la barra lateral."
+"Si no ves esta opción y tienes al Navegador Tor abierto, puedes navegar "
+"hasta el [menú hamburguesa (\"≡\")](../../glossary/hamburger-menu), cliquear"
+" luego en \"Preferencias\", y finalmente en \"Tor\" en la barra lateral."
#: https//support.torproject.org/connecting/connecting-2/
#: (content/connecting/connecting-2/contents+en.lrquestion.description)
@@ -6764,7 +6764,7 @@ msgid ""
"command line by running:"
msgstr ""
"Alternativamente, en GNU/Linux, para mirar los registros directo en el "
-"terminal, navegá hasta la carpeta del Navegador Tor y lanzalo desde la línea"
+"terminal, navega hasta la carpeta del Navegador Tor y lánzalo desde la línea"
" de comando ejecutando:"
#: https//support.torproject.org/connecting/connecting-2/
@@ -7328,7 +7328,7 @@ msgid ""
"See our page on [pluggable transports](https://tb-"
"manual.torproject.org/circumvention/) for more info."
msgstr ""
-"Mirá nuestra página sobre [transportes conectables](https://tb-"
+"Mira nuestra página sobre [transportes conectables](https://tb-"
"manual.torproject.org/circumvention/) por más información."
#: https//support.torproject.org/https/https-1/
@@ -8393,7 +8393,7 @@ msgid ""
"long as they are valid, so the primary identity secret key can be kept "
"outside DataDirectory/keys, on a storage media or a different computer."
msgstr ""
-"Tor solamente va a necesitar acceso a la clave de firma y al certificado de "
+"Tor solamente necesitará acceso a la clave de firma y al certificado de "
"medio término en la medida en que sean válidos, por lo que la clave secreta "
"de la identidad primaria puede ser mantenida fuera de DataDirectory/keys, en"
" un medio de almacenamiento o una computadora diferente."
@@ -8424,11 +8424,11 @@ msgid ""
"leave the primary identity secret key in DataDirectory/keys, just make a "
"backup in case you'll need to reinstall it."
msgstr ""
-"Si querés que tu repetidor corra sin atención por un tiempo más largo sin "
+"Si quieres que tu repetidor corra sin atención por un tiempo más largo sin "
"tener que hacer manualmente la renovación de la clave de firma de medio "
"término en forma regular, lo mejor es dejar la clave secreta de la identidad"
-" primaria en DataDirectory/keys, solo hacete una copia de seguridad en el "
-"caso que vayas a necesitar reinstalarla."
+" primaria en DataDirectory/keys, solo haz una copia de seguridad en caso que"
+" vayas a necesitar reinstalarla."
#: https//support.torproject.org/operators/offline-ed25519/
#: (content/operators/offline-ed25519/contents+en.lrquestion.description)
@@ -9314,7 +9314,7 @@ msgid ""
"decrypt its descriptor locally."
msgstr ""
"La clave privada no es transmitida al servicio, y solamente es usada para "
-"desencriptar su descriptor localmente."
+"descifar su descriptor localmente."
#: https//support.torproject.org/onionservices/client-auth/
#: (content/onionservices/client-auth/contents+en.lrquestion.description)
@@ -9322,8 +9322,8 @@ msgid ""
"You can get the access credentials from the onion service operator. Reach "
"out to the operator and request access."
msgstr ""
-"Podés obtener las credenciales de acceso del operador del servicio onion. "
-"Contactate con él/ella y solicitale acceso."
+"Puedes obtener las credenciales de acceso del operador del servicio onion. "
+"Contáctate con él/ella y solicitale acceso."
#: https//support.torproject.org/onionservices/client-auth/
#: (content/onionservices/client-auth/contents+en.lrquestion.description)
@@ -9331,7 +9331,7 @@ msgid ""
"Learn more about [how to use onion authentication](https://tb-"
"manual.torproject.org/onion-services/) in Tor Browser."
msgstr ""
-"Aprendé más acerca de [como usar autenticación onion](https://tb-"
+"Aprende más acerca de [como usar autenticación onion](https://tb-"
"manual.torproject.org/onion-services/) en el Navegador Tor."
#: https//support.torproject.org/onionservices/client-auth/
@@ -9341,8 +9341,8 @@ msgid ""
"see the [Client Authorization](https://community.torproject.org/onion-"
"services/advanced/client-auth) in the Community portal."
msgstr ""
-"Si querés crear un servicio onion con autenticación de cliente, por favor "
-"mirá la [Autorización de Cliente](https://community.torproject.org/onion-"
+"Si quieres crear un servicio onion con autenticación de cliente, por favor "
+"mira la [Autorización de Cliente](https://community.torproject.org/onion-"
"services/advanced/client-auth) en el portal Comunitario."
#: https//support.torproject.org/onionservices/onion-location/
@@ -9366,8 +9366,8 @@ msgid ""
"suggestion pill will prompt at the URL bar saying \".onion available\"."
msgstr ""
"Si el sitio web que estás visitando tiene un sitio onion disponible, una "
-"etiqueta púrpura de sugerencia va a aparecer en la barra URL, indicando "
-"\".onion disponible\"."
+"etiqueta púrpura de sugerencia aparecerá en la barra URL, indicando \".onion"
+" disponible\"."
#: https//support.torproject.org/onionservices/onion-location/
#: (content/onionservices/onion-location/contents+en.lrquestion.description)
@@ -9375,7 +9375,7 @@ msgid ""
"When you click on \".onion available\", the web site will be reloaded and "
"redirected to its onion counterpart."
msgstr ""
-"Cuando cliqueás en \".onion disponible\", el sitio web va a ser recargado y "
+"Cuando cliqueas en \".onion disponible\", el sitio web será recargado y "
"redirigido a su contraparte onion."
#: https//support.torproject.org/onionservices/onion-location/
@@ -9393,7 +9393,7 @@ msgid ""
"You can learn more about Onion-Location in the [Tor Browser Manual](https"
"://tb-manual.torproject.org/onion-services/)."
msgstr ""
-"Podés aprender más acerca de Onion-Location en el [Manual del Navegador "
+"Puedes aprender más acerca de Onion-Location en el [Manual del Navegador "
"Tor](https://tb-manual.torproject.org/onion-services/)."
#: https//support.torproject.org/onionservices/onion-location/
@@ -9403,7 +9403,7 @@ msgid ""
"Location](https://community.torproject.org/onion-services/advanced/onion-"
"location) in your onion site."
msgstr ""
-"Si sos un operador de servicio onion, aprendé [cómo configurar Onion-"
+"Si eres un operador de servicio onion, aprende [cómo configurar Onion-"
"Location](https://community.torproject.org/onion-services/advanced/onion-"
"location) en tu sitio onion."
@@ -9500,7 +9500,7 @@ msgid ""
"secure and using an onion service."
msgstr ""
"Cuando accedas a un sitio web que use un servicio onion, el Navegador Tor va"
-" a mostrar en la barra URL un icono de una cebolla visualizando el estado de"
+" a mostrar en la barra URL un ícono de una cebolla visualizando el estado de"
" tu conexión: segura y usando un servicio onion."
#: https//support.torproject.org/onionservices/onionservices-2/
@@ -9750,7 +9750,7 @@ msgstr "#### GitLab"
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
msgid "First, check if the bug is already known."
-msgstr "Primero, comprobá si el error ya es conocido."
+msgstr "Primero, comprueba si el error ya es conocido."
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
@@ -9758,7 +9758,7 @@ msgid ""
"You can search and read all the issues at "
"[https://gitlab.torproject.org/](https://gitlab.torproject.org/groups/tpo/-/…."
msgstr ""
-"Podés buscar y leer todas las cuestiones en "
+"Poedes buscar y leer todas las cuestiones en "
"[https://gitlab.torproject.org/](https://gitlab.torproject.org/groups/tpo/-/…."
#: https//support.torproject.org/misc/bug-or-feedback/
@@ -9769,7 +9769,7 @@ msgid ""
"#register-pane) to access Tor Project's GitLab instance and [find the right "
"repository](https://gitlab.torproject.org/tpo) to report your issue."
msgstr ""
-"Para crear una nueva cuestión, por favor [solicitá una nueva "
+"Para crear una nueva cuestión, por favor [solicita una nueva "
"cuenta](https://gitlab.torproject.org/users/sign_in?redirect_to_referer=yes"
"#register-pane) para acceder a la instancia de GitLab del Tor Project, y "
"[encontrar el repositorio correcto](https://gitlab.torproject.org/tpo) para "
@@ -9811,7 +9811,7 @@ msgstr "Envíanos un correo a frontdesk(a)torproject.org"
msgid ""
"In the subject line of your email, please tell us what you're reporting."
msgstr ""
-"En la línea de asunto de tu correo electrónico, por favor decinos qué estás "
+"En la línea de asunto de tu correo electrónico, por favor dinos qué estás "
"reportando."
#: https//support.torproject.org/misc/bug-or-feedback/
@@ -9823,8 +9823,8 @@ msgid ""
msgstr ""
"Cuanto más específica sea tu línea de asunto (ej.: \"Falla de conexión\", "
"\"comentario sobre sitio web\", \"comentario sobre Navegador Tor\", "
-"\"necesito un puente\"), más fácil va a ser para nosotros entender y hacer "
-"el seguimiento."
+"\"necesito un puente\"), más fácil será para nosotros entender y hacer el "
+"seguimiento."
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
@@ -9841,8 +9841,8 @@ msgid ""
"For the fastest response, please write in English, Spanish, and/or "
"Portuguese if you can."
msgstr ""
-"Para una respuesta más rápida, por favor escribí si podés en Inglés, Español"
-" y/o Portugués."
+"Para una respuesta más rápida, por favor escribe si puedes en Inglés, "
+"Español y/o Portugués."
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
@@ -9851,8 +9851,8 @@ msgid ""
"feel comfortable with, but keep in mind it will take us a bit longer to "
"answer as we will need help with translation to understand it."
msgstr ""
-"Si ninguno de estos lenguajes es posible para vos, por favor escribí en "
-"cualquier lenguaje con el que te sientas cómodo, pero tené en mente que nos "
+"Si ninguno de estos lenguajes es posible para tí, por favor escribe en "
+"cualquier lenguaje con el que te sientas cómodo, pero ten en mente que nos "
"va a tomar un poco más responder, ya que vamos a necesitar ayuda con la "
"traducción para entenderlo."
@@ -9867,8 +9867,8 @@ msgid ""
"You can always leave comments on the blog post related to the issue or "
"feedback you want to report."
msgstr ""
-"Siempre podés dejar comentarios en el posteo de blog relacionado con la "
-"cuestión o comentario que querés reportar."
+"Siempre puedes dejar comentarios en el posteo de blog relacionado con la "
+"cuestión o comentario que quieres reportar."
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
@@ -9877,7 +9877,7 @@ msgid ""
" way."
msgstr ""
"Si no hay un posteo de blog relacionado con tu cuestión, por favor "
-"contactanos de otra manera."
+"contáctanos de otra manera."
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
@@ -9890,7 +9890,7 @@ msgid ""
"You can find us in the #tor channel on OFTC to give us feedback or report "
"bugs/issues."
msgstr ""
-"Podés encontrarnos en el canal #tor en OFTC, para darnos comentarios o "
+"Puedes encontrarnos en el canal #tor en OFTC, para darnos comentarios o "
"reportar errores/dificultades."
#: https//support.torproject.org/misc/bug-or-feedback/
@@ -9900,7 +9900,7 @@ msgid ""
" to you when we can."
msgstr ""
"Podríamos no responder enseguida, pero sí comprobamos la lista acumulada, y "
-"te vamos a responder ni bien podamos."
+"te responderemos ni bien podamos."
#: https//support.torproject.org/misc/bug-or-feedback/
#: (content/misc/bug-or-feedback/contents+en.lrquestion.description)
@@ -9924,7 +9924,7 @@ msgstr ""
"Para reportar cuestiones o comentarios usando listas de correo electrónico, "
"te recomendamos que lo hagas en la que está relacionada con lo que te "
"gustaría reportar. Un directorio completo de nuestras listas de correo puede"
-" ser encontrado [acá](https://lists.torproject.org/cgi-"
+" ser encontrado [aquí](https://lists.torproject.org/cgi-"
"bin/mailman/listinfo)."
#: https//support.torproject.org/misc/bug-or-feedback/
@@ -10560,7 +10560,7 @@ msgstr ""
#: (content/get-in-touch/irc-help/contents+en.lrquestion.description)
msgid "1. Enter in [OFTC](https://webchat.oftc.net/?channels=tor) webchat."
msgstr ""
-"1. Entrá en el chat web de [OFTC](https://webchat.oftc.net/?channels=tor)."
+"1. Entra en el chat web de [OFTC](https://webchat.oftc.net/?channels=tor)."
#: https//support.torproject.org/get-in-touch/irc-help/
#: (content/get-in-touch/irc-help/contents+en.lrquestion.description)
@@ -10798,7 +10798,7 @@ msgstr ""
#: https//support.torproject.org/get-in-touch/why-i-cant-join-tor-channels/
#: (content/get-in-touch/why-i-cant-join-tor-channels/contents+en.lrquestion.description)
msgid "6. Fill out the Captcha that pops up, and click ok."
-msgstr "6. Completá el Captcha que aparece, y cliqueá \"Aceptar\"."
+msgstr "6. Completa el Captcha que aparece, y cliquea \"Aceptar\"."
#: https//support.torproject.org/get-in-touch/why-i-cant-join-tor-channels/
#: (content/get-in-touch/why-i-cant-join-tor-channels/contents+en.lrquestion.description)
@@ -10971,8 +10971,8 @@ msgid ""
"lines from above (Note, use whatever is the current experimental version "
"instead of 0.4.5.x from the example below):"
msgstr ""
-"Si querés intentar con paquetes experimentales, agregá estos **además** de "
-"las líneas de arriba (Nota: usá cualquiera sea la versión experimental "
+"Si quieres intentar con paquetes experimentales, agrega estas **además** de "
+"las líneas de arriba (Nota: usa cualquiera sea la versión experimental "
"actual, en vez de 0.4.5.x como en el ejemplo de abajo):"
#: https//support.torproject.org/apt/tor-deb-repo/
@@ -11034,7 +11034,7 @@ msgstr ""
msgid "**Note:** Ubuntu Focal dropped support for 32-bit, so instead use:"
msgstr ""
"**Nota:** Ubuntu Focal discontinuó el soporte para 32-bit, por lo que en su "
-"lugar usá:"
+"lugar usa:"
#: https//support.torproject.org/apt/tor-deb-repo/
#: (content/apt/apt-1/contents+en.lrquestion.description)
@@ -11178,7 +11178,7 @@ msgid ""
"Then you need to add the following entries to `/etc/apt/sources.list` or a "
"new file in `/etc/apt/sources.list.d/`:"
msgstr ""
-"Luego, necesitás agregar las siguientes entradas a `/etc/apt/sources.list` o"
+"Luego, necesitas agregar las siguientes entradas a `/etc/apt/sources.list` o"
" a un nuevo archivo en `/etc/apt/sources.list.d/`"
#: https//support.torproject.org/apt/apt-over-tor/
1
0
[translation/support-portal] https://gitweb.torproject.org/translation.git/commit/?h=support-portal
by translation@torproject.org 21 Feb '21
by translation@torproject.org 21 Feb '21
21 Feb '21
commit 40bd6997fcd9b44f8d05e637d641ffe5adc0b75e
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Feb 21 19:18:17 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=support-portal
---
contents+es.po | 67 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 34 insertions(+), 33 deletions(-)
diff --git a/contents+es.po b/contents+es.po
index e02aa1319e..703bdc5615 100644
--- a/contents+es.po
+++ b/contents+es.po
@@ -3601,7 +3601,7 @@ msgstr "**Si quieres importar marcadores**"
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
msgid "- Choose Import Bookmarks from HTML"
-msgstr "- Elegí Importar Marcadores desde HTML"
+msgstr "- Elige Importar Marcadores desde HTML"
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
@@ -3609,15 +3609,15 @@ msgid ""
"- Within the Import Bookmarks File window that opens, navigate to the "
"bookmarks HTML file you are importing and select the file."
msgstr ""
-"- Dentro de la ventana que se abre, Importar Archivo de Marcadores, navegá "
-"hasta el archivo HTML con marcadores que vas a importar, y seleccionalo."
+"- Dentro de la ventana que se abre, Importar Archivo de Marcadores, navega "
+"hasta el archivo HTML con marcadores que vas a importar, y seleccionálo."
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
msgid "- Click the Open button. The Import Bookmarks File window will close."
msgstr ""
-"- Cliqueá el botón Abrir. La ventana Importar Archivo de Marcadores se va a "
-"cerrar."
+"- Cliquea el botón Abrir. La ventana Importar Archivo de Marcadores se "
+"cerrará."
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
@@ -3625,18 +3625,18 @@ msgid ""
"> The bookmarks in the selected HTML file will be added to your Tor Browser "
"within the Bookmarks Menu directory."
msgstr ""
-"> Los marcadores en el archivo HTML seleccionado se van a agregar a tu "
-"Navegador Tor dentro de la carpeta Menú de Marcadores."
+"> Los marcadores en el archivo HTML seleccionado se agregarán a tu Navegador"
+" Tor dentro de la carpeta Menú de Marcadores."
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
msgid "**If you wish to backup**"
-msgstr "**Si querés hacer una copia de seguridad**"
+msgstr "**Si quieres hacer una copia de seguridad**"
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
msgid "- Choose Backup"
-msgstr "- Elegí Copia de Seguridad"
+msgstr "- Elige Copia de Seguridad"
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
@@ -3644,20 +3644,21 @@ msgid ""
"- A new window opens and you have to choose the location to save the file. "
"The file has a .json extension."
msgstr ""
-"- Se abre una nueva ventana, y tenés que elegir la ubicación para guardar el"
-" archivo. Este tiene una extensión .json."
+"- Se abre una nueva ventana, y tienes que elegir la ubicación para guardar "
+"el archivo. Este tiene una extensión .json."
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
msgid "**If you wish to restore**"
-msgstr "**Si querés restaurar**"
+msgstr "**Si quieres restaurar**"
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
msgid ""
"- Choose Restore and then select the bookmark file you wish to restore."
msgstr ""
-"- Elegí Restaurar, y después seleccioná el archivo de marcadores que querés."
+"- Elige Restaurar, y después selecciona el archivo de marcadores que "
+"quieres."
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
#: (content/tbb/export-and-import-bookmarks/contents+en.lrquestion.description)
@@ -3665,7 +3666,7 @@ msgid ""
"- Click okay to the pop up box that appears and hurray, you just restored "
"your backup bookmark."
msgstr ""
-"- Cliqueá Aceptar en el cuadro de diálogo que aparece y, ¡hurra!, terminaste"
+"- Cliquea Aceptar en el cuadro de diálogo que aparece y, ¡hurra!, terminaste"
" de restaurar la copia de seguridad de tus marcadores."
#: https//support.torproject.org/tbb/export-and-import-bookmarks/
@@ -3692,7 +3693,7 @@ msgid ""
"After exporting the data from the browser, follow the above step to import "
"the bookmark file into your Tor Browser."
msgstr ""
-"Luego de exportar los datos desde el navegador, seguí el paso de arriba para"
+"Luego de exportar los datos desde el navegador, sigue el paso de arriba para"
" importar el archivo de marcadores dentro de tu Navegador Tor."
#: https//support.torproject.org/tbb/fake-tbb/
@@ -3720,7 +3721,7 @@ msgid ""
"To make sure you are downloading the right Tor Browser visit our [download "
"page](https://www.torproject.org/download/)."
msgstr ""
-"Para asegurarte que estás descargando el Navegador Tor correcto, visitá "
+"Para asegurarte que estás descargando el Navegador Tor correcto, visita "
"nuestra [página de descarga](https://www.torproject.org/download/)."
#: https//support.torproject.org/tbb/fake-tbb/
@@ -3730,7 +3731,7 @@ msgid ""
"Tor Browser by [verifying the signature](https://support.torproject.org/tbb"
"/how-to-verify-signature/)."
msgstr ""
-"Después de descargar, podés asegurarte que tenés la versión oficial del "
+"Después de descargar, puedes asegurar que tienes la versión oficial del "
"Navegador Tor [verificando la firma](https://support.torproject.org/tbb/how-"
"to-verify-signature/)."
@@ -3741,15 +3742,15 @@ msgid ""
"section](https://support.torproject.org/censorship/censorship-3/) to get "
"information about alternate way of downloading Tor Browser."
msgstr ""
-"Si no sos capaz de acceder a nuestro sitio web, visitá entonces la [sección "
-"de censura](https://support.torproject.org/censorship/censorship-3/) para "
+"Si no eres capaz de acceder a nuestro sitio web, visita entonces la [sección"
+" de censura](https://support.torproject.org/censorship/censorship-3/) para "
"obtener información acerca de formas alternativas para descargar el "
"Navegador Tor."
#: https//support.torproject.org/tbb/fake-tbb/
#: (content/tbb/fake-tbb/contents+en.lrquestion.description)
msgid "You can report fake Tor Browsers on frontdesk(a)torproject.org"
-msgstr "Podés reportar Navegadores Tor falsos en frontdesk(a)torproject.org"
+msgstr "Puedes reportar Navegadores Tor falsos en frontdesk(a)torproject.org"
#: https//support.torproject.org/tbb/how-to-verify-signature/
#: (content/tbb/how-to-verify-signature/contents+en.lrquestion.title)
@@ -3804,7 +3805,7 @@ msgid ""
"right-clicking the \"signature\" link and selecting the \"save file as\" "
"option."
msgstr ""
-"Esto va a variar para cada navegador web, pero, generalmente, podés "
+"Esto va a variar para cada navegador web, pero, generalmente, puedes "
"descargar este archivo haciendo clic derecho en el vínculo \"firma\" y "
"seleccionando la opción \"guardar archivo como\"."
@@ -3908,7 +3909,7 @@ msgstr "#### Para usuarios macOS:"
msgid ""
"If you are using macOS, you can [install GPGTools](https://gpgtools.org)."
msgstr ""
-"Si estás usando macOS, podés [instalar GPGTools](https://gpgtools.org)."
+"Si estás usando macOS, puedes [instalar GPGTools](https://gpgtools.org)."
#: https//support.torproject.org/tbb/how-to-verify-signature/
#: (content/tbb/how-to-verify-signature/contents+en.lrquestion.description)
@@ -4036,8 +4037,8 @@ msgid ""
"After importing the key, you can save it to a file (identifying it by its "
"fingerprint here):"
msgstr ""
-"Después de importar la clave, podés guardarla en un archivo (identificándolo"
-" acá por la huella digital):"
+"Después de importar la clave, puedes guardarla en un archivo (identificado "
+"aquí por su huella digital):"
#: https//support.torproject.org/tbb/how-to-verify-signature/
#: (content/tbb/how-to-verify-signature/contents+en.lrquestion.description)
@@ -4318,8 +4319,8 @@ msgid ""
"most recent stable Tor Browser to see if your issue is listed."
msgstr ""
"Si empezaste a tener dificultades con tu Navegador Tor luego de actualizar, "
-"revisá [blog.torproject.org](https://blog.torproject.org) por una entrada "
-"acerca del Navegador Tor estable más reciente, para ver si tu dificultad "
+"comprueba [blog.torproject.org](https://blog.torproject.org) por una entrada"
+" acerca del Navegador Tor estable más reciente, para ver si tu dificultad "
"está listada."
#: https//support.torproject.org/tbb/tbb-1/
@@ -4330,10 +4331,10 @@ msgid ""
"browser/-/issues) and create a [GitLab issue](/misc/bug-or-feedback/) about "
"what you're experiencing."
msgstr ""
-"Si tu dificultad no está listada ahí, por favor comprobá primero el "
+"Si tu dificultad no está listada ahí, por favor comprueba primero el "
"[rastreador de dificultades del Navegador "
"Tor](https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues), y"
-" creá una [cuestión de GitLab](/misc/bug-or-feedback/) acerca de lo que "
+" crea una [cuestión de GitLab](/misc/bug-or-feedback/) acerca de lo que "
"estás experimentando."
#: https//support.torproject.org/tbb/tbb-10/
@@ -4361,7 +4362,7 @@ msgid ""
"Please open your antivirus or malware protection software and look in the "
"settings for a \"allowlist\" or something similar."
msgstr ""
-"Por favor abrí tu antivirus o protector contra malware, y mirá en los "
+"Por favor abre tu antivirus o protector contra malware, y mira en los "
"ajustes por una \"lista de permitidos\" o algo similar."
#: https//support.torproject.org/tbb/tbb-10/
@@ -4997,7 +4998,7 @@ msgid ""
"If you believe this is a Tor Browser issue, please report it on our [issue "
"tracker](https://gitlab.torproject.org/groups/tpo/-/issues)."
msgstr ""
-"Si creés que esta es una cuestión del Navegador Tor, por favor reportala en "
+"Si crees que esta es una cuestión del Navegador Tor, por favor repórtala en "
"nuestro [rastreador de "
"errores](https://gitlab.torproject.org/groups/tpo/-/issues)."
@@ -5447,7 +5448,7 @@ msgstr ""
#: https//support.torproject.org/tbb/tbb-35/
#: (content/tbb/tbb-35/contents+en.lrquestion.title)
msgid "Can you get rid of all the Captchas?"
-msgstr "¿Podés deshacerte de todos los \"Captchas\"?"
+msgstr "¿Puedes deshacerte de todos los \"Captchas\"?"
#: https//support.torproject.org/tbb/tbb-35/
#: (content/tbb/tbb-35/contents+en.lrquestion.description)
@@ -5467,7 +5468,7 @@ msgid ""
msgstr ""
"Lo mejor para hacer en estos casos es contactar a los propietarios del sitio"
" web, e informarles que sus Captchas están evitando que usuarios tales como "
-"vos estén usando sus servicios."
+"tú estén usando sus servicios."
#: https//support.torproject.org/tbb/tbb-36/
#: (content/tbb/tbb-36/contents+en.lrquestion.title)
@@ -5694,7 +5695,7 @@ msgid ""
msgstr ""
"La mayoría de los otros motores de búsqueda almacenan tus búsquedas, junto "
"con otras informaciones tales como la marca temporal, tu dirección IP, y la "
-"información de tu cuenta si tenés una sesión iniciada."
+"información de tu cuenta si tienes una sesión iniciada."
#: https//support.torproject.org/tbb/tbb-42/
#: (content/tbb/tbb-42/contents+en.lrquestion.title)
1
0
[translation/communitytpo-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot
by translation@torproject.org 21 Feb '21
by translation@torproject.org 21 Feb '21
21 Feb '21
commit 98c1d616b3ab41d73bda5dff4565bae18dd67f05
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Feb 21 19:15:12 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-conten…
---
contents+ka.po | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/contents+ka.po b/contents+ka.po
index 2607d803ea..1b4b17dd90 100644
--- a/contents+ka.po
+++ b/contents+ka.po
@@ -12914,6 +12914,8 @@ msgid ""
"For example, readers can probably determine whether it's thttpd or Apache, "
"and learn something about your operating system."
msgstr ""
+"მაგალითად, მკითხველებს შეუძლიათ დაადგინონ thttpd არის თუ Apache, ამასთან, "
+"თქვენს საოპერაციო სისტემას უკეთ გაეცნობიან."
#: https//community.torproject.org/onion-services/advanced/opsec/
#: (content/onion-services/advanced/opsec/contents+en.lrpage.body)
@@ -12921,6 +12923,8 @@ msgid ""
"- If your computer isn't online all the time, your onion service won't be "
"either."
msgstr ""
+"- თუ თქვენი კომპიუტერი არ იქნება ქსელში მუდმივად, შესაბამისად ვერც onion-"
+"მომსაურება ვერ იქნება."
#: https//community.torproject.org/onion-services/advanced/opsec/
#: (content/onion-services/advanced/opsec/contents+en.lrpage.body)
@@ -12934,6 +12938,9 @@ msgid ""
"rather than a Tor relay, since relay uptime and other properties are "
"publicly visible."
msgstr ""
+"- ზოგადად, უმჯობესია onion-მომსახურებები განთავსდეს Tor-კლიენტზე, ვიდრე Tor-"
+"გადამცემზე, ვინაიდან გადამცემის მუშაობის დრო და სხვა მახასიათებლები, "
+"საჯაროდაა ხილული."
#: https//community.torproject.org/onion-services/advanced/opsec/
#: (content/onion-services/advanced/opsec/contents+en.lrpage.body)
@@ -12941,6 +12948,8 @@ msgid ""
"- The longer an onion service is online, the higher the risk that its "
"location is discovered."
msgstr ""
+"- რაც უფრო დიდხანსაა onion-მომსახურება ქსელში, მით უფრო მეტია საფრთხე, მისი "
+"მდებარეობის აღმოჩენის."
#: https//community.torproject.org/onion-services/advanced/opsec/
#: (content/onion-services/advanced/opsec/contents+en.lrpage.body)
@@ -12954,6 +12963,8 @@ msgstr ""
msgid ""
"- Another common issue is whether to use HTTPS on your onionsite or not."
msgstr ""
+"- კიდევ ერთი გავრცელებული საკითხია, უნდა გამოიყენოთ თუ არა HTTPS თქვენი "
+"Onion-საიტისთვის."
#: https//community.torproject.org/onion-services/advanced/opsec/
#: (content/onion-services/advanced/opsec/contents+en.lrpage.body)
@@ -12961,6 +12972,9 @@ msgid ""
"Have a look at [this post](https://blog.torproject.org/blog/facebook-hidden-"
"services-and-https-certs) on the Tor Blog to learn more about these issues."
msgstr ""
+"გადახედეთ [ამ სტატიას](https://blog.torproject.org/blog/facebook-hidden-"
+"services-and-https-certs) Tor-ის სვეტზე, აღნიშნული საკითხების უკეთ "
+"გასაცნობად."
#: https//community.torproject.org/onion-services/advanced/opsec/
#: (content/onion-services/advanced/opsec/contents+en.lrpage.body)
@@ -12971,6 +12985,12 @@ msgid ""
"onion-services) and [Vanguards' Security README](https://github.com"
"/mikeperry-tor/vanguards/blob/master/README_SECURITY.md)."
msgstr ""
+"- თქვენი Onion-მომსახურების დასაცავად ძლიერი შეტევებისგან, სასურველია "
+"გამოიყენოთ [Vanguards დამატება](https://github.com/mikeperry-tor/vanguards),"
+" იხილეთ [Tor სვეტზე რა არის Vanguards](https://blog.torproject.org"
+"/announcing-vanguards-add-onion-services) და გაეცანით [Vanguards-ის "
+"უსაფრთხოების ᲬᲔᲡᲔᲑᲡ](https://github.com/mikeperry-"
+"tor/vanguards/blob/master/README_SECURITY.md)."
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.title)
@@ -12996,6 +13016,8 @@ msgid ""
"You can either configure a web server to show an Onion-Location Header or "
"add an HTML meta attribute in the website."
msgstr ""
+"თქვენ ან უნდა გამართოთ ვებსერვერი, რომ გამოჩნდეს Onion-მდებარეობის თავსართი,"
+" ან უნდა დაამატოთ HTML მაკავშირებელი თვისებები, ვებსაიტზე."
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.body)
@@ -13037,7 +13059,7 @@ msgstr ""
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.body)
msgid "Check your web server and operating system documentation."
-msgstr ""
+msgstr "გადახედეთ თქვენი ვებსერვერისა და საოპერაციო სისტემის მასალებს."
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.body)
@@ -13073,6 +13095,8 @@ msgid ""
"**Step 2.** Add the Onion-Location header to your Virtual Host configuration"
" file"
msgstr ""
+"**ნაბიჯი 2.** დაამატეთ Onion-მდებარეობის თავსართი თქვენი ვირტუალური ჰოსტის "
+"გამართვის ფაილში"
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.body)
@@ -13160,7 +13184,7 @@ msgstr "$ wget --server-response --spider your-website.tld"
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.body)
msgid "Look for `onion-location` entry and the onion service address."
-msgstr ""
+msgstr "მონახეთ `onion-location` ჩანაწერი და Onion-მომსახურების მისამართი."
#: https//community.torproject.org/onion-services/advanced/onion-location/
#: (content/onion-services/advanced/onion-location/contents+en.lrpage.body)
1
0
[Git][tpo/applications/fenix] Pushed new tag tor-browser-86.1.0-10.5-1-build1
by Matthew Finkel 21 Feb '21
by Matthew Finkel 21 Feb '21
21 Feb '21
Matthew Finkel pushed new tag tor-browser-86.1.0-10.5-1-build1 at The Tor Project / Applications / fenix
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/tree/tor-browser-86.…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[tor-browser/tor-browser-78.8.0esr-10.5-2] Bug 27604: Fix addon issues when moving TB directory
by sysrqb@torproject.org 21 Feb '21
by sysrqb@torproject.org 21 Feb '21
21 Feb '21
commit 76867652da13c2e41fb26be0f08021ed489d9736
Author: Alex Catarineu <acat(a)torproject.org>
Date: Wed Oct 30 10:44:48 2019 +0100
Bug 27604: Fix addon issues when moving TB directory
---
toolkit/mozapps/extensions/internal/XPIProvider.jsm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index bf31932b59f1..5e467fb4f14c 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -485,7 +485,7 @@ class XPIState {
// Builds prior to be 1512436 did not include the rootURI property.
// If we're updating from such a build, add that property now.
- if (!("rootURI" in this) && this.file) {
+ if (this.file) {
this.rootURI = getURIForResourceInFile(this.file, "").spec;
}
@@ -498,7 +498,10 @@ class XPIState {
saved.currentModifiedTime != this.lastModifiedTime
) {
this.lastModifiedTime = saved.currentModifiedTime;
- } else if (saved.currentModifiedTime === null) {
+ } else if (
+ saved.currentModifiedTime === null &&
+ (!this.file || !this.file.exists())
+ ) {
this.missing = true;
}
}
@@ -1439,6 +1442,7 @@ var XPIStates = {
if (oldState[loc.name]) {
loc.restore(oldState[loc.name]);
+ changed = changed || loc.path != oldState[loc.name].path;
}
changed = changed || loc.changed;
1
0
[tor-browser/tor-browser-78.8.0esr-10.5-2] Bug 32220: Improve the letterboxing experience
by sysrqb@torproject.org 21 Feb '21
by sysrqb@torproject.org 21 Feb '21
21 Feb '21
commit 698da47f11307568d708ec083e95ab545078edcf
Author: Richard Pospesel <richard(a)torproject.org>
Date: Mon Oct 28 17:42:17 2019 -0700
Bug 32220: Improve the letterboxing experience
CSS and JS changes to alter the UX surrounding letterboxing. The
browser element containing page content is now anchored to the bottom
of the toolbar, and the remaining letterbox margin is the same color
as the firefox chrome. The letterbox margin and border are tied to
the currently selected theme.
Also adds a 'needsLetterbox' property to tabbrowser.xml to fix a race
condition present when using the 'isEmpty' property. Using 'isEmpty'
as a proxy for 'needsLetterbox' resulted in over-zealous/unnecessary
letterboxing of about:blank tabs.
---
browser/base/content/browser.css | 8 ++
browser/base/content/tabbrowser-tab.js | 9 +++
browser/themes/shared/tabs.inc.css | 6 ++
.../components/resistfingerprinting/RFPHelper.jsm | 94 +++++++++++++++++++---
4 files changed, 105 insertions(+), 12 deletions(-)
diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css
index 808c03e88223..a0b1bf4a8951 100644
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -85,6 +85,14 @@ body {
display: none;
}
+
+.browserStack > browser.letterboxing {
+ border-color: var(--chrome-content-separator-color);
+ border-style: solid;
+ border-width : 1px;
+ border-top: none;
+}
+
%ifdef MENUBAR_CAN_AUTOHIDE
#toolbar-menubar[autohide="true"] {
overflow: hidden;
diff --git a/browser/base/content/tabbrowser-tab.js b/browser/base/content/tabbrowser-tab.js
index 183eff1bab86..7f376ab1d122 100644
--- a/browser/base/content/tabbrowser-tab.js
+++ b/browser/base/content/tabbrowser-tab.js
@@ -225,6 +225,15 @@
return true;
}
+ get needsLetterbox() {
+ let browser = this.linkedBrowser;
+ if (isBlankPageURL(browser.currentURI.spec)) {
+ return false;
+ }
+
+ return true;
+ }
+
get lastAccessed() {
return this._lastAccessed == Infinity ? Date.now() : this._lastAccessed;
}
diff --git a/browser/themes/shared/tabs.inc.css b/browser/themes/shared/tabs.inc.css
index b47842af766c..019da6ecf76f 100644
--- a/browser/themes/shared/tabs.inc.css
+++ b/browser/themes/shared/tabs.inc.css
@@ -33,6 +33,12 @@
background-color: #f9f9fa;
}
+/* extend down the toolbar's colors when letterboxing is enabled*/
+#tabbrowser-tabpanels.letterboxing {
+ background-color: var(--toolbar-bgcolor);
+ background-image: var(--toolbar-bgimage);
+}
+
:root[privatebrowsingmode=temporary] #tabbrowser-tabpanels {
/* Value for --in-content-page-background in aboutPrivateBrowsing.css */
background-color: #25003e;
diff --git a/toolkit/components/resistfingerprinting/RFPHelper.jsm b/toolkit/components/resistfingerprinting/RFPHelper.jsm
index 49010d1c8cb1..b906a067fd63 100644
--- a/toolkit/components/resistfingerprinting/RFPHelper.jsm
+++ b/toolkit/components/resistfingerprinting/RFPHelper.jsm
@@ -40,6 +40,7 @@ class _RFPHelper {
// ============================================================================
constructor() {
this._initialized = false;
+ this._borderDimensions = null;
}
init() {
@@ -361,6 +362,24 @@ class _RFPHelper {
});
}
+ getBorderDimensions(aBrowser) {
+ if (this._borderDimensions) {
+ return this._borderDimensions;
+ }
+
+ const win = aBrowser.ownerGlobal;
+ const browserStyle = win.getComputedStyle(aBrowser);
+
+ this._borderDimensions = {
+ top : parseInt(browserStyle.borderTopWidth),
+ right: parseInt(browserStyle.borderRightWidth),
+ bottom : parseInt(browserStyle.borderBottomWidth),
+ left : parseInt(browserStyle.borderLeftWidth),
+ };
+
+ return this._borderDimensions;
+ }
+
_addOrClearContentMargin(aBrowser) {
let tab = aBrowser.getTabBrowser().getTabForBrowser(aBrowser);
@@ -369,9 +388,13 @@ class _RFPHelper {
return;
}
+ // we add the letterboxing class even if the content does not need letterboxing
+ // in which case margins are set such that the borders are hidden
+ aBrowser.classList.add("letterboxing");
+
// We should apply no margin around an empty tab or a tab with system
// principal.
- if (tab.isEmpty || aBrowser.contentPrincipal.isSystemPrincipal) {
+ if (!tab.needsLetterbox || aBrowser.contentPrincipal.isSystemPrincipal) {
this._clearContentViewMargin(aBrowser);
} else {
this._roundContentView(aBrowser);
@@ -539,10 +562,29 @@ class _RFPHelper {
// Calculating the margins around the browser element in order to round the
// content viewport. We will use a 200x100 stepping if the dimension set
// is not given.
- let margins = calcMargins(containerWidth, containerHeight);
+
+ const borderDimensions = this.getBorderDimensions(aBrowser);
+ const marginDims = calcMargins(containerWidth, containerHeight - borderDimensions.top);
+
+ let margins = {
+ top : 0,
+ right : 0,
+ bottom : 0,
+ left : 0,
+ };
+
+ // snap browser element to top
+ margins.top = 0;
+ // and leave 'double' margin at the bottom
+ margins.bottom = 2 * marginDims.height - borderDimensions.bottom;
+ // identical margins left and right
+ margins.right = marginDims.width - borderDimensions.right;
+ margins.left = marginDims.width - borderDimensions.left;
+
+ const marginStyleString = `${margins.top}px ${margins.right}px ${margins.bottom}px ${margins.left}px`;
// If the size of the content is already quantized, we do nothing.
- if (aBrowser.style.margin == `${margins.height}px ${margins.width}px`) {
+ if (aBrowser.style.margin === marginStyleString) {
log("_roundContentView[" + logId + "] is_rounded == true");
if (this._isLetterboxingTesting) {
log(
@@ -563,19 +605,35 @@ class _RFPHelper {
"_roundContentView[" +
logId +
"] setting margins to " +
- margins.width +
- " x " +
- margins.height
+ marginStyleString
);
- // One cannot (easily) control the color of a margin unfortunately.
- // An initial attempt to use a border instead of a margin resulted
- // in offset event dispatching; so for now we use a colorless margin.
- aBrowser.style.margin = `${margins.height}px ${margins.width}px`;
+
+ // The margin background color is determined by the background color of the
+ // window's tabpanels#tabbrowser-tabpanels element
+ aBrowser.style.margin = marginStyleString;
});
}
_clearContentViewMargin(aBrowser) {
+ const borderDimensions = this.getBorderDimensions(aBrowser);
+ // set the margins such that the browser elements border is visible up top, but
+ // are rendered off-screen on the remaining sides
+ let margins = {
+ top : 0,
+ right : -borderDimensions.right,
+ bottom : -borderDimensions.bottom,
+ left : -borderDimensions.left,
+ };
+ const marginStyleString = `${margins.top}px ${margins.right}px ${margins.bottom}px ${margins.left}px`;
+
+ aBrowser.ownerGlobal.requestAnimationFrame(() => {
+ aBrowser.style.margin = marginStyleString;
+ });
+ }
+
+ _removeLetterboxing(aBrowser) {
aBrowser.ownerGlobal.requestAnimationFrame(() => {
+ aBrowser.classList.remove("letterboxing");
aBrowser.style.margin = "";
});
}
@@ -593,6 +651,11 @@ class _RFPHelper {
aWindow.gBrowser.addTabsProgressListener(this);
aWindow.addEventListener("TabOpen", this);
+ const tabPanel = aWindow.document.getElementById("tabbrowser-tabpanels");
+ if (tabPanel) {
+ tabPanel.classList.add("letterboxing");
+ }
+
// Rounding the content viewport.
this._updateMarginsForTabsInWindow(aWindow);
}
@@ -616,10 +679,17 @@ class _RFPHelper {
tabBrowser.removeTabsProgressListener(this);
aWindow.removeEventListener("TabOpen", this);
- // Clear all margins and tooltip for all browsers.
+ // revert tabpanel's background colors to default
+ const tabPanel = aWindow.document.getElementById("tabbrowser-tabpanels");
+ if (tabPanel) {
+ tabPanel.classList.remove("letterboxing");
+ }
+
+ // and revert each browser element to default,
+ // restore default margins and remove letterboxing class
for (let tab of tabBrowser.tabs) {
let browser = tab.linkedBrowser;
- this._clearContentViewMargin(browser);
+ this._removeLetterboxing(browser);
}
}
1
0
[tor-browser/tor-browser-78.8.0esr-10.5-2] Bug 30237: Add v3 onion services client authentication prompt
by sysrqb@torproject.org 21 Feb '21
by sysrqb@torproject.org 21 Feb '21
21 Feb '21
commit f54af70bafa8e7d7a2cf95513c45da67898282e8
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Tue Nov 12 16:11:05 2019 -0500
Bug 30237: Add v3 onion services client authentication prompt
When Tor informs the browser that client authentication is needed,
temporarily load about:blank instead of about:neterror and prompt
for the user's key.
If a correctly formatted key is entered, use Tor's ONION_CLIENT_AUTH_ADD
control port command to add the key (via Torbutton's control port
module) and reload the page.
If the user cancels the prompt, display the standard about:neterror
"Unable to connect" page. This requires a small change to
browser/actors/NetErrorChild.jsm to account for the fact that the
docShell no longer has the failedChannel information. The failedChannel
is used to extract TLS-related error info, which is not applicable
in the case of a canceled .onion authentication prompt.
Add a leaveOpen option to PopupNotifications.show so we can display
error messages within the popup notification doorhanger without
closing the prompt.
Add support for onion services strings to the TorStrings module.
Add support for Tor extended SOCKS errors (Tor proposal 304) to the
socket transport and SOCKS layers. Improved display of all of these
errors will be implemented as part of bug 30025.
Also fixes bug 19757:
Add a "Remember this key" checkbox to the client auth prompt.
Add an "Onion Services Authentication" section within the
about:preferences "Privacy & Security section" to allow
viewing and removal of v3 onion client auth keys that have
been stored on disk.
Also fixes bug 19251: use enhanced error pages for onion service errors.
---
browser/actors/NetErrorChild.jsm | 7 +
browser/base/content/aboutNetError.js | 10 +-
browser/base/content/aboutNetError.xhtml | 1 +
browser/base/content/browser.js | 10 +
browser/base/content/browser.xhtml | 3 +
browser/base/content/tab-content.js | 5 +
browser/components/moz.build | 1 +
.../content/authNotificationIcon.inc.xhtml | 6 +
.../onionservices/content/authPopup.inc.xhtml | 16 ++
.../onionservices/content/authPreferences.css | 20 ++
.../content/authPreferences.inc.xhtml | 19 ++
.../onionservices/content/authPreferences.js | 66 +++++
.../components/onionservices/content/authPrompt.js | 316 +++++++++++++++++++++
.../components/onionservices/content/authUtil.jsm | 47 +++
.../onionservices/content/netError/browser.svg | 3 +
.../onionservices/content/netError/network.svg | 3 +
.../content/netError/onionNetError.css | 65 +++++
.../content/netError/onionNetError.js | 244 ++++++++++++++++
.../onionservices/content/netError/onionsite.svg | 7 +
.../onionservices/content/onionservices.css | 69 +++++
.../onionservices/content/savedKeysDialog.js | 259 +++++++++++++++++
.../onionservices/content/savedKeysDialog.xhtml | 42 +++
browser/components/onionservices/jar.mn | 9 +
browser/components/onionservices/moz.build | 1 +
browser/components/preferences/preferences.xhtml | 1 +
browser/components/preferences/privacy.inc.xhtml | 2 +
browser/components/preferences/privacy.js | 7 +
browser/themes/shared/notification-icons.inc.css | 3 +
docshell/base/nsDocShell.cpp | 81 +++++-
dom/ipc/BrowserParent.cpp | 21 ++
dom/ipc/BrowserParent.h | 3 +
dom/ipc/PBrowser.ipdl | 9 +
js/xpconnect/src/xpc.msg | 10 +
netwerk/base/nsSocketTransport2.cpp | 6 +
netwerk/socket/nsSOCKSIOLayer.cpp | 49 ++++
toolkit/modules/PopupNotifications.jsm | 6 +
toolkit/modules/RemotePageAccessManager.jsm | 1 +
.../lib/environments/frame-script.js | 1 +
xpcom/base/ErrorList.py | 22 ++
39 files changed, 1449 insertions(+), 2 deletions(-)
diff --git a/browser/actors/NetErrorChild.jsm b/browser/actors/NetErrorChild.jsm
index af9d6bd46128..de66e9eeda18 100644
--- a/browser/actors/NetErrorChild.jsm
+++ b/browser/actors/NetErrorChild.jsm
@@ -13,6 +13,8 @@ const { RemotePageChild } = ChromeUtils.import(
"resource://gre/actors/RemotePageChild.jsm"
);
+const { TorStrings } = ChromeUtils.import("resource:///modules/TorStrings.jsm");
+
XPCOMUtils.defineLazyServiceGetter(
this,
"gSerializationHelper",
@@ -29,6 +31,7 @@ class NetErrorChild extends RemotePageChild {
"RPMPrefIsLocked",
"RPMAddToHistogram",
"RPMRecordTelemetryEvent",
+ "RPMGetTorStrings",
];
this.exportFunctions(exportableFunctions);
}
@@ -82,4 +85,8 @@ class NetErrorChild extends RemotePageChild {
RPMRecordTelemetryEvent(category, event, object, value, extra) {
Services.telemetry.recordEvent(category, event, object, value, extra);
}
+
+ RPMGetTorStrings() {
+ return Cu.cloneInto(TorStrings.onionServices, this.contentWindow);
+ }
}
diff --git a/browser/base/content/aboutNetError.js b/browser/base/content/aboutNetError.js
index 053d26ade512..60db17f46eb9 100644
--- a/browser/base/content/aboutNetError.js
+++ b/browser/base/content/aboutNetError.js
@@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env mozilla/frame-script */
+/* import-globals-from ../../components/onionservices/content/netError/onionNetError.js */
const formatter = new Intl.DateTimeFormat("default");
@@ -241,7 +242,10 @@ function initPage() {
errDesc = document.getElementById("ed_generic");
}
- setErrorPageStrings(err);
+ const isOnionError = err.startsWith("onionServices.");
+ if (!isOnionError) {
+ setErrorPageStrings(err);
+ }
var sd = document.getElementById("errorShortDescText");
if (sd) {
@@ -387,6 +391,10 @@ function initPage() {
span.textContent = document.location.hostname;
}
}
+
+ if (isOnionError) {
+ OnionServicesAboutNetError.initPage(document);
+ }
}
function setupErrorUI() {
diff --git a/browser/base/content/aboutNetError.xhtml b/browser/base/content/aboutNetError.xhtml
index 3e9677e3c0ff..957b6f15a0be 100644
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -208,5 +208,6 @@
</div>
</div>
</body>
+ <script src="chrome://browser/content/onionservices/netError/onionNetError.js"/>
<script src="chrome://browser/content/aboutNetError.js"/>
</html>
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index a851be586c0c..9f5f0c608536 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -221,6 +221,11 @@ XPCOMUtils.defineLazyScriptGetter(
["SecurityLevelButton"],
"chrome://browser/content/securitylevel/securityLevel.js"
);
+XPCOMUtils.defineLazyScriptGetter(
+ this,
+ ["OnionAuthPrompt"],
+ "chrome://browser/content/onionservices/authPrompt.js"
+);
XPCOMUtils.defineLazyScriptGetter(
this,
"gEditItemOverlay",
@@ -1884,6 +1889,9 @@ var gBrowserInit = {
// Init the SecuritySettingsButton
SecurityLevelButton.init();
+ // Init the OnionAuthPrompt
+ OnionAuthPrompt.init();
+
// Certain kinds of automigration rely on this notification to complete
// their tasks BEFORE the browser window is shown. SessionStore uses it to
// restore tabs into windows AFTER important parts like gMultiProcessBrowser
@@ -2568,6 +2576,8 @@ var gBrowserInit = {
SecurityLevelButton.uninit();
+ OnionAuthPrompt.uninit();
+
gAccessibilityServiceIndicator.uninit();
AccessibilityRefreshBlocker.uninit();
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
index ddf5d766126b..4cab5fad6475 100644
--- a/browser/base/content/browser.xhtml
+++ b/browser/base/content/browser.xhtml
@@ -33,6 +33,7 @@
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/tor-circuit-display.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/torbutton.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/onionservices/onionservices.css" type="text/css"?>
# All DTD information is stored in a separate file so that it can be shared by
# hiddenWindowMac.xhtml.
@@ -626,6 +627,7 @@
#include ../../components/downloads/content/downloadsPanel.inc.xhtml
#include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml
+#include ../../components/onionservices/content/authPopup.inc.xhtml
#include browser-allTabsMenu.inc.xhtml
<hbox id="downloads-animation-container">
@@ -994,6 +996,7 @@
data-l10n-id="urlbar-indexed-db-notification-anchor"/>
<image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
data-l10n-id="urlbar-password-notification-anchor"/>
+#include ../../components/onionservices/content/authNotificationIcon.inc.xhtml
<stack id="plugins-notification-icon" class="notification-anchor-icon" role="button" align="center" data-l10n-id="urlbar-plugins-notification-anchor">
<image class="plugin-icon" />
<image id="plugin-icon-badge" />
diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js
index 30cfa891c1fb..c57244a962ee 100644
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -19,6 +19,9 @@ ChromeUtils.defineModuleGetter(
"BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"
);
+var { OnionAuthUtil } = ChromeUtils.import(
+ "chrome://browser/content/onionservices/authUtil.jsm"
+);
var { ActorManagerChild } = ChromeUtils.import(
"resource://gre/modules/ActorManagerChild.jsm"
@@ -101,5 +104,7 @@ if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
Services.obs.notifyObservers(this, "tab-content-frameloader-created");
+OnionAuthUtil.addCancelMessageListener(this, docShell);
+
// This is a temporary hack to prevent regressions (bug 1471327).
void content;
diff --git a/browser/components/moz.build b/browser/components/moz.build
index 09e209dc9c3b..b660be047b14 100644
--- a/browser/components/moz.build
+++ b/browser/components/moz.build
@@ -41,6 +41,7 @@ DIRS += [
'fxmonitor',
'migration',
'newtab',
+ 'onionservices',
'originattributes',
'pioneer',
'places',
diff --git a/browser/components/onionservices/content/authNotificationIcon.inc.xhtml b/browser/components/onionservices/content/authNotificationIcon.inc.xhtml
new file mode 100644
index 000000000000..91274d612739
--- /dev/null
+++ b/browser/components/onionservices/content/authNotificationIcon.inc.xhtml
@@ -0,0 +1,6 @@
+# Copyright (c) 2020, The Tor Project, Inc.
+
+<image id="tor-clientauth-notification-icon"
+ class="notification-anchor-icon tor-clientauth-icon"
+ role="button"
+ tooltiptext="&torbutton.onionServices.authPrompt.tooltip;"/>
diff --git a/browser/components/onionservices/content/authPopup.inc.xhtml b/browser/components/onionservices/content/authPopup.inc.xhtml
new file mode 100644
index 000000000000..bd0ec3aa0b00
--- /dev/null
+++ b/browser/components/onionservices/content/authPopup.inc.xhtml
@@ -0,0 +1,16 @@
+# Copyright (c) 2020, The Tor Project, Inc.
+
+<popupnotification id="tor-clientauth-notification" hidden="true">
+ <popupnotificationcontent orient="vertical">
+ <description id="tor-clientauth-notification-desc"/>
+ <label id="tor-clientauth-notification-learnmore"
+ class="text-link popup-notification-learnmore-link"
+ is="text-link"/>
+ <html:div>
+ <html:input id="tor-clientauth-notification-key" type="password"/>
+ <html:div id="tor-clientauth-warning"/>
+ <checkbox id="tor-clientauth-persistkey-checkbox"
+ label="&torbutton.onionServices.authPrompt.persistCheckboxLabel;"/>
+ </html:div>
+ </popupnotificationcontent>
+</popupnotification>
diff --git a/browser/components/onionservices/content/authPreferences.css b/browser/components/onionservices/content/authPreferences.css
new file mode 100644
index 000000000000..b3fb79b26ddc
--- /dev/null
+++ b/browser/components/onionservices/content/authPreferences.css
@@ -0,0 +1,20 @@
+/* Copyright (c) 2020, The Tor Project, Inc. */
+
+#torOnionServiceKeys-overview-container {
+ margin-right: 30px;
+}
+
+#onionservices-savedkeys-tree treechildren::-moz-tree-cell-text {
+ font-size: 80%;
+}
+
+#onionservices-savedkeys-errorContainer {
+ margin-top: 4px;
+ min-height: 3em;
+}
+
+#onionservices-savedkeys-errorIcon {
+ margin-right: 4px;
+ list-style-image: url("chrome://browser/skin/warning.svg");
+ visibility: hidden;
+}
diff --git a/browser/components/onionservices/content/authPreferences.inc.xhtml b/browser/components/onionservices/content/authPreferences.inc.xhtml
new file mode 100644
index 000000000000..f69c9dde66a2
--- /dev/null
+++ b/browser/components/onionservices/content/authPreferences.inc.xhtml
@@ -0,0 +1,19 @@
+# Copyright (c) 2020, The Tor Project, Inc.
+
+<groupbox id="torOnionServiceKeys" orient="vertical"
+ data-category="panePrivacy" hidden="true">
+ <label><html:h2 id="torOnionServiceKeys-header"/></label>
+ <hbox>
+ <description id="torOnionServiceKeys-overview-container" flex="1">
+ <html:span id="torOnionServiceKeys-overview"
+ class="tail-with-learn-more"/>
+ <label id="torOnionServiceKeys-learnMore" class="learnMore text-link"
+ is="text-link"/>
+ </description>
+ <vbox align="end">
+ <button id="torOnionServiceKeys-savedKeys"
+ is="highlightable-button"
+ class="accessory-button"/>
+ </vbox>
+ </hbox>
+</groupbox>
diff --git a/browser/components/onionservices/content/authPreferences.js b/browser/components/onionservices/content/authPreferences.js
new file mode 100644
index 000000000000..52f8272020cc
--- /dev/null
+++ b/browser/components/onionservices/content/authPreferences.js
@@ -0,0 +1,66 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+
+"use strict";
+
+ChromeUtils.defineModuleGetter(
+ this,
+ "TorStrings",
+ "resource:///modules/TorStrings.jsm"
+);
+
+/*
+ Onion Services Client Authentication Preferences Code
+
+ Code to handle init and update of onion services authentication section
+ in about:preferences#privacy
+*/
+
+const OnionServicesAuthPreferences = {
+ selector: {
+ groupBox: "#torOnionServiceKeys",
+ header: "#torOnionServiceKeys-header",
+ overview: "#torOnionServiceKeys-overview",
+ learnMore: "#torOnionServiceKeys-learnMore",
+ savedKeysButton: "#torOnionServiceKeys-savedKeys",
+ },
+
+ init() {
+ // populate XUL with localized strings
+ this._populateXUL();
+ },
+
+ _populateXUL() {
+ const groupbox = document.querySelector(this.selector.groupBox);
+
+ let elem = groupbox.querySelector(this.selector.header);
+ elem.textContent = TorStrings.onionServices.authPreferences.header;
+
+ elem = groupbox.querySelector(this.selector.overview);
+ elem.textContent = TorStrings.onionServices.authPreferences.overview;
+
+ elem = groupbox.querySelector(this.selector.learnMore);
+ elem.setAttribute("value", TorStrings.onionServices.learnMore);
+ elem.setAttribute("href", TorStrings.onionServices.learnMoreURL);
+
+ elem = groupbox.querySelector(this.selector.savedKeysButton);
+ elem.setAttribute(
+ "label",
+ TorStrings.onionServices.authPreferences.savedKeys
+ );
+ elem.addEventListener("command", () =>
+ OnionServicesAuthPreferences.onViewSavedKeys()
+ );
+ },
+
+ onViewSavedKeys() {
+ gSubDialog.open(
+ "chrome://browser/content/onionservices/savedKeysDialog.xhtml"
+ );
+ },
+}; // OnionServicesAuthPreferences
+
+Object.defineProperty(this, "OnionServicesAuthPreferences", {
+ value: OnionServicesAuthPreferences,
+ enumerable: true,
+ writable: false,
+});
diff --git a/browser/components/onionservices/content/authPrompt.js b/browser/components/onionservices/content/authPrompt.js
new file mode 100644
index 000000000000..d4a59ac46487
--- /dev/null
+++ b/browser/components/onionservices/content/authPrompt.js
@@ -0,0 +1,316 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+
+"use strict";
+
+XPCOMUtils.defineLazyModuleGetters(this, {
+ OnionAuthUtil: "chrome://browser/content/onionservices/authUtil.jsm",
+ CommonUtils: "resource://services-common/utils.js",
+ TorStrings: "resource:///modules/TorStrings.jsm",
+});
+
+const OnionAuthPrompt = (function() {
+ // OnionServicesAuthPrompt objects run within the main/chrome process.
+ // aReason is the topic passed within the observer notification that is
+ // causing this auth prompt to be displayed.
+ function OnionServicesAuthPrompt(aBrowser, aFailedURI, aReason, aOnionName) {
+ this._browser = aBrowser;
+ this._failedURI = aFailedURI;
+ this._reasonForPrompt = aReason;
+ this._onionName = aOnionName;
+ }
+
+ OnionServicesAuthPrompt.prototype = {
+ show(aWarningMessage) {
+ let mainAction = {
+ label: TorStrings.onionServices.authPrompt.done,
+ accessKey: TorStrings.onionServices.authPrompt.doneAccessKey,
+ leaveOpen: true, // Callback is responsible for closing the notification.
+ callback: this._onDone.bind(this),
+ };
+
+ let dialogBundle = Services.strings.createBundle(
+ "chrome://global/locale/dialog.properties");
+
+ let cancelAccessKey = dialogBundle.GetStringFromName("accesskey-cancel");
+ if (!cancelAccessKey)
+ cancelAccessKey = "c"; // required by PopupNotifications.show()
+
+ let cancelAction = {
+ label: dialogBundle.GetStringFromName("button-cancel"),
+ accessKey: cancelAccessKey,
+ callback: this._onCancel.bind(this),
+ };
+
+ let _this = this;
+ let options = {
+ autofocus: true,
+ hideClose: true,
+ persistent: true,
+ removeOnDismissal: false,
+ eventCallback(aTopic) {
+ if (aTopic === "showing") {
+ _this._onPromptShowing(aWarningMessage);
+ } else if (aTopic === "shown") {
+ _this._onPromptShown();
+ } else if (aTopic === "removed") {
+ _this._onPromptRemoved();
+ }
+ }
+ };
+
+ this._prompt = PopupNotifications.show(this._browser,
+ OnionAuthUtil.domid.notification, "",
+ OnionAuthUtil.domid.anchor,
+ mainAction, [cancelAction], options);
+ },
+
+ _onPromptShowing(aWarningMessage) {
+ let xulDoc = this._browser.ownerDocument;
+ let descElem = xulDoc.getElementById(OnionAuthUtil.domid.description);
+ if (descElem) {
+ // Handle replacement of the onion name within the localized
+ // string ourselves so we can show the onion name as bold text.
+ // We do this by splitting the localized string and creating
+ // several HTML <span> elements.
+ while (descElem.firstChild)
+ descElem.removeChild(descElem.firstChild);
+
+ let fmtString = TorStrings.onionServices.authPrompt.description;
+ let prefix = "";
+ let suffix = "";
+ const kToReplace = "%S";
+ let idx = fmtString.indexOf(kToReplace);
+ if (idx < 0) {
+ prefix = fmtString;
+ } else {
+ prefix = fmtString.substring(0, idx);
+ suffix = fmtString.substring(idx + kToReplace.length);
+ }
+
+ const kHTMLNS = "http://www.w3.org/1999/xhtml";
+ let span = xulDoc.createElementNS(kHTMLNS, "span");
+ span.textContent = prefix;
+ descElem.appendChild(span);
+ span = xulDoc.createElementNS(kHTMLNS, "span");
+ span.id = OnionAuthUtil.domid.onionNameSpan;
+ span.textContent = this._onionName;
+ descElem.appendChild(span);
+ span = xulDoc.createElementNS(kHTMLNS, "span");
+ span.textContent = suffix;
+ descElem.appendChild(span);
+ }
+
+ // Set "Learn More" label and href.
+ let learnMoreElem = xulDoc.getElementById(OnionAuthUtil.domid.learnMore);
+ if (learnMoreElem) {
+ learnMoreElem.setAttribute("value", TorStrings.onionServices.learnMore);
+ learnMoreElem.setAttribute("href", TorStrings.onionServices.learnMoreURL);
+ }
+
+ this._showWarning(aWarningMessage);
+ let checkboxElem = this._getCheckboxElement();
+ if (checkboxElem) {
+ checkboxElem.checked = false;
+ }
+ },
+
+ _onPromptShown() {
+ let keyElem = this._getKeyElement();
+ if (keyElem) {
+ keyElem.setAttribute("placeholder",
+ TorStrings.onionServices.authPrompt.keyPlaceholder);
+ this._boundOnKeyFieldKeyPress = this._onKeyFieldKeyPress.bind(this);
+ this._boundOnKeyFieldInput = this._onKeyFieldInput.bind(this);
+ keyElem.addEventListener("keypress", this._boundOnKeyFieldKeyPress);
+ keyElem.addEventListener("input", this._boundOnKeyFieldInput);
+ keyElem.focus();
+ }
+ },
+
+ _onPromptRemoved() {
+ if (this._boundOnKeyFieldKeyPress) {
+ let keyElem = this._getKeyElement();
+ if (keyElem) {
+ keyElem.value = "";
+ keyElem.removeEventListener("keypress",
+ this._boundOnKeyFieldKeyPress);
+ this._boundOnKeyFieldKeyPress = undefined;
+ keyElem.removeEventListener("input", this._boundOnKeyFieldInput);
+ this._boundOnKeyFieldInput = undefined;
+ }
+ }
+ },
+
+ _onKeyFieldKeyPress(aEvent) {
+ if (aEvent.keyCode == aEvent.DOM_VK_RETURN) {
+ this._onDone();
+ } else if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
+ this._prompt.remove();
+ this._onCancel();
+ }
+ },
+
+ _onKeyFieldInput(aEvent) {
+ this._showWarning(undefined); // Remove the warning.
+ },
+
+ _onDone() {
+ let keyElem = this._getKeyElement();
+ if (!keyElem)
+ return;
+
+ let base64key = this._keyToBase64(keyElem.value);
+ if (!base64key) {
+ this._showWarning(TorStrings.onionServices.authPrompt.invalidKey);
+ return;
+ }
+
+ this._prompt.remove();
+
+ // Use Torbutton's controller module to add the private key to Tor.
+ let controllerFailureMsg =
+ TorStrings.onionServices.authPrompt.failedToSetKey;
+ try {
+ let { controller } =
+ Cu.import("resource://torbutton/modules/tor-control-port.js", {});
+ let torController = controller(aError => {
+ this.show(controllerFailureMsg);
+ });
+ let onionAddr = this._onionName.toLowerCase().replace(/\.onion$/, "");
+ let checkboxElem = this._getCheckboxElement();
+ let isPermanent = (checkboxElem && checkboxElem.checked);
+ torController.onionAuthAdd(onionAddr, base64key, isPermanent)
+ .then(aResponse => {
+ // Success! Reload the page.
+ this._browser.sendMessageToActor(
+ "Browser:Reload",
+ {},
+ "BrowserTab"
+ );
+ })
+ .catch(aError => {
+ if (aError.torMessage)
+ this.show(aError.torMessage);
+ else
+ this.show(controllerFailureMsg);
+ });
+ } catch (e) {
+ this.show(controllerFailureMsg);
+ }
+ },
+
+ _onCancel() {
+ // Arrange for an error page to be displayed.
+ this._browser.messageManager.sendAsyncMessage(
+ OnionAuthUtil.message.authPromptCanceled,
+ {failedURI: this._failedURI.spec,
+ reasonForPrompt: this._reasonForPrompt});
+ },
+
+ _getKeyElement() {
+ let xulDoc = this._browser.ownerDocument;
+ return xulDoc.getElementById(OnionAuthUtil.domid.keyElement);
+ },
+
+ _getCheckboxElement() {
+ let xulDoc = this._browser.ownerDocument;
+ return xulDoc.getElementById(OnionAuthUtil.domid.checkboxElement);
+ },
+
+ _showWarning(aWarningMessage) {
+ let xulDoc = this._browser.ownerDocument;
+ let warningElem =
+ xulDoc.getElementById(OnionAuthUtil.domid.warningElement);
+ let keyElem = this._getKeyElement();
+ if (warningElem) {
+ if (aWarningMessage) {
+ warningElem.textContent = aWarningMessage;
+ warningElem.removeAttribute("hidden");
+ if (keyElem)
+ keyElem.className = "invalid";
+ } else {
+ warningElem.setAttribute("hidden", "true");
+ if (keyElem)
+ keyElem.className = "";
+ }
+ }
+ },
+
+ // Returns undefined if the key is the wrong length or format.
+ _keyToBase64(aKeyString) {
+ if (!aKeyString)
+ return undefined;
+
+ let base64key;
+ if (aKeyString.length == 52) {
+ // The key is probably base32-encoded. Attempt to decode.
+ // Although base32 specifies uppercase letters, we accept lowercase
+ // as well because users may type in lowercase or copy a key out of
+ // a tor onion-auth file (which uses lowercase).
+ let rawKey;
+ try {
+ rawKey = CommonUtils.decodeBase32(aKeyString.toUpperCase());
+ } catch (e) {}
+
+ if (rawKey) try {
+ base64key = btoa(rawKey);
+ } catch (e) {}
+ } else if ((aKeyString.length == 44) &&
+ /^[a-zA-Z0-9+/]*=*$/.test(aKeyString)) {
+ // The key appears to be a correctly formatted base64 value. If not,
+ // tor will return an error when we try to add the key via the
+ // control port.
+ base64key = aKeyString;
+ }
+
+ return base64key;
+ },
+ };
+
+ let retval = {
+ init() {
+ Services.obs.addObserver(this, OnionAuthUtil.topic.clientAuthMissing);
+ Services.obs.addObserver(this, OnionAuthUtil.topic.clientAuthIncorrect);
+ },
+
+ uninit() {
+ Services.obs.removeObserver(this, OnionAuthUtil.topic.clientAuthMissing);
+ Services.obs.removeObserver(this, OnionAuthUtil.topic.clientAuthIncorrect);
+ },
+
+ // aSubject is the DOM Window or browser where the prompt should be shown.
+ // aData contains the .onion name.
+ observe(aSubject, aTopic, aData) {
+ if ((aTopic != OnionAuthUtil.topic.clientAuthMissing) &&
+ (aTopic != OnionAuthUtil.topic.clientAuthIncorrect)) {
+ return;
+ }
+
+ let browser;
+ if (aSubject instanceof Ci.nsIDOMWindow) {
+ let contentWindow = aSubject.QueryInterface(Ci.nsIDOMWindow);
+ browser = contentWindow.docShell.chromeEventHandler;
+ } else {
+ browser = aSubject.QueryInterface(Ci.nsIBrowser);
+ }
+
+ if (!gBrowser.browsers.some(aBrowser => aBrowser == browser)) {
+ return; // This window does not contain the subject browser; ignore.
+ }
+
+ let failedURI = browser.currentURI;
+ let authPrompt = new OnionServicesAuthPrompt(browser, failedURI,
+ aTopic, aData);
+ authPrompt.show(undefined);
+ }
+ };
+
+ return retval;
+})(); /* OnionAuthPrompt */
+
+
+Object.defineProperty(this, "OnionAuthPrompt", {
+ value: OnionAuthPrompt,
+ enumerable: true,
+ writable: false
+});
diff --git a/browser/components/onionservices/content/authUtil.jsm b/browser/components/onionservices/content/authUtil.jsm
new file mode 100644
index 000000000000..c9d83774da1f
--- /dev/null
+++ b/browser/components/onionservices/content/authUtil.jsm
@@ -0,0 +1,47 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+
+"use strict";
+
+var EXPORTED_SYMBOLS = [
+ "OnionAuthUtil",
+];
+
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+const OnionAuthUtil = {
+ topic: {
+ clientAuthMissing: "tor-onion-services-clientauth-missing",
+ clientAuthIncorrect: "tor-onion-services-clientauth-incorrect",
+ },
+ message: {
+ authPromptCanceled: "Tor:OnionServicesAuthPromptCanceled",
+ },
+ domid: {
+ anchor: "tor-clientauth-notification-icon",
+ notification: "tor-clientauth",
+ description: "tor-clientauth-notification-desc",
+ learnMore: "tor-clientauth-notification-learnmore",
+ onionNameSpan: "tor-clientauth-notification-onionname",
+ keyElement: "tor-clientauth-notification-key",
+ warningElement: "tor-clientauth-warning",
+ checkboxElement: "tor-clientauth-persistkey-checkbox",
+ },
+
+ addCancelMessageListener(aTabContent, aDocShell) {
+ aTabContent.addMessageListener(this.message.authPromptCanceled,
+ (aMessage) => {
+ // Upon cancellation of the client authentication prompt, display
+ // the appropriate error page. When calling the docShell
+ // displayLoadError() function, we pass undefined for the failed
+ // channel so that displayLoadError() can determine that it should
+ // not display the client authentication prompt a second time.
+ let failedURI = Services.io.newURI(aMessage.data.failedURI);
+ let reasonForPrompt = aMessage.data.reasonForPrompt;
+ let errorCode =
+ (reasonForPrompt === this.topic.clientAuthMissing) ?
+ Cr.NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH :
+ Cr.NS_ERROR_TOR_ONION_SVC_BAD_CLIENT_AUTH;
+ aDocShell.displayLoadError(errorCode, failedURI, undefined, undefined);
+ });
+ },
+};
diff --git a/browser/components/onionservices/content/netError/browser.svg b/browser/components/onionservices/content/netError/browser.svg
new file mode 100644
index 000000000000..b4c433b37bbb
--- /dev/null
+++ b/browser/components/onionservices/content/netError/browser.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="65" viewBox="0 0 72 65">
+ <path fill="context-fill" fill-opacity="context-fill-opacity" d="M0.0 0.0C0.0 0.0 0.0 65.0 0.0 65.0C0.0 65.0 72.0 65.0 72.0 65.0C72.0 65.0 72.0 0.0 72.0 0.0C72.0 0.0 52.9019692 0.0 52.9019692 0.0C52.9019692 0.0 0.0 0.0 0.0 0.0C0.0 0.0 0.0 0.0 0.0 0.0M65.0 58.0C65.0 58.0 6.0 58.0 6.0 58.0C6.0 58.0 6.0 25.0 6.0 25.0C6.0 25.0 65.0 25.0 65.0 25.0C65.0 25.0 65.0 58.0 65.0 58.0C65.0 58.0 65.0 58.0 65.0 58.0M6.0 10.0C6.0 10.0 10.0 10.0 10.0 10.0C10.0 10.0 10.0 14.0 10.0 14.0C10.0 14.0 6.0 14.0 6.0 14.0C6.0 14.0 6.0 10.0 6.0 10.0C6.0 10.0 6.0 10.0 6.0 10.0M14.0 10.0C14.0 10.0 18.0 10.0 18.0 10.0C18.0 10.0 18.0 14.0 18.0 14.0C18.0 14.0 14.0 14.0 14.0 14.0C14.0 14.0 14.0 10.0 14.0 10.0C14.0 10.0 14.0 10.0 14.0 10.0M22.0 10.0C22.0 10.0 26.0 10.0 26.0 10.0C26.0 10.0 26.0 14.0 26.0 14.0C26.0 14.0 22.0 14.0 22.0 14.0C22.0 14.0 22.0 10.0 22.0 10.0C22.0 10.0 22.0 10.0 22.0 10.0" />
+</svg>
diff --git a/browser/components/onionservices/content/netError/network.svg b/browser/components/onionservices/content/netError/network.svg
new file mode 100644
index 000000000000..808c53dedd09
--- /dev/null
+++ b/browser/components/onionservices/content/netError/network.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="54" viewBox="0 0 72 54">
+ <path fill="context-fill" fill-opacity="context-fill-opacity" d="M14.0487805 54.0C6.28990244 54.0 0.0 47.3306322 0.0 39.1034585C0.0 32.0105634 4.68716488 26.0867675 10.9481707 24.585103C10.6902 23.574652 10.5365854 22.5107596 10.5365854 21.4138156C10.5365854 14.7292347 15.6471278 9.3103384 21.9512195 9.3103384C24.8076351 9.3103384 27.4126741 10.4393194 29.4146341 12.2780088C32.1344254 5.0777841 38.77452 0.0 46.5365854 0.0C56.7201249 0.0 64.9756098 8.7536733 64.9756098 19.5517479C64.9756098 20.7691677 64.8471688 21.9453428 64.6463415 23.1013144C69.0576849 26.0679606 72.0 31.2693674 72.0 37.2413909C72.0 46.5256603 64.9510244 54.0 56.195122 54.0C56.195122 54.0 14.0487805 54.0 14.0487805 54.0C14.0487805 54.0 14.0487805 54.0 14.0487805 54.0" />
+</svg>
diff --git a/browser/components/onionservices/content/netError/onionNetError.css b/browser/components/onionservices/content/netError/onionNetError.css
new file mode 100644
index 000000000000..58117ab93223
--- /dev/null
+++ b/browser/components/onionservices/content/netError/onionNetError.css
@@ -0,0 +1,65 @@
+/* Copyright (c) 2020, The Tor Project, Inc. */
+
+:root {
+ --grey-70: #38383d;
+}
+
+#onionErrorDiagramContainer {
+ margin: 60px auto;
+ width: 460px; /* 3 columns @ 140px plus 2 column gaps @ 20px */
+ display: grid;
+ grid-row-gap: 15px;
+ grid-column-gap: 20px;
+ grid-template-columns: 1fr 1fr 1fr;
+}
+
+#onionErrorDiagramContainer > div {
+ margin: auto;
+ position: relative; /* needed to allow overlay of the ok or error icon */
+}
+
+.onionErrorImage {
+ width: 72px;
+ height: 72px;
+ background-position: center;
+ background-repeat: no-repeat;
+ -moz-context-properties: fill;
+ fill: var(--grey-70);
+}
+
+#onionErrorBrowserImage {
+ background-image: url("browser.svg");
+}
+
+#onionErrorNetworkImage {
+ background-image: url("network.svg");
+}
+
+#onionErrorOnionSiteImage {
+ background-image: url("onionsite.svg");
+}
+
+/* rules to support overlay of the ok or error icon */
+.onionErrorImage[status]::after {
+ content: " ";
+ position: absolute;
+ left: -18px;
+ top: 18px;
+ width: 36px;
+ height: 36px;
+ -moz-context-properties: fill;
+ fill: var(--in-content-page-background);
+ background-color: var(--grey-70);
+ background-repeat: no-repeat;
+ background-position: center;
+ border: 3px solid var(--in-content-page-background);
+ border-radius: 50%;
+}
+
+.onionErrorImage[status="ok"]::after {
+ background-image: url("chrome://global/skin/icons/check.svg");
+}
+
+.onionErrorImage[status="error"]::after {
+ background-image: url("chrome://browser/skin/stop.svg");
+}
diff --git a/browser/components/onionservices/content/netError/onionNetError.js b/browser/components/onionservices/content/netError/onionNetError.js
new file mode 100644
index 000000000000..8fabb3f38eb7
--- /dev/null
+++ b/browser/components/onionservices/content/netError/onionNetError.js
@@ -0,0 +1,244 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+
+"use strict";
+
+/* eslint-env mozilla/frame-script */
+
+var OnionServicesAboutNetError = {
+ _selector: {
+ header: ".title-text",
+ longDesc: "#errorLongDesc",
+ learnMoreContainer: "#learnMoreContainer",
+ learnMoreLink: "#learnMoreLink",
+ contentContainer: "#errorLongContent",
+ tryAgainButtonContainer: "#netErrorButtonContainer",
+ },
+ _status: {
+ ok: "ok",
+ error: "error",
+ },
+
+ _diagramInfoMap: undefined,
+
+ // Public functions (called from outside this file).
+ //
+ // This initPage() function may need to be updated if the structure of
+ // browser/base/content/aboutNetError.xhtml changes. Specifically, it
+ // references the following elements:
+ // query string parameter e
+ // class title-text
+ // id errorLongDesc
+ // id learnMoreContainer
+ // id learnMoreLink
+ // id errorLongContent
+ initPage(aDoc) {
+ const searchParams = new URLSearchParams(aDoc.documentURI.split("?")[1]);
+ const err = searchParams.get("e");
+
+ const errPrefix = "onionServices.";
+ const errName = err.substring(errPrefix.length);
+
+ this._strings = RPMGetTorStrings();
+
+ const stringsObj = this._strings[errName];
+ if (!stringsObj) {
+ return;
+ }
+
+ this._insertStylesheet(aDoc);
+
+ const pageTitle = stringsObj.pageTitle;
+ const header = stringsObj.header;
+ const longDescription = stringsObj.longDescription; // optional
+ const learnMoreURL = stringsObj.learnMoreURL;
+
+ if (pageTitle) {
+ aDoc.title = pageTitle;
+ }
+
+ if (header) {
+ const headerElem = aDoc.querySelector(this._selector.header);
+ if (headerElem) {
+ headerElem.textContent = header;
+ }
+ }
+
+ const ld = aDoc.querySelector(this._selector.longDesc);
+ if (ld) {
+ if (longDescription) {
+ const hexErr = this._hexErrorFromName(errName);
+ ld.textContent = longDescription.replace("%S", hexErr);
+ } else {
+ // This onion service error does not have a long description. Since
+ // it is set to a generic error string by the code in
+ // browser/base/content/aboutNetError.js, hide it here.
+ ld.style.display = "none";
+ }
+ }
+
+ if (learnMoreURL) {
+ const lmContainer = aDoc.querySelector(this._selector.learnMoreContainer);
+ if (lmContainer) {
+ lmContainer.style.display = "block";
+ }
+ const lmLink = lmContainer.querySelector(this._selector.learnMoreLink);
+ if (lmLink) {
+ lmLink.setAttribute("href", learnMoreURL);
+ }
+ }
+
+ // Remove the "Try Again" button if the user made a typo in the .onion
+ // address since it is not useful in that case.
+ if (errName === "badAddress") {
+ const tryAgainButton = aDoc.querySelector(
+ this._selector.tryAgainButtonContainer
+ );
+ if (tryAgainButton) {
+ tryAgainButton.style.display = "none";
+ }
+ }
+
+ this._insertDiagram(aDoc, errName);
+ }, // initPage()
+
+ _insertStylesheet(aDoc) {
+ const url =
+ "chrome://browser/content/onionservices/netError/onionNetError.css";
+ let linkElem = aDoc.createElement("link");
+ linkElem.rel = "stylesheet";
+ linkElem.href = url;
+ linkElem.type = "text/css";
+ aDoc.head.appendChild(linkElem);
+ },
+
+ _insertDiagram(aDoc, aErrorName) {
+ // The onion error diagram consists of a grid of div elements.
+ // The first row contains three images (Browser, Network, Onionsite) and
+ // the second row contains labels for the images that are in the first row.
+ // The _diagramInfoMap describes for each type of onion service error
+ // whether a small ok or error status icon is overlaid on top of the main
+ // Browser/Network/Onionsite images.
+ if (!this._diagramInfoMap) {
+ this._diagramInfoMap = new Map();
+ this._diagramInfoMap.set("descNotFound", {
+ browser: this._status.ok,
+ network: this._status.ok,
+ onionSite: this._status.error,
+ });
+ this._diagramInfoMap.set("descInvalid", {
+ browser: this._status.ok,
+ network: this._status.error,
+ });
+ this._diagramInfoMap.set("introFailed", {
+ browser: this._status.ok,
+ network: this._status.error,
+ });
+ this._diagramInfoMap.set("rendezvousFailed", {
+ browser: this._status.ok,
+ network: this._status.error,
+ });
+ this._diagramInfoMap.set("clientAuthMissing", {
+ browser: this._status.error,
+ });
+ this._diagramInfoMap.set("clientAuthIncorrect", {
+ browser: this._status.error,
+ });
+ this._diagramInfoMap.set("badAddress", {
+ browser: this._status.error,
+ });
+ this._diagramInfoMap.set("introTimedOut", {
+ browser: this._status.ok,
+ network: this._status.error,
+ });
+ }
+
+ const diagramInfo = this._diagramInfoMap.get(aErrorName);
+
+ const container = this._createDiv(aDoc, "onionErrorDiagramContainer");
+ const imageClass = "onionErrorImage";
+
+ const browserImage = this._createDiv(
+ aDoc,
+ "onionErrorBrowserImage",
+ imageClass,
+ container
+ );
+ if (diagramInfo && diagramInfo.browser) {
+ browserImage.setAttribute("status", diagramInfo.browser);
+ }
+
+ const networkImage = this._createDiv(
+ aDoc,
+ "onionErrorNetworkImage",
+ imageClass,
+ container
+ );
+ if (diagramInfo && diagramInfo.network) {
+ networkImage.setAttribute("status", diagramInfo.network);
+ }
+
+ const onionSiteImage = this._createDiv(
+ aDoc,
+ "onionErrorOnionSiteImage",
+ imageClass,
+ container
+ );
+ if (diagramInfo && diagramInfo.onionSite) {
+ onionSiteImage.setAttribute("status", diagramInfo.onionSite);
+ }
+
+ let labelDiv = this._createDiv(aDoc, undefined, undefined, container);
+ labelDiv.textContent = this._strings.errorPage.browser;
+ labelDiv = this._createDiv(aDoc, undefined, undefined, container);
+ labelDiv.textContent = this._strings.errorPage.network;
+ labelDiv = this._createDiv(aDoc, undefined, undefined, container);
+ labelDiv.textContent = this._strings.errorPage.onionSite;
+
+ const contentContainer = aDoc.querySelector(
+ this._selector.contentContainer
+ );
+ if (contentContainer) {
+ contentContainer.insertBefore(container, contentContainer.firstChild);
+ }
+ }, // _insertDiagram()
+
+ _createDiv(aDoc, aID, aClass, aParentElem) {
+ const div = aDoc.createElement("div");
+ if (aID) {
+ div.id = aID;
+ }
+ if (aClass) {
+ div.setAttribute("class", aClass);
+ }
+ if (aParentElem) {
+ aParentElem.appendChild(div);
+ }
+
+ return div;
+ },
+
+ _hexErrorFromName(aErrorName) {
+ // We do not have access to the original Tor SOCKS error code here, so
+ // perform a reverse mapping from the error name.
+ switch (aErrorName) {
+ case "descNotFound":
+ return "0xF0";
+ case "descInvalid":
+ return "0xF1";
+ case "introFailed":
+ return "0xF2";
+ case "rendezvousFailed":
+ return "0xF3";
+ case "clientAuthMissing":
+ return "0xF4";
+ case "clientAuthIncorrect":
+ return "0xF5";
+ case "badAddress":
+ return "0xF6";
+ case "introTimedOut":
+ return "0xF7";
+ }
+
+ return "";
+ },
+};
diff --git a/browser/components/onionservices/content/netError/onionsite.svg b/browser/components/onionservices/content/netError/onionsite.svg
new file mode 100644
index 000000000000..1f2777e6acc7
--- /dev/null
+++ b/browser/components/onionservices/content/netError/onionsite.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="70" height="63" viewBox="0 0 70 63">
+ <g fill="context-fill" fill-opacity="context-fill-opacity">
+ <path d="M64.0 2.0C64.0 2.0 4.0 2.0 4.0 2.0C2.8954305 2.0 2.0 2.81148389 2.0 3.8125C2.0 3.8125 2.0 58.1875 2.0 58.1875C2.0 59.1885161 2.8954305 60.0 4.0 60.0C4.0 60.0 36.0 60.0 36.0 60.0C36.0 60.0 36.0 56.375 36.0 56.375C36.0 56.375 6.0 56.375 6.0 56.375C6.0 56.375 6.0 41.875 6.0 41.875C6.0 41.875 38.0 41.875 38.0 41.875C38.0 41.875 38.0 38.25 38.0 38.25C38.0 38.25 6.0 38.25 6.0 38.25C6.0 38.25 6.0 23.75 6.0 23.75C6.0 23.75 62.0 23.75 62.0 23.75C62.0 23.75 62.0 36.4375 62.0 36.4375C62.0 36.4375 66.0 36.4375 66.0 36.4375C66.0 36.4375 66.0 3.8125 66.0 3.8125C66.0 2.81148389 65.1045695 2.0 64.0 2.0C64.0 2.0 64.0 2.0 64.0 2.0M62.0 20.125C62.0 20.125 6.0 20.125 6.0 20.125C6.0 20.125 6.0 5.625 6.0 5.625C6.0 5.625 62.0 5.625 62.0 5.625C62.0 5.625 62.0 20.125 62.0 20.125C62.0 20.125 62.0 20.125 62.0 20.125" />
+ <path d="M24.0 47.0C24.0 47.0 24.0 51.0 24.0 51.0C24.0 51.0 20.0 51.0 20.0 51.0C20.0 51.0 20.0 47.0 20.0 47.0C20.0 47.0 24.0 47.0 24.0 47.0C24.0 47.0 24.0 47.0 24.0 47.0M16.0 47.0C16.0 47.0 16.0 51.0 16.0 51.0C16.0 51.0 12.0 51.0 12.0 51.0C12.0 51.0 12.0 47.0 12.0 47.0C12.0 47.0 16.0 47.0 16.0 47.0C16.0 47.0 16.0 47.0 16.0 47.0M56.0 29.0C56.0 29.0 56.0 33.0 56.0 33.0C56.0 33.0 52.0 33.0 52.0 33.0C52.0 33.0 52.0 29.0 52.0 29.0C52.0 29.0 56.0 29.0 56.0 29.0C56.0 29.0 56.0 29.0 56.0 29.0M48.0 29.0C48.0 29.0 48.0 33.0 48.0 33.0C48.0 33.0 12.0 33.0 12.0 33.0C12.0 33.0 12.0 29.0 12.0 29.0C12.0 29.0 48.0 29.0 48.0 29.0C48.0 29.0 48.0 29.0 48.0 29.0M22.0 11.0C22.0 11.0 22.0 15.0 22.0 15.0C22.0 15.0 10.0 15.0 10.0 15.0C10.0 15.0 10.0 11.0 10.0 11.0C10.0 11.0 22.0 11.0 22.0 11.0C22.0 11.0 22.0 11.0 22.0 11.0M70.0 0.0C70.0 0.0 70.0 36.5 70.0 36.5C70.0 36.5 65.0 36.5 65.0 36.5C65.0 36.5 65.0 4.5 65.0 4.5C65.0 4.5 5.0 4.5 5.0 4.5C5.0 4.5 5.0 58.5 5.0 58.5C5.0 58.5 36.0 58.5 36.0 58.5C36.0 58
.5 36.0 63.0 36.0 63.0C36.0 63.0 0.0 63.0 0.0 63.0C0.0 63.0 0.0 0.0 0.0 0.0C0.0 0.0 70.0 0.0 70.0 0.0C70.0 0.0 70.0 0.0 70.0 0.0M32.0 47.0C32.0 47.0 32.0 51.0 32.0 51.0C32.0 51.0 28.0 51.0 28.0 51.0C28.0 51.0 28.0 47.0 28.0 47.0C28.0 47.0 32.0 47.0 32.0 47.0C32.0 47.0 32.0 47.0 32.0 47.0M54.0 11.0C54.0 11.0 54.0 15.0 54.0 15.0C54.0 15.0 50.0 15.0 50.0 15.0C50.0 15.0 50.0 11.0 50.0 11.0C50.0 11.0 54.0 11.0 54.0 11.0C54.0 11.0 54.0 11.0 54.0 11.0M46.0 11.0C46.0 11.0 46.0 15.0 46.0 15.0C46.0 15.0 42.0 15.0 42.0 15.0C42.0 15.0 42.0 11.0 42.0 11.0C42.0 11.0 46.0 11.0 46.0 11.0C46.0 11.0 46.0 11.0 46.0 11.0M38.0 11.0C38.0 11.0 38.0 15.0 38.0 15.0C38.0 15.0 34.0 15.0 34.0 15.0C34.0 15.0 34.0 11.0 34.0 11.0C34.0 11.0 38.0 11.0 38.0 11.0C38.0 11.0 38.0 11.0 38.0 11.0M30.0 11.0C30.0 11.0 30.0 15.0 30.0 15.0C30.0 15.0 26.0 15.0 26.0 15.0C26.0 15.0 26.0 11.0 26.0 11.0C26.0 11.0 30.0 11.0 30.0 11.0C30.0 11.0 30.0 11.0 30.0 11.0" />
+ <path d="M61.0 46.0C61.0 46.0 59.0 46.0 59.0 46.0C59.0 46.0 59.0 40.0 59.0 40.0C59.0 38.8954305 58.1045695 38.0 57.0 38.0C57.0 38.0 49.0 38.0 49.0 38.0C47.8954305 38.0 47.0 38.8954305 47.0 40.0C47.0 40.0 47.0 46.0 47.0 46.0C47.0 46.0 45.0 46.0 45.0 46.0C43.8954305 46.0 43.0 46.8954305 43.0 48.0C43.0 48.0 43.0 60.0 43.0 60.0C43.0 61.1045695 43.8954305 62.0 45.0 62.0C45.0 62.0 61.0 62.0 61.0 62.0C62.1045695 62.0 63.0 61.1045695 63.0 60.0C63.0 60.0 63.0 48.0 63.0 48.0C63.0 46.8954305 62.1045695 46.0 61.0 46.0C61.0 46.0 61.0 46.0 61.0 46.0M51.0 42.0C51.0 42.0 55.0 42.0 55.0 42.0C55.0 42.0 55.0 46.0 55.0 46.0C55.0 46.0 51.0 46.0 51.0 46.0C51.0 46.0 51.0 42.0 51.0 42.0C51.0 42.0 51.0 42.0 51.0 42.0M59.0 58.0C59.0 58.0 47.0 58.0 47.0 58.0C47.0 58.0 47.0 50.0 47.0 50.0C47.0 50.0 59.0 50.0 59.0 50.0C59.0 50.0 59.0 58.0 59.0 58.0C59.0 58.0 59.0 58.0 59.0 58.0" />
+ </g>
+</svg>
diff --git a/browser/components/onionservices/content/onionservices.css b/browser/components/onionservices/content/onionservices.css
new file mode 100644
index 000000000000..e2621ec8266d
--- /dev/null
+++ b/browser/components/onionservices/content/onionservices.css
@@ -0,0 +1,69 @@
+/* Copyright (c) 2020, The Tor Project, Inc. */
+
+@namespace html url("http://www.w3.org/1999/xhtml");
+
+html|*#tor-clientauth-notification-onionname {
+ font-weight: bold;
+}
+
+html|*#tor-clientauth-notification-key {
+ box-sizing: border-box;
+ width: 100%;
+ margin-top: 15px;
+ padding: 6px;
+}
+
+/* Start of rules adapted from
+ * browser/components/newtab/css/activity-stream-mac.css (linux and windows
+ * use the same rules).
+ */
+html|*#tor-clientauth-notification-key.invalid {
+ border: 1px solid #D70022;
+ box-shadow: 0 0 0 1px #D70022, 0 0 0 4px rgba(215, 0, 34, 0.3);
+}
+
+html|*#tor-clientauth-warning {
+ display: inline-block;
+ animation: fade-up-tt 450ms;
+ background: #D70022;
+ border-radius: 2px;
+ color: #FFF;
+ inset-inline-start: 3px;
+ padding: 5px 12px;
+ position: relative;
+ top: 6px;
+ z-index: 1;
+}
+
+html|*#tor-clientauth-warning[hidden] {
+ display: none;
+}
+
+html|*#tor-clientauth-warning::before {
+ background: #D70022;
+ bottom: -8px;
+ content: '.';
+ height: 16px;
+ inset-inline-start: 12px;
+ position: absolute;
+ text-indent: -999px;
+ top: -7px;
+ transform: rotate(45deg);
+ white-space: nowrap;
+ width: 16px;
+ z-index: -1;
+}
+
+@keyframes fade-up-tt {
+ 0% {
+ opacity: 0;
+ transform: translateY(15px);
+ }
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+/* End of rules adapted from
+ * browser/components/newtab/css/activity-stream-mac.css
+ */
diff --git a/browser/components/onionservices/content/savedKeysDialog.js b/browser/components/onionservices/content/savedKeysDialog.js
new file mode 100644
index 000000000000..b1376bbabe85
--- /dev/null
+++ b/browser/components/onionservices/content/savedKeysDialog.js
@@ -0,0 +1,259 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+
+"use strict";
+
+ChromeUtils.defineModuleGetter(
+ this,
+ "TorStrings",
+ "resource:///modules/TorStrings.jsm"
+);
+
+ChromeUtils.defineModuleGetter(
+ this,
+ "controller",
+ "resource://torbutton/modules/tor-control-port.js"
+);
+
+var gOnionServicesSavedKeysDialog = {
+ selector: {
+ dialog: "#onionservices-savedkeys-dialog",
+ intro: "#onionservices-savedkeys-intro",
+ tree: "#onionservices-savedkeys-tree",
+ onionSiteCol: "#onionservices-savedkeys-siteCol",
+ onionKeyCol: "#onionservices-savedkeys-keyCol",
+ errorIcon: "#onionservices-savedkeys-errorIcon",
+ errorMessage: "#onionservices-savedkeys-errorMessage",
+ removeButton: "#onionservices-savedkeys-remove",
+ removeAllButton: "#onionservices-savedkeys-removeall",
+ },
+
+ _tree: undefined,
+ _isBusy: false, // true when loading data, deleting a key, etc.
+
+ // Public functions (called from outside this file).
+ async deleteSelectedKeys() {
+ this._setBusyState(true);
+
+ const indexesToDelete = [];
+ const count = this._tree.view.selection.getRangeCount();
+ for (let i = 0; i < count; ++i) {
+ const minObj = {};
+ const maxObj = {};
+ this._tree.view.selection.getRangeAt(i, minObj, maxObj);
+ for (let idx = minObj.value; idx <= maxObj.value; ++idx) {
+ indexesToDelete.push(idx);
+ }
+ }
+
+ if (indexesToDelete.length > 0) {
+ const controllerFailureMsg =
+ TorStrings.onionServices.authPreferences.failedToRemoveKey;
+ try {
+ const torController = controller(aError => {
+ this._showError(controllerFailureMsg);
+ });
+
+ // Remove in reverse index order to avoid issues caused by index changes.
+ for (let i = indexesToDelete.length - 1; i >= 0; --i) {
+ await this._deleteOneKey(torController, indexesToDelete[i]);
+ }
+ } catch (e) {
+ if (e.torMessage) {
+ this._showError(e.torMessage);
+ } else {
+ this._showError(controllerFailureMsg);
+ }
+ }
+ }
+
+ this._setBusyState(false);
+ },
+
+ async deleteAllKeys() {
+ this._tree.view.selection.selectAll();
+ await this.deleteSelectedKeys();
+ },
+
+ updateButtonsState() {
+ const haveSelection = this._tree.view.selection.getRangeCount() > 0;
+ const dialog = document.querySelector(this.selector.dialog);
+ const removeSelectedBtn = dialog.querySelector(this.selector.removeButton);
+ removeSelectedBtn.disabled = this._isBusy || !haveSelection;
+ const removeAllBtn = dialog.querySelector(this.selector.removeAllButton);
+ removeAllBtn.disabled = this._isBusy || this.rowCount === 0;
+ },
+
+ // Private functions.
+ _onLoad() {
+ document.mozSubdialogReady = this._init();
+ },
+
+ async _init() {
+ await this._populateXUL();
+
+ window.addEventListener("keypress", this._onWindowKeyPress.bind(this));
+
+ // We don't use await here because we want _loadSavedKeys() to run
+ // in the background and not block loading of this dialog.
+ this._loadSavedKeys();
+ },
+
+ async _populateXUL() {
+ const dialog = document.querySelector(this.selector.dialog);
+ const authPrefStrings = TorStrings.onionServices.authPreferences;
+ dialog.setAttribute("title", authPrefStrings.dialogTitle);
+
+ let elem = dialog.querySelector(this.selector.intro);
+ elem.textContent = authPrefStrings.dialogIntro;
+
+ elem = dialog.querySelector(this.selector.onionSiteCol);
+ elem.setAttribute("label", authPrefStrings.onionSite);
+
+ elem = dialog.querySelector(this.selector.onionKeyCol);
+ elem.setAttribute("label", authPrefStrings.onionKey);
+
+ elem = dialog.querySelector(this.selector.removeButton);
+ elem.setAttribute("label", authPrefStrings.remove);
+
+ elem = dialog.querySelector(this.selector.removeAllButton);
+ elem.setAttribute("label", authPrefStrings.removeAll);
+
+ this._tree = dialog.querySelector(this.selector.tree);
+ },
+
+ async _loadSavedKeys() {
+ const controllerFailureMsg =
+ TorStrings.onionServices.authPreferences.failedToGetKeys;
+ this._setBusyState(true);
+
+ try {
+ this._tree.view = this;
+
+ const torController = controller(aError => {
+ this._showError(controllerFailureMsg);
+ });
+
+ const keyInfoList = await torController.onionAuthViewKeys();
+ if (keyInfoList) {
+ // Filter out temporary keys.
+ this._keyInfoList = keyInfoList.filter(aKeyInfo => {
+ if (!aKeyInfo.Flags) {
+ return false;
+ }
+
+ const flags = aKeyInfo.Flags.split(",");
+ return flags.includes("Permanent");
+ });
+
+ // Sort by the .onion address.
+ this._keyInfoList.sort((aObj1, aObj2) => {
+ const hsAddr1 = aObj1.hsAddress.toLowerCase();
+ const hsAddr2 = aObj2.hsAddress.toLowerCase();
+ if (hsAddr1 < hsAddr2) {
+ return -1;
+ }
+ return hsAddr1 > hsAddr2 ? 1 : 0;
+ });
+ }
+
+ // Render the tree content.
+ this._tree.rowCountChanged(0, this.rowCount);
+ } catch (e) {
+ if (e.torMessage) {
+ this._showError(e.torMessage);
+ } else {
+ this._showError(controllerFailureMsg);
+ }
+ }
+
+ this._setBusyState(false);
+ },
+
+ // This method may throw; callers should catch errors.
+ async _deleteOneKey(aTorController, aIndex) {
+ const keyInfoObj = this._keyInfoList[aIndex];
+ await aTorController.onionAuthRemove(keyInfoObj.hsAddress);
+ this._tree.view.selection.clearRange(aIndex, aIndex);
+ this._keyInfoList.splice(aIndex, 1);
+ this._tree.rowCountChanged(aIndex + 1, -1);
+ },
+
+ _setBusyState(aIsBusy) {
+ this._isBusy = aIsBusy;
+ this.updateButtonsState();
+ },
+
+ _onWindowKeyPress(event) {
+ if (event.keyCode === KeyEvent.DOM_VK_ESCAPE) {
+ window.close();
+ } else if (event.keyCode === KeyEvent.DOM_VK_DELETE) {
+ this.deleteSelectedKeys();
+ }
+ },
+
+ _showError(aMessage) {
+ const dialog = document.querySelector(this.selector.dialog);
+ const errorIcon = dialog.querySelector(this.selector.errorIcon);
+ errorIcon.style.visibility = aMessage ? "visible" : "hidden";
+ const errorDesc = dialog.querySelector(this.selector.errorMessage);
+ errorDesc.textContent = aMessage ? aMessage : "";
+ },
+
+ // XUL tree widget view implementation.
+ get rowCount() {
+ return this._keyInfoList ? this._keyInfoList.length : 0;
+ },
+
+ getCellText(aRow, aCol) {
+ let val = "";
+ if (this._keyInfoList && aRow < this._keyInfoList.length) {
+ const keyInfo = this._keyInfoList[aRow];
+ if (aCol.id.endsWith("-siteCol")) {
+ val = keyInfo.hsAddress;
+ } else if (aCol.id.endsWith("-keyCol")) {
+ val = keyInfo.typeAndKey;
+ // Omit keyType because it is always "x25519".
+ const idx = val.indexOf(":");
+ if (idx > 0) {
+ val = val.substring(idx + 1);
+ }
+ }
+ }
+
+ return val;
+ },
+
+ isSeparator(index) {
+ return false;
+ },
+
+ isSorted() {
+ return false;
+ },
+
+ isContainer(index) {
+ return false;
+ },
+
+ setTree(tree) {},
+
+ getImageSrc(row, column) {},
+
+ getCellValue(row, column) {},
+
+ cycleHeader(column) {},
+
+ getRowProperties(row) {
+ return "";
+ },
+
+ getColumnProperties(column) {
+ return "";
+ },
+
+ getCellProperties(row, column) {
+ return "";
+ },
+};
+
+window.addEventListener("load", () => gOnionServicesSavedKeysDialog._onLoad());
diff --git a/browser/components/onionservices/content/savedKeysDialog.xhtml b/browser/components/onionservices/content/savedKeysDialog.xhtml
new file mode 100644
index 000000000000..3db9bb05ea82
--- /dev/null
+++ b/browser/components/onionservices/content/savedKeysDialog.xhtml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- Copyright (c) 2020, The Tor Project, Inc. -->
+
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/onionservices/authPreferences.css" type="text/css"?>
+
+<window id="onionservices-savedkeys-dialog"
+ windowtype="OnionServices:SavedKeys"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ style="width: 45em;">
+
+ <script src="chrome://browser/content/onionservices/savedKeysDialog.js"/>
+
+ <vbox id="onionservices-savedkeys" class="contentPane" flex="1">
+ <label id="onionservices-savedkeys-intro"
+ control="onionservices-savedkeys-tree"/>
+ <separator class="thin"/>
+ <tree id="onionservices-savedkeys-tree" flex="1" hidecolumnpicker="true"
+ width="750"
+ style="height: 20em;"
+ onselect="gOnionServicesSavedKeysDialog.updateButtonsState();">
+ <treecols>
+ <treecol id="onionservices-savedkeys-siteCol" flex="1" persist="width"/>
+ <splitter class="tree-splitter"/>
+ <treecol id="onionservices-savedkeys-keyCol" flex="1" persist="width"/>
+ </treecols>
+ <treechildren/>
+ </tree>
+ <hbox id="onionservices-savedkeys-errorContainer" align="baseline" flex="1">
+ <image id="onionservices-savedkeys-errorIcon"/>
+ <description id="onionservices-savedkeys-errorMessage" flex="1"/>
+ </hbox>
+ <separator class="thin"/>
+ <hbox id="onionservices-savedkeys-buttons">
+ <button id="onionservices-savedkeys-remove" disabled="true"
+ oncommand="gOnionServicesSavedKeysDialog.deleteSelectedKeys();"/>
+ <button id="onionservices-savedkeys-removeall"
+ oncommand="gOnionServicesSavedKeysDialog.deleteAllKeys();"/>
+ </hbox>
+ </vbox>
+</window>
diff --git a/browser/components/onionservices/jar.mn b/browser/components/onionservices/jar.mn
new file mode 100644
index 000000000000..9d6ce88d1841
--- /dev/null
+++ b/browser/components/onionservices/jar.mn
@@ -0,0 +1,9 @@
+browser.jar:
+ content/browser/onionservices/authPreferences.css (content/authPreferences.css)
+ content/browser/onionservices/authPreferences.js (content/authPreferences.js)
+ content/browser/onionservices/authPrompt.js (content/authPrompt.js)
+ content/browser/onionservices/authUtil.jsm (content/authUtil.jsm)
+ content/browser/onionservices/netError/ (content/netError/*)
+ content/browser/onionservices/onionservices.css (content/onionservices.css)
+ content/browser/onionservices/savedKeysDialog.js (content/savedKeysDialog.js)
+ content/browser/onionservices/savedKeysDialog.xhtml (content/savedKeysDialog.xhtml)
diff --git a/browser/components/onionservices/moz.build b/browser/components/onionservices/moz.build
new file mode 100644
index 000000000000..7e103239c8d6
--- /dev/null
+++ b/browser/components/onionservices/moz.build
@@ -0,0 +1 @@
+JAR_MANIFESTS += ['jar.mn']
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index 2a99400bfb70..b09808e83c45 100644
--- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -12,6 +12,7 @@
<?xml-stylesheet href="chrome://browser/skin/preferences/search.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/containers.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?>
+<?xml-stylesheet href="chrome://browser/content/onionservices/authPreferences.css"?>
<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPreferences.css"?>
<?xml-stylesheet href="chrome://browser/content/torpreferences/torPreferences.css"?>
diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml
index f36145ea80d4..eb7587afa0e1 100644
--- a/browser/components/preferences/privacy.inc.xhtml
+++ b/browser/components/preferences/privacy.inc.xhtml
@@ -477,6 +477,8 @@
<label id="fips-desc" hidden="true" data-l10n-id="forms-master-pw-fips-desc"></label>
</groupbox>
+#include ../onionservices/content/authPreferences.inc.xhtml
+
<!-- The form autofill section is inserted in to this box
after the form autofill extension has initialized. -->
<groupbox id="formAutofillGroupBox"
diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js
index 35e1fda9f96b..41dda96a14de 100644
--- a/browser/components/preferences/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -77,6 +77,12 @@ XPCOMUtils.defineLazyGetter(this, "AlertsServiceDND", function() {
}
});
+XPCOMUtils.defineLazyScriptGetter(
+ this,
+ ["OnionServicesAuthPreferences"],
+ "chrome://browser/content/onionservices/authPreferences.js"
+);
+
// TODO: module import via ChromeUtils.defineModuleGetter
XPCOMUtils.defineLazyScriptGetter(
this,
@@ -434,6 +440,7 @@ var gPrivacyPane = {
this.trackingProtectionReadPrefs();
this.networkCookieBehaviorReadPrefs();
this._initTrackingProtectionExtensionControl();
+ OnionServicesAuthPreferences.init();
this._initSecurityLevel();
Services.telemetry.setEventRecordingEnabled("pwmgr", true);
diff --git a/browser/themes/shared/notification-icons.inc.css b/browser/themes/shared/notification-icons.inc.css
index f17ddae9dc79..979ae9482244 100644
--- a/browser/themes/shared/notification-icons.inc.css
+++ b/browser/themes/shared/notification-icons.inc.css
@@ -117,6 +117,9 @@
list-style-image: url(chrome://browser/skin/notification-icons/indexedDB.svg);
}
+/* Reuse Firefox's login (key) icon for the Tor onion services auth. prompt */
+.popup-notification-icon[popupid="tor-clientauth"],
+.tor-clientauth-icon,
.popup-notification-icon[popupid="password"],
.login-icon {
list-style-image: url(chrome://browser/skin/login.svg);
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 7cb0037df180..0b2be1547b77 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -3536,6 +3536,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
}
} else {
// Errors requiring simple formatting
+ bool isOnionAuthError = false;
switch (aError) {
case NS_ERROR_MALFORMED_URI:
// URI is malformed
@@ -3618,10 +3619,44 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
// HTTP/2 or HTTP/3 stack detected a protocol error
error = "networkProtocolError";
break;
-
+ case NS_ERROR_TOR_ONION_SVC_NOT_FOUND:
+ error = "onionServices.descNotFound";
+ break;
+ case NS_ERROR_TOR_ONION_SVC_IS_INVALID:
+ error = "onionServices.descInvalid";
+ break;
+ case NS_ERROR_TOR_ONION_SVC_INTRO_FAILED:
+ error = "onionServices.introFailed";
+ break;
+ case NS_ERROR_TOR_ONION_SVC_REND_FAILED:
+ error = "onionServices.rendezvousFailed";
+ break;
+ case NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH:
+ error = "onionServices.clientAuthMissing";
+ isOnionAuthError = true;
+ break;
+ case NS_ERROR_TOR_ONION_SVC_BAD_CLIENT_AUTH:
+ error = "onionServices.clientAuthIncorrect";
+ isOnionAuthError = true;
+ break;
+ case NS_ERROR_TOR_ONION_SVC_BAD_ADDRESS:
+ error = "onionServices.badAddress";
+ break;
+ case NS_ERROR_TOR_ONION_SVC_INTRO_TIMEDOUT:
+ error = "onionServices.introTimedOut";
+ break;
default:
break;
}
+
+ // The presence of aFailedChannel indicates that we arrived here due to a
+ // failed connection attempt. Note that we will arrive here a second time
+ // if the user cancels the Tor client auth prompt, but in that case we
+ // will not have a failed channel and therefore we will not prompt again.
+ if (isOnionAuthError && aFailedChannel) {
+ // Display about:blank while the Tor client auth prompt is open.
+ errorPage.AssignLiteral("blank");
+ }
}
// If the HTTPS-Only Mode upgraded this request and the upgrade might have
@@ -3710,6 +3745,20 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
nsAutoString str;
rv =
stringBundle->FormatStringFromName(errorDescriptionID, formatStrs, str);
+ if (NS_FAILED(rv)) {
+ // As a fallback, check torbutton.properties for the error string.
+ const char bundleURL[] = "chrome://torbutton/locale/torbutton.properties";
+ nsCOMPtr<nsIStringBundleService> stringBundleService =
+ mozilla::services::GetStringBundleService();
+ if (stringBundleService) {
+ nsCOMPtr<nsIStringBundle> tbStringBundle;
+ if (NS_SUCCEEDED(stringBundleService->CreateBundle(
+ bundleURL, getter_AddRefs(tbStringBundle)))) {
+ rv = tbStringBundle->FormatStringFromName(errorDescriptionID,
+ formatStrs, str);
+ }
+ }
+ }
NS_ENSURE_SUCCESS(rv, rv);
messageStr.Assign(str);
}
@@ -6189,6 +6238,7 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
aStatus == NS_ERROR_NET_INADEQUATE_SECURITY ||
aStatus == NS_ERROR_NET_HTTP2_SENT_GOAWAY ||
aStatus == NS_ERROR_NET_HTTP3_PROTOCOL_ERROR ||
+ NS_ERROR_GET_MODULE(aStatus) == NS_ERROR_MODULE_TOR ||
NS_ERROR_GET_MODULE(aStatus) == NS_ERROR_MODULE_SECURITY) {
// Errors to be shown for any frame
DisplayLoadError(aStatus, url, nullptr, aChannel);
@@ -7753,6 +7803,35 @@ nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
FireOnLocationChange(this, aRequest, mCurrentURI, locationFlags);
}
+ // Arrange to show a Tor onion service client authentication prompt if
+ // appropriate.
+ if ((mLoadType == LOAD_ERROR_PAGE) && failedChannel) {
+ nsresult status = NS_OK;
+ if (NS_SUCCEEDED(failedChannel->GetStatus(&status)) &&
+ ((status == NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH) ||
+ (status == NS_ERROR_TOR_ONION_SVC_BAD_CLIENT_AUTH))) {
+ nsAutoCString onionHost;
+ failedURI->GetHost(onionHost);
+ const char* topic = (status == NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH)
+ ? "tor-onion-services-clientauth-missing"
+ : "tor-onion-services-clientauth-incorrect";
+ if (XRE_IsContentProcess()) {
+ nsCOMPtr<nsIBrowserChild> browserChild = GetBrowserChild();
+ if (browserChild) {
+ static_cast<BrowserChild*>(browserChild.get())
+ ->SendShowOnionServicesAuthPrompt(onionHost, nsCString(topic));
+ }
+ } else {
+ nsCOMPtr<nsPIDOMWindowOuter> browserWin = GetWindow();
+ nsCOMPtr<nsIObserverService> obsSvc = services::GetObserverService();
+ if (browserWin && obsSvc) {
+ obsSvc->NotifyObservers(browserWin, topic,
+ NS_ConvertUTF8toUTF16(onionHost).get());
+ }
+ }
+ }
+ }
+
return NS_OK;
}
diff --git a/dom/ipc/BrowserParent.cpp b/dom/ipc/BrowserParent.cpp
index dfd15c1fd17b..7749792cafb4 100644
--- a/dom/ipc/BrowserParent.cpp
+++ b/dom/ipc/BrowserParent.cpp
@@ -3941,6 +3941,27 @@ mozilla::ipc::IPCResult BrowserParent::RecvShowCanvasPermissionPrompt(
return IPC_OK();
}
+mozilla::ipc::IPCResult BrowserParent::RecvShowOnionServicesAuthPrompt(
+ const nsCString& aOnionName, const nsCString& aTopic) {
+ nsCOMPtr<nsIBrowser> browser =
+ mFrameElement ? mFrameElement->AsBrowser() : nullptr;
+ if (!browser) {
+ // If the tab is being closed, the browser may not be available.
+ // In this case we can ignore the request.
+ return IPC_OK();
+ }
+ nsCOMPtr<nsIObserverService> os = services::GetObserverService();
+ if (!os) {
+ return IPC_FAIL_NO_REASON(this);
+ }
+ nsresult rv = os->NotifyObservers(browser, aTopic.get(),
+ NS_ConvertUTF8toUTF16(aOnionName).get());
+ if (NS_FAILED(rv)) {
+ return IPC_FAIL_NO_REASON(this);
+ }
+ return IPC_OK();
+}
+
mozilla::ipc::IPCResult BrowserParent::RecvVisitURI(nsIURI* aURI,
nsIURI* aLastVisitedURI,
const uint32_t& aFlags) {
diff --git a/dom/ipc/BrowserParent.h b/dom/ipc/BrowserParent.h
index 66509194edba..816945504b6c 100644
--- a/dom/ipc/BrowserParent.h
+++ b/dom/ipc/BrowserParent.h
@@ -763,6 +763,9 @@ class BrowserParent final : public PBrowserParent,
mozilla::ipc::IPCResult RecvShowCanvasPermissionPrompt(
const nsCString& aOrigin, const bool& aHideDoorHanger);
+ mozilla::ipc::IPCResult RecvShowOnionServicesAuthPrompt(
+ const nsCString& aOnionName, const nsCString& aTopic);
+
mozilla::ipc::IPCResult RecvSetSystemFont(const nsCString& aFontName);
mozilla::ipc::IPCResult RecvGetSystemFont(nsCString* aFontName);
diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl
index ed31b32a4eb2..f36e2c6db353 100644
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -592,6 +592,15 @@ parent:
bool aNeedCollectSHistory, uint32_t aFlushId,
bool aIsFinal, uint32_t aEpoch);
+ /**
+ * This function is used to notify the parent that it should display a
+ * onion services client authentication prompt.
+ *
+ * @param aOnionHost The hostname of the .onion that needs authentication.
+ * @param aTopic The reason for the prompt.
+ */
+ async ShowOnionServicesAuthPrompt(nsCString aOnionHost, nsCString aTopic);
+
child:
async NativeSynthesisResponse(uint64_t aObserverId, nsCString aResponse);
async FlushTabState(uint32_t aFlushId, bool aIsFinal);
diff --git a/js/xpconnect/src/xpc.msg b/js/xpconnect/src/xpc.msg
index d884c6a85999..31e5e75ba35c 100644
--- a/js/xpconnect/src/xpc.msg
+++ b/js/xpconnect/src/xpc.msg
@@ -253,5 +253,15 @@ XPC_MSG_DEF(NS_ERROR_FINGERPRINTING_URI , "The URI is fingerprinti
XPC_MSG_DEF(NS_ERROR_CRYPTOMINING_URI , "The URI is cryptomining")
XPC_MSG_DEF(NS_ERROR_SOCIALTRACKING_URI , "The URI is social tracking")
+/* Codes related to Tor */
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_NOT_FOUND , "Tor onion service descriptor cannot be found")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_IS_INVALID , "Tor onion service descriptor is invalid")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_INTRO_FAILED , "Tor onion service introduction failed")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_REND_FAILED , "Tor onion service rendezvous failed")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH, "Tor onion service missing client authorization")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_BAD_CLIENT_AUTH , "Tor onion service wrong client authorization")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_BAD_ADDRESS , "Tor onion service bad address")
+XPC_MSG_DEF(NS_ERROR_TOR_ONION_SVC_INTRO_TIMEDOUT , "Tor onion service introduction timed out")
+
/* Profile manager error codes */
XPC_MSG_DEF(NS_ERROR_DATABASE_CHANGED , "Flushing the profiles to disk would have overwritten changes made elsewhere.")
diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp
index 7256280697c8..ce739e1f0de8 100644
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -215,6 +215,12 @@ nsresult ErrorAccordingToNSPR(PRErrorCode errorCode) {
default:
if (psm::IsNSSErrorCode(errorCode)) {
rv = psm::GetXPCOMFromNSSError(errorCode);
+ } else {
+ // If we received a Tor extended error code via SOCKS, pass it through.
+ nsresult res = nsresult(errorCode);
+ if (NS_ERROR_GET_MODULE(res) == NS_ERROR_MODULE_TOR) {
+ rv = res;
+ }
}
break;
diff --git a/netwerk/socket/nsSOCKSIOLayer.cpp b/netwerk/socket/nsSOCKSIOLayer.cpp
index 6f2743ed5c71..57af13a7c026 100644
--- a/netwerk/socket/nsSOCKSIOLayer.cpp
+++ b/netwerk/socket/nsSOCKSIOLayer.cpp
@@ -1004,6 +1004,55 @@ PRStatus nsSOCKSSocketInfo::ReadV5ConnectResponseTop() {
"08, Address type not supported."));
c = PR_BAD_ADDRESS_ERROR;
break;
+ case 0xF0: // Tor SOCKS5_HS_NOT_FOUND
+ LOGERROR(
+ ("socks5: connect failed: F0,"
+ " Tor onion service descriptor can not be found."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_NOT_FOUND);
+ break;
+ case 0xF1: // Tor SOCKS5_HS_IS_INVALID
+ LOGERROR(
+ ("socks5: connect failed: F1,"
+ " Tor onion service descriptor is invalid."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_IS_INVALID);
+ break;
+ case 0xF2: // Tor SOCKS5_HS_INTRO_FAILED
+ LOGERROR(
+ ("socks5: connect failed: F2,"
+ " Tor onion service introduction failed."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_INTRO_FAILED);
+ break;
+ case 0xF3: // Tor SOCKS5_HS_REND_FAILED
+ LOGERROR(
+ ("socks5: connect failed: F3,"
+ " Tor onion service rendezvous failed."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_REND_FAILED);
+ break;
+ case 0xF4: // Tor SOCKS5_HS_MISSING_CLIENT_AUTH
+ LOGERROR(
+ ("socks5: connect failed: F4,"
+ " Tor onion service missing client authorization."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH);
+ break;
+ case 0xF5: // Tor SOCKS5_HS_BAD_CLIENT_AUTH
+ LOGERROR(
+ ("socks5: connect failed: F5,"
+ " Tor onion service wrong client authorization."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_BAD_CLIENT_AUTH);
+ break;
+ case 0xF6: // Tor SOCKS5_HS_BAD_ADDRESS
+ LOGERROR(
+ ("socks5: connect failed: F6,"
+ " Tor onion service bad address."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_BAD_ADDRESS);
+ break;
+ case 0xF7: // Tor SOCKS5_HS_INTRO_TIMEDOUT
+ LOGERROR(
+ ("socks5: connect failed: F7,"
+ " Tor onion service introduction timed out."));
+ c = static_cast<uint32_t>(NS_ERROR_TOR_ONION_SVC_INTRO_TIMEDOUT);
+ break;
+
default:
LOGERROR(("socks5: connect failed."));
break;
diff --git a/toolkit/modules/PopupNotifications.jsm b/toolkit/modules/PopupNotifications.jsm
index d31f91ab00a5..6886c0b13c5d 100644
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -406,6 +406,8 @@ PopupNotifications.prototype = {
* will be dismissed instead of removed after running the callback.
* - [optional] disabled (boolean): If this is true, the button
* will be disabled.
+ * - [optional] leaveOpen (boolean): If this is true, the notification
+ * will not be removed after running the callback.
* - [optional] disableHighlight (boolean): If this is true, the button
* will not apply the default highlight style.
* If null, the notification will have a default "OK" action button
@@ -1884,6 +1886,10 @@ PopupNotifications.prototype = {
this._dismiss();
return;
}
+
+ if (action.leaveOpen) {
+ return;
+ }
}
this._remove(notification);
diff --git a/toolkit/modules/RemotePageAccessManager.jsm b/toolkit/modules/RemotePageAccessManager.jsm
index 9734324cbd5f..eceaa7c857de 100644
--- a/toolkit/modules/RemotePageAccessManager.jsm
+++ b/toolkit/modules/RemotePageAccessManager.jsm
@@ -95,6 +95,7 @@ let RemotePageAccessManager = {
],
RPMPrefIsLocked: ["security.tls.version.min"],
RPMAddToHistogram: ["*"],
+ RPMGetTorStrings: ["*"],
},
"about:newinstall": {
RPMGetUpdateChannel: ["*"],
diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/frame-script.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/frame-script.js
index 28f5d864b0bd..cd0d6d4d3656 100644
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/frame-script.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/frame-script.js
@@ -37,5 +37,6 @@ module.exports = {
RPMRecordTelemetryEvent: false,
RPMAddToHistogram: false,
RPMRemoveMessageListener: false,
+ RPMGetTorStrings: false,
},
};
diff --git a/xpcom/base/ErrorList.py b/xpcom/base/ErrorList.py
index 6b1a05a91b31..5f35cf7771f9 100755
--- a/xpcom/base/ErrorList.py
+++ b/xpcom/base/ErrorList.py
@@ -85,6 +85,7 @@ modules["URL_CLASSIFIER"] = Mod(42)
# ErrorResult gets its own module to reduce the chance of someone accidentally
# defining an error code matching one of the ErrorResult ones.
modules["ERRORRESULT"] = Mod(43)
+modules["TOR"] = Mod(44)
# NS_ERROR_MODULE_GENERAL should be used by modules that do not
# care if return code values overlap. Callers of methods that
@@ -1179,6 +1180,27 @@ with modules["ERRORRESULT"]:
errors["NS_ERROR_INTERNAL_ERRORRESULT_RANGEERROR"] = FAILURE(5)
+# =======================================================================
+# 44: Tor-specific error codes.
+# =======================================================================
+with modules["TOR"]:
+ # Tor onion service descriptor can not be found.
+ errors["NS_ERROR_TOR_ONION_SVC_NOT_FOUND"] = FAILURE(1)
+ # Tor onion service descriptor is invalid.
+ errors["NS_ERROR_TOR_ONION_SVC_IS_INVALID"] = FAILURE(2)
+ # Tor onion service introduction failed.
+ errors["NS_ERROR_TOR_ONION_SVC_INTRO_FAILED"] = FAILURE(3)
+ # Tor onion service rendezvous failed.
+ errors["NS_ERROR_TOR_ONION_SVC_REND_FAILED"] = FAILURE(4)
+ # Tor onion service missing client authorization.
+ errors["NS_ERROR_TOR_ONION_SVC_MISSING_CLIENT_AUTH"] = FAILURE(5)
+ # Tor onion service wrong client authorization.
+ errors["NS_ERROR_TOR_ONION_SVC_BAD_CLIENT_AUTH"] = FAILURE(6)
+ # Tor onion service bad address.
+ errors["NS_ERROR_TOR_ONION_SVC_BAD_ADDRESS"] = FAILURE(7)
+ # Tor onion service introduction timed out.
+ errors["NS_ERROR_TOR_ONION_SVC_INTRO_TIMEDOUT"] = FAILURE(8)
+
# =======================================================================
# 51: NS_ERROR_MODULE_GENERAL
# =======================================================================
1
0