tor-commits
Threads by month
- ----- 2025 -----
- 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
October 2015
- 14 participants
- 1182 discussions

[translation/tails-misc_completed] Update translations for tails-misc_completed
by translation@torproject.org 13 Oct '15
by translation@torproject.org 13 Oct '15
13 Oct '15
commit 945246696df1dcb50c6b6ade1cb89fcb78060d19
Author: Translation commit bot <translation(a)torproject.org>
Date: Tue Oct 13 15:45:47 2015 +0000
Update translations for tails-misc_completed
---
fr.po | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/fr.po b/fr.po
index 32044c5..8321294 100644
--- a/fr.po
+++ b/fr.po
@@ -10,6 +10,7 @@
# Athorcis, 2015
# Emmanuel Simond, 2014
# Jean-Yves Toumit <saiolar-c(a)yahoo.fr>, 2013
+# Lidija <llazic.bgd(a)gmail.com>, 2015
# Onizuka, 2013
# mosira <romain.moisan(a)gmail.com>, 2014
# Sabrina Cater <sabcat(a)gmx.fr>, 2015
@@ -19,9 +20,9 @@ msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-08-10 18:53+0200\n"
-"PO-Revision-Date: 2015-08-20 15:48+0000\n"
-"Last-Translator: Sabrina Cater <sabcat(a)gmx.fr>\n"
+"POT-Creation-Date: 2015-09-20 19:32+0200\n"
+"PO-Revision-Date: 2015-10-13 15:33+0000\n"
+"Last-Translator: Lidija <llazic.bgd(a)gmail.com>\n"
"Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -189,7 +190,7 @@ msgstr "Faites-vous confiance à ces clés ?"
msgid "The following selected key is not fully trusted:"
msgid_plural "The following selected keys are not fully trusted:"
msgstr[0] "La clé suivante n'est pas totalement de confiance :"
-msgstr[1] "Les clés suivantes ne sont pas totalement de confiance :"
+msgstr[1] "Les clés suivantes ne sont pas totalement fiables :"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:578
msgid "Do you trust this key enough to use it anyway?"
@@ -317,23 +318,23 @@ msgstr "Il semble que votre connexion au réseau est bloquée. Cela peut être l
msgid "This version of Tails has known security issues:"
msgstr "Cette version de Tails a des problèmes de sécurité avérés :"
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:37
+#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:45
#, sh-format
msgid "Network card ${nic} disabled"
msgstr "Carte réseau ${nic} désactivée"
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:38
+#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:46
#, sh-format
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}) so it is temporarily disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}), cette fonctionnalité est donc temporairement désactivée.\nVous pouvez néanmoins redémarrer Tails et désactiver complètement la fonctionnalité d'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:47
+#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:55
msgid "All networking disabled"
msgstr "Toutes les connexions réseau sont désactivées"
-#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:48
+#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:56
#, sh-format
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}). The error recovery also failed so all networking is disabled.\n"
@@ -479,8 +480,8 @@ msgid "I2P's router console is ready"
msgstr "La console du routeur I2P est prête"
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:44
-msgid "You can now access I2P's router console on http://127.0.0.1:7657."
-msgstr "Vous pouvez maintenant accéder à la console du routeur I2P sur http://127.0.0.1:7657."
+msgid "You can now access I2P's router console in the I2P Browser."
+msgstr "Vous pouvez maintenant accéder à la console du routeur dans le navigateur I2P."
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:49
msgid "I2P is not ready"
@@ -488,10 +489,10 @@ msgstr "I2P n'est pas prêt"
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:50
msgid ""
-"Eepsite tunnel not built within six minutes. Check the router console at "
-"http://127.0.0.1:7657/logs or the logs in /var/log/i2p for more information."
-" Reconnect to the network to try again."
-msgstr "Le tunnel de l'Eepsite n'a pas été construit durant les six dernières minutes. Pour plus d'information vérifiez la console de routeur dans http://127.0.0.1:7657/logs ou les historiques dans /var/log/i2p . Reconnectez-vous au réseau afin de réessayer."
+"Eepsite tunnel not built within six minutes. Check the router console in the"
+" I2P Browser or the logs in /var/log/i2p for more information. Reconnect to "
+"the network to try again."
+msgstr "Le tunnel Eepsite n'a pas été construit en six minutes.\nVérifier la console du routeur dans le navigateur I2P ou dans les journaux à /var/log/I2p pour plus d'informations.\nReconnectez-vous au réseau à nouveau."
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:60
msgid "I2P is ready"
1
0

[translation/tails-misc] Update translations for tails-misc
by translation@torproject.org 13 Oct '15
by translation@torproject.org 13 Oct '15
13 Oct '15
commit 8585634d71ac1e14dc73c5a88887f6268a6691ec
Author: Translation commit bot <translation(a)torproject.org>
Date: Tue Oct 13 15:45:44 2015 +0000
Update translations for tails-misc
---
fr.po | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/fr.po b/fr.po
index a54f836..8321294 100644
--- a/fr.po
+++ b/fr.po
@@ -10,6 +10,7 @@
# Athorcis, 2015
# Emmanuel Simond, 2014
# Jean-Yves Toumit <saiolar-c(a)yahoo.fr>, 2013
+# Lidija <llazic.bgd(a)gmail.com>, 2015
# Onizuka, 2013
# mosira <romain.moisan(a)gmail.com>, 2014
# Sabrina Cater <sabcat(a)gmx.fr>, 2015
@@ -20,8 +21,8 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-20 19:32+0200\n"
-"PO-Revision-Date: 2015-10-13 13:23+0000\n"
-"Last-Translator: carolyn <carolyn(a)anhalt.org>\n"
+"PO-Revision-Date: 2015-10-13 15:33+0000\n"
+"Last-Translator: Lidija <llazic.bgd(a)gmail.com>\n"
"Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -189,7 +190,7 @@ msgstr "Faites-vous confiance à ces clés ?"
msgid "The following selected key is not fully trusted:"
msgid_plural "The following selected keys are not fully trusted:"
msgstr[0] "La clé suivante n'est pas totalement de confiance :"
-msgstr[1] "Les clés suivantes ne sont pas totalement de confiance :"
+msgstr[1] "Les clés suivantes ne sont pas totalement fiables :"
#: config/chroot_local-includes/usr/local/bin/gpgApplet:578
msgid "Do you trust this key enough to use it anyway?"
@@ -480,7 +481,7 @@ msgstr "La console du routeur I2P est prête"
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:44
msgid "You can now access I2P's router console in the I2P Browser."
-msgstr ""
+msgstr "Vous pouvez maintenant accéder à la console du routeur dans le navigateur I2P."
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:49
msgid "I2P is not ready"
@@ -491,7 +492,7 @@ msgid ""
"Eepsite tunnel not built within six minutes. Check the router console in the"
" I2P Browser or the logs in /var/log/i2p for more information. Reconnect to "
"the network to try again."
-msgstr ""
+msgstr "Le tunnel Eepsite n'a pas été construit en six minutes.\nVérifier la console du routeur dans le navigateur I2P ou dans les journaux à /var/log/I2p pour plus d'informations.\nReconnectez-vous au réseau à nouveau."
#: config/chroot_local-includes/usr/local/sbin/tails-i2p:60
msgid "I2P is ready"
1
0

[translation/bridgedb_completed] Update translations for bridgedb_completed
by translation@torproject.org 13 Oct '15
by translation@torproject.org 13 Oct '15
13 Oct '15
commit 20c612e746fe0c873fd69d83d16bfd4b490c36af
Author: Translation commit bot <translation(a)torproject.org>
Date: Tue Oct 13 15:45:08 2015 +0000
Update translations for bridgedb_completed
---
nb/LC_MESSAGES/bridgedb.po | 344 ++++++++++++++++++++++----------------------
sr/LC_MESSAGES/bridgedb.po | 338 +++++++++++++++++++++----------------------
2 files changed, 343 insertions(+), 339 deletions(-)
diff --git a/nb/LC_MESSAGES/bridgedb.po b/nb/LC_MESSAGES/bridgedb.po
index 0e00bac..2e61082 100644
--- a/nb/LC_MESSAGES/bridgedb.po
+++ b/nb/LC_MESSAGES/bridgedb.po
@@ -4,23 +4,25 @@
#
# Translators:
# Allan Nordhøy <epost(a)anotheragency.no>, 2014
-# Erik Matson <erik(a)norwenglish.net>, 2015
+# Erik Matson, 2015
# Harald <haarektrans(a)gmail.com>, 2014
# Kristian Andre Henriksen <kris.andre.h(a)gmail.com>, 2015
# lateralus, 2013
+# Pål Fiksdal <plf715(a)gmail.com>, 2015
# Per Thorsheim <transifex(a)thorsheim.net>, 2015
# thor574 <thor.hovden(a)gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
-"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'POT-Creation-Date: 2015-03-19 22:13+0000\n"
-"PO-Revision-Date: 2015-06-23 12:17+0000\n"
-"Last-Translator: Erik Matson <erik(a)norwenglish.net>\n"
-"Language-Team: Norwegian Bokmål (http://www.transifex.com/projects/p/torproject/language/nb/)\n"
+"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'\n"
+"POT-Creation-Date: 2015-07-25 03:40+0000\n"
+"PO-Revision-Date: 2015-10-13 15:27+0000\n"
+"Last-Translator: Pål Fiksdal <plf715(a)gmail.com>\n"
+"Language-Team: Norwegian Bokmål (http://www.transifex.com/otf/torproject/language/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 0.9.6\n"
+"Generated-By: Babel 1.3\n"
"Language: nb\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -35,57 +37,182 @@ msgstr ""
#. "fteproxy"
#. "Tor"
#. "Tor Browser"
-#: lib/bridgedb/HTTPServer.py:107
+#: bridgedb/https/server.py:167
msgid "Sorry! Something went wrong with your request."
-msgstr "Dette var leit! Noe gikk galt med forespørselen din."
+msgstr "Beklager! Noe gikk galt med forespørselen din."
-#: lib/bridgedb/strings.py:18
+#: bridgedb/https/templates/base.html:79
+msgid "Report a Bug"
+msgstr "Rapporter en feil"
+
+#: bridgedb/https/templates/base.html:82
+msgid "Source Code"
+msgstr "Kildekode"
+
+#: bridgedb/https/templates/base.html:85
+msgid "Changelog"
+msgstr "Endringslogg"
+
+#: bridgedb/https/templates/base.html:88
+msgid "Contact"
+msgstr "Kontakt"
+
+#: bridgedb/https/templates/bridges.html:35
+msgid "Select All"
+msgstr "Velg alle"
+
+#: bridgedb/https/templates/bridges.html:40
+msgid "Show QRCode"
+msgstr "Vis QR kode"
+
+#: bridgedb/https/templates/bridges.html:52
+msgid "QRCode for your bridge lines"
+msgstr "QR kode for dine brolinjer"
+
+#. TRANSLATORS: Please translate this into some silly way to say
+#. "There was a problem!" in your language. For example,
+#. for Italian, you might translate this into "Mama mia!",
+#. or for French: "Sacrebleu!". :)
+#: bridgedb/https/templates/bridges.html:67
+#: bridgedb/https/templates/bridges.html:125
+msgid "Uh oh, spaghettios!"
+msgstr "Oisann!"
+
+#: bridgedb/https/templates/bridges.html:68
+msgid "It seems there was an error getting your QRCode."
+msgstr "Det oppsto en feil ved innhenting av din QR kode."
+
+#: bridgedb/https/templates/bridges.html:73
+msgid ""
+"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
+" your bridge lines onto mobile and other devices."
+msgstr "Denne QR koden inneholder dine brolinjer. Skann den med en QR leser for å kopiere dine brolinjer over på mobile og andre enheter."
+
+#: bridgedb/https/templates/bridges.html:131
+msgid "There currently aren't any bridges available..."
+msgstr "Det er for tiden ingen tilgjengelige broer..."
+
+#: bridgedb/https/templates/bridges.html:132
+#, python-format
+msgid ""
+" Perhaps you should try %s going back %s and choosing a different bridge "
+"type!"
+msgstr "Kanskje du bør prøve %s gå tilbake til %s og velge en annen brotype!"
+
+#: bridgedb/https/templates/index.html:11
+#, python-format
+msgid "Step %s1%s"
+msgstr "Steg %s1%s"
+
+#: bridgedb/https/templates/index.html:13
+#, python-format
+msgid "Download %s Tor Browser %s"
+msgstr "Last ned %s Tor-nettleser %s"
+
+#: bridgedb/https/templates/index.html:25
+#, python-format
+msgid "Step %s2%s"
+msgstr "Steg %s2%s"
+
+#: bridgedb/https/templates/index.html:27
+#, python-format
+msgid "Get %s bridges %s"
+msgstr "Hent %s broer %s"
+
+#: bridgedb/https/templates/index.html:36
+#, python-format
+msgid "Step %s3%s"
+msgstr "Steg %s3%s"
+
+#: bridgedb/https/templates/index.html:38
+#, python-format
+msgid "Now %s add the bridges to Tor Browser %s"
+msgstr "Nå %s legg til broer til Tor-nettleser %s"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. (These are used to insert HTML5 underlining tags, to mark accesskeys
+#. for disabled users.)
+#: bridgedb/https/templates/options.html:38
+#, python-format
+msgid "%sJ%sust give me bridges!"
+msgstr "%sB%sare gi meg noen broer!"
+
+#: bridgedb/https/templates/options.html:51
+msgid "Advanced Options"
+msgstr "Avanserte valg"
+
+#: bridgedb/https/templates/options.html:86
+msgid "No"
+msgstr "Nei"
+
+#: bridgedb/https/templates/options.html:87
+msgid "none"
+msgstr "ingen"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
+#: bridgedb/https/templates/options.html:124
+#, python-format
+msgid "%sY%ses!"
+msgstr "%sJ%sa!"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Please do NOT translate the word "bridge"!
+#: bridgedb/https/templates/options.html:147
+#, python-format
+msgid "%sG%set Bridges"
+msgstr "%sT%silknytt broer"
+
+#: bridgedb/strings.py:43
msgid "[This is an automated message; please do not reply.]"
msgstr "[Dette er en automatisert melding; vennligst ikke svar.]"
-#: lib/bridgedb/strings.py:20
+#: bridgedb/strings.py:45
msgid "Here are your bridges:"
msgstr "Her er dine broer:"
-#: lib/bridgedb/strings.py:22
+#: bridgedb/strings.py:47
#, python-format
msgid ""
"You have exceeded the rate limit. Please slow down! The minimum time between\n"
"emails is %s hours. All further emails during this time period will be ignored."
msgstr "Du har gått over hastighetsbegrensningen. Vennligst ta det med ro! Minste tid mellom e-poster er %s timer. Alle videre eposter i denne tidsperioden vil bli ignorert."
-#: lib/bridgedb/strings.py:25
+#: bridgedb/strings.py:50
msgid ""
"COMMANDs: (combine COMMANDs to specify multiple options simultaneously)"
msgstr "KOMMANDOer: (kombiner KOMMANDer to å angi flere valg samtidig)"
#. TRANSLATORS: Please DO NOT translate the word "BridgeDB".
-#: lib/bridgedb/strings.py:28
+#: bridgedb/strings.py:53
msgid "Welcome to BridgeDB!"
msgstr "Velkommen til BridgeDB!"
#. TRANSLATORS: Please DO NOT translate the words "transport" or "TYPE".
-#: lib/bridgedb/strings.py:30
+#: bridgedb/strings.py:55
msgid "Currently supported transport TYPEs:"
msgstr "Nåværende støttede transport TYPEr:"
-#: lib/bridgedb/strings.py:31
+#: bridgedb/strings.py:56
#, python-format
msgid "Hey, %s!"
msgstr "Hei, %s!"
-#: lib/bridgedb/strings.py:32
+#: bridgedb/strings.py:57
msgid "Hello, friend!"
msgstr "Hallo, lille venn!"
-#: lib/bridgedb/strings.py:33 lib/bridgedb/templates/base.html:100
+#: bridgedb/strings.py:58 bridgedb/https/templates/base.html:90
msgid "Public Keys"
msgstr "Offentlige nøkler"
#. TRANSLATORS: This string will end up saying something like:
#. "This email was generated with rainbows, unicorns, and sparkles
#. for alice(a)example.com on Friday, 09 May, 2014 at 18:59:39."
-#: lib/bridgedb/strings.py:37
+#: bridgedb/strings.py:62
#, python-format
msgid ""
"This email was generated with rainbows, unicorns, and sparkles\n"
@@ -96,7 +223,7 @@ msgstr "Denne e-posten ble laget med regnbuer, enhjørninger og stjerneskudd for
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor".
#. TRANSLATORS: Please DO NOT translate "Tor Network".
-#: lib/bridgedb/strings.py:47
+#: bridgedb/strings.py:72
#, python-format
msgid ""
"BridgeDB can provide bridges with several %stypes of Pluggable Transports%s,\n"
@@ -107,7 +234,7 @@ msgid ""
msgstr "I BridgeDB finnes broer med flere %styper av pluggbare transporter%s,\nsom kan hjelpe deg med å tilsløre dine tilkoblinger til Tor-nettverket, noe som gjør det\nvanskelig for noen som overvåker din internett-trafikk å fastsette hvorvidt du\nbruker Tor eller ei\n\n"
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
-#: lib/bridgedb/strings.py:54
+#: bridgedb/strings.py:79
msgid ""
"Some bridges with IPv6 addresses are also available, though some Pluggable\n"
"Transports aren't IPv6 compatible.\n"
@@ -119,7 +246,7 @@ msgstr "Noen broer med IPv6-adresser er også tilgjelgelige, dog er noen pluggba
#. regular, or unexciting". Like vanilla ice cream. It refers to bridges
#. which do not have Pluggable Transports, and only speak the regular,
#. boring Tor protocol. Translate it as you see fit. Have fun with it.
-#: lib/bridgedb/strings.py:63
+#: bridgedb/strings.py:88
#, python-format
msgid ""
"Additionally, BridgeDB has plenty of plain-ol'-vanilla bridges %s without any\n"
@@ -128,20 +255,20 @@ msgid ""
"\n"
msgstr "Merk også, BridgeDB har massevis av standardbroer med fabrikkoppsett %s uten\nnoen pluggbare transporter %s hvilket kanskje ikke høres så tøft ut, men de kan fremdeles\nbehjelpe omgåelse av internettsensur i de fleste fall.\n\n"
-#: lib/bridgedb/strings.py:76
+#: bridgedb/strings.py:101
msgid "What are bridges?"
msgstr "Hva er broer?"
-#: lib/bridgedb/strings.py:77
+#: bridgedb/strings.py:102
#, python-format
msgid "%s Bridges %s are Tor relays that help you circumvent censorship."
msgstr "%s Broer %s er Tor-tilknyttninger som hjelper deg med å omgå sensur."
-#: lib/bridgedb/strings.py:82
+#: bridgedb/strings.py:107
msgid "I need an alternative way of getting bridges!"
msgstr "Jeg trenger en alternativ måte å få broer på!"
-#: lib/bridgedb/strings.py:83
+#: bridgedb/strings.py:108
#, python-format
msgid ""
"Another way to get bridges is to send an email to %s. Please note that you must\n"
@@ -149,12 +276,12 @@ msgid ""
"%s, %s or %s."
msgstr "En annen måte tilknytte seg broer er å sende en e-post til %s. Merk at du må sende\ne-post fra en adresse tilhørende en av følgende e-posttilbydere:\n%s, %s eller %s."
-#: lib/bridgedb/strings.py:90
+#: bridgedb/strings.py:115
msgid "My bridges don't work! I need help!"
msgstr "Broene mine virker ikke! Jeg trenger hjelp!"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:92
+#: bridgedb/strings.py:117
#, python-format
msgid "If your Tor doesn't work, you should email %s."
msgstr "Hvis din Tor ikke virker, burde du skrive epost til %s."
@@ -162,48 +289,48 @@ msgstr "Hvis din Tor ikke virker, burde du skrive epost til %s."
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:96
+#: bridgedb/strings.py:121
msgid ""
"Try including as much info about your case as you can, including the list of\n"
"bridges and Pluggable Transports you tried to use, your Tor Browser version,\n"
"and any messages which Tor gave out, etc."
msgstr "Prøv å få med så mye info om dit tilfelle du kan, inkludert en liste over\nbroene og pluggbare transporter du prøvde å bruke, din Tor-nettleser-versjon,\nog alle meldinger Tor måtte produsere, osv."
-#: lib/bridgedb/strings.py:103
+#: bridgedb/strings.py:128
msgid "Here are your bridge lines:"
msgstr "Her er dine bro-linjer:"
-#: lib/bridgedb/strings.py:104
+#: bridgedb/strings.py:129
msgid "Get Bridges!"
msgstr "Få broer!"
-#: lib/bridgedb/strings.py:108
+#: bridgedb/strings.py:133
msgid "Please select options for bridge type:"
msgstr "Gjør valg for brotype:"
-#: lib/bridgedb/strings.py:109
+#: bridgedb/strings.py:134
msgid "Do you need IPv6 addresses?"
msgstr "Trenger du IPv6-adresser?"
-#: lib/bridgedb/strings.py:110
+#: bridgedb/strings.py:135
#, python-format
msgid "Do you need a %s?"
msgstr "Trenger du en %s?"
-#: lib/bridgedb/strings.py:114
+#: bridgedb/strings.py:139
msgid "Your browser is not displaying images properly."
msgstr "Nettleseren din viser ikke bilder ordentlig."
-#: lib/bridgedb/strings.py:115
+#: bridgedb/strings.py:140
msgid "Enter the characters from the image above..."
msgstr "Skriv inn bokstavene fra bildet ovenfor..."
-#: lib/bridgedb/strings.py:119
+#: bridgedb/strings.py:144
msgid "How to start using your bridges"
msgstr "Hvordan starte med bruk av dine broer"
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
-#: lib/bridgedb/strings.py:121
+#: bridgedb/strings.py:146
#, python-format
msgid ""
"To enter bridges into Tor Browser, first go to the %s Tor Browser download\n"
@@ -212,175 +339,50 @@ msgid ""
msgstr "For å sette opp broer i Tor Browser, først gå til %s Tor Browser download\nsiden %s følg så instruksene for nedlasting og start av Tor Browser."
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:126
+#: bridgedb/strings.py:151
msgid ""
"When the 'Tor Network Settings' dialogue pops up, click 'Configure' and follow\n"
"the wizard until it asks:"
msgstr "Når 'Tor nettverks-innstillinger' dialogboksen spretter opp, trykk på 'oppsett' og følg\nveiviseren til den forespør:"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:130
+#: bridgedb/strings.py:155
msgid ""
"Does your Internet Service Provider (ISP) block or otherwise censor connections\n"
"to the Tor network?"
msgstr "Sensurerer, eller blokkerer på annen måte, din internetttilbyder (ISP) tilkoblinger\ntil Tor-nettverket?"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:134
+#: bridgedb/strings.py:159
msgid ""
"Select 'Yes' and then click 'Next'. To configure your new bridges, copy and\n"
"paste the bridge lines into the text input box. Finally, click 'Connect', and\n"
"you should be good to go! If you experience trouble, try clicking the 'Help'\n"
"button in the 'Tor Network Settings' wizard for further assistance."
-msgstr "Velg 'Ja' og klikk så 'Neste'. For å sette opp nye broer, kopier og\nlim inn brolinjene i tekstboksen. Til slutt, trykk 'Koble til', og\ndu burde være klar til kamp! Hvis du får problemer, trykk 'Hjelp'\n-knappen i \"Tor-nettverksinnstillinger'-veiviseren for ytterligere hjelp."
+msgstr "Velg 'Ja' og klikk så 'Neste'. For å konfigurere de nye broene dine, kopier og\nlim inn brolinjene i tekstboksen. Til slutt, trykk 'Koble til', og\ndu burde være klar til kamp! Hvis du får problemer, trykk 'Hjelp'\n-knappen i \"Tor-nettverksinnstillinger'-veiviseren for ytterligere hjelp."
-#: lib/bridgedb/strings.py:142
+#: bridgedb/strings.py:167
msgid "Displays this message."
msgstr "Vis denne meldingen."
#. TRANSLATORS: Please try to make it clear that "vanilla" here refers to the
#. same non-Pluggable Transport bridges described above as being
#. "plain-ol'-vanilla" bridges.
-#: lib/bridgedb/strings.py:146
+#: bridgedb/strings.py:171
msgid "Request vanilla bridges."
msgstr "Be om broer med \"vanilla\" fabrikkoppsett."
-#: lib/bridgedb/strings.py:147
+#: bridgedb/strings.py:172
msgid "Request IPv6 bridges."
msgstr "Etterspør IPv6-broer."
#. TRANSLATORS: Please DO NOT translate the word the word "TYPE".
-#: lib/bridgedb/strings.py:149
+#: bridgedb/strings.py:174
msgid "Request a Pluggable Transport by TYPE."
msgstr "Be om en pluggbar transport etter TYPE."
#. TRANSLATORS: Please DO NOT translate "BridgeDB".
#. TRANSLATORS: Please DO NOT translate "GnuPG".
-#: lib/bridgedb/strings.py:152
+#: bridgedb/strings.py:177
msgid "Get a copy of BridgeDB's public GnuPG key."
msgstr "Få kopi av BridgeDBs offentlige GnuPG-nøkkel."
-
-#: lib/bridgedb/templates/base.html:89
-msgid "Report a Bug"
-msgstr "Rapporter en feil"
-
-#: lib/bridgedb/templates/base.html:92
-msgid "Source Code"
-msgstr "Kildekode"
-
-#: lib/bridgedb/templates/base.html:95
-msgid "Changelog"
-msgstr "Endringslogg"
-
-#: lib/bridgedb/templates/base.html:98
-msgid "Contact"
-msgstr "Kontakt"
-
-#: lib/bridgedb/templates/bridges.html:81
-msgid "Select All"
-msgstr "Velg alle"
-
-#: lib/bridgedb/templates/bridges.html:87
-msgid "Show QRCode"
-msgstr "Vis QR kode"
-
-#: lib/bridgedb/templates/bridges.html:100
-msgid "QRCode for your bridge lines"
-msgstr "QR kode for dine brolinjer"
-
-#. TRANSLATORS: Please translate this into some silly way to say
-#. "There was a problem!" in your language. For example,
-#. for Italian, you might translate this into "Mama mia!",
-#. or for French: "Sacrebleu!". :)
-#: lib/bridgedb/templates/bridges.html:115
-#: lib/bridgedb/templates/bridges.html:175
-msgid "Uh oh, spaghettios!"
-msgstr "Oisann!"
-
-#: lib/bridgedb/templates/bridges.html:116
-msgid "It seems there was an error getting your QRCode."
-msgstr "Det oppsto en feil ved innhenting av din QR kode."
-
-#: lib/bridgedb/templates/bridges.html:121
-msgid ""
-"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
-" your bridge lines onto mobile and other devices."
-msgstr "Denne QR koden inneholder dine brolinjer. Skann den med en QR leser for å kopiere dine brolinjer over på mobile og andre enheter."
-
-#: lib/bridgedb/templates/bridges.html:181
-msgid "There currently aren't any bridges available..."
-msgstr "Det er for tiden ingen tilgjengelige broer..."
-
-#: lib/bridgedb/templates/bridges.html:182
-#, python-format
-msgid ""
-" Perhaps you should try %s going back %s and choosing a different bridge "
-"type!"
-msgstr "Kanskje du bør prøve %s gå tilbake til %s og velge en annen brotype!"
-
-#: lib/bridgedb/templates/index.html:11
-#, python-format
-msgid "Step %s1%s"
-msgstr "Steg %s1%s"
-
-#: lib/bridgedb/templates/index.html:13
-#, python-format
-msgid "Download %s Tor Browser %s"
-msgstr "Last ned %s Tor-nettleser %s"
-
-#: lib/bridgedb/templates/index.html:25
-#, python-format
-msgid "Step %s2%s"
-msgstr "Steg %s2%s"
-
-#: lib/bridgedb/templates/index.html:27
-#, python-format
-msgid "Get %s bridges %s"
-msgstr "Hent %s broer %s"
-
-#: lib/bridgedb/templates/index.html:36
-#, python-format
-msgid "Step %s3%s"
-msgstr "Steg %s3%s"
-
-#: lib/bridgedb/templates/index.html:38
-#, python-format
-msgid "Now %s add the bridges to Tor Browser %s"
-msgstr "Nå %s legg til broer til Tor-nettleser %s"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. (These are used to insert HTML5 underlining tags, to mark accesskeys
-#. for disabled users.)
-#: lib/bridgedb/templates/options.html:38
-#, python-format
-msgid "%sJ%sust give me bridges!"
-msgstr "%sB%sare gi meg noen broer!"
-
-#: lib/bridgedb/templates/options.html:52
-msgid "Advanced Options"
-msgstr "Avanserte valg"
-
-#: lib/bridgedb/templates/options.html:88
-msgid "No"
-msgstr "Nei"
-
-#: lib/bridgedb/templates/options.html:89
-msgid "none"
-msgstr "ingen"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
-#: lib/bridgedb/templates/options.html:127
-#, python-format
-msgid "%sY%ses!"
-msgstr "%sJ%sa!"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Please do NOT translate the word "bridge"!
-#: lib/bridgedb/templates/options.html:151
-#, python-format
-msgid "%sG%set Bridges"
-msgstr "%sT%silknytt broer"
diff --git a/sr/LC_MESSAGES/bridgedb.po b/sr/LC_MESSAGES/bridgedb.po
index 105597e..f1b0c85 100644
--- a/sr/LC_MESSAGES/bridgedb.po
+++ b/sr/LC_MESSAGES/bridgedb.po
@@ -5,19 +5,21 @@
# Translators:
# obj.petit.a, 2014
# Ivan Radeljic <radeljicivan85(a)gmail.com>, 2014-2015
+# Lidija <llazic.bgd(a)gmail.com>, 2015
# Milenko Doder <milenko.doder(a)gmail.com>, 2015
# obj.petit.a, 2014
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
-"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'POT-Creation-Date: 2015-03-19 22:13+0000\n"
-"PO-Revision-Date: 2015-07-10 09:32+0000\n"
-"Last-Translator: Milenko Doder <milenko.doder(a)gmail.com>\n"
-"Language-Team: Serbian (http://www.transifex.com/p/torproject/language/sr/)\n"
+"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'\n"
+"POT-Creation-Date: 2015-07-25 03:40+0000\n"
+"PO-Revision-Date: 2015-10-13 15:42+0000\n"
+"Last-Translator: Lidija <llazic.bgd(a)gmail.com>\n"
+"Language-Team: Serbian (http://www.transifex.com/otf/torproject/language/sr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 0.9.6\n"
+"Generated-By: Babel 1.3\n"
"Language: sr\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
@@ -32,57 +34,182 @@ msgstr ""
#. "fteproxy"
#. "Tor"
#. "Tor Browser"
-#: lib/bridgedb/HTTPServer.py:107
+#: bridgedb/https/server.py:167
msgid "Sorry! Something went wrong with your request."
msgstr "Извините! Нешто се лоше десило са вашим захтевом."
-#: lib/bridgedb/strings.py:18
+#: bridgedb/https/templates/base.html:79
+msgid "Report a Bug"
+msgstr "Пријавите грешку."
+
+#: bridgedb/https/templates/base.html:82
+msgid "Source Code"
+msgstr "Изворни код"
+
+#: bridgedb/https/templates/base.html:85
+msgid "Changelog"
+msgstr "Promena loga"
+
+#: bridgedb/https/templates/base.html:88
+msgid "Contact"
+msgstr "Контакт"
+
+#: bridgedb/https/templates/bridges.html:35
+msgid "Select All"
+msgstr "Обележи све"
+
+#: bridgedb/https/templates/bridges.html:40
+msgid "Show QRCode"
+msgstr "Прикажи QRCode"
+
+#: bridgedb/https/templates/bridges.html:52
+msgid "QRCode for your bridge lines"
+msgstr "QR код за ваше премошћиваче"
+
+#. TRANSLATORS: Please translate this into some silly way to say
+#. "There was a problem!" in your language. For example,
+#. for Italian, you might translate this into "Mama mia!",
+#. or for French: "Sacrebleu!". :)
+#: bridgedb/https/templates/bridges.html:67
+#: bridgedb/https/templates/bridges.html:125
+msgid "Uh oh, spaghettios!"
+msgstr "Ух, страшно!"
+
+#: bridgedb/https/templates/bridges.html:68
+msgid "It seems there was an error getting your QRCode."
+msgstr "Дошло је до грешке при набавлјању вашег QR kода."
+
+#: bridgedb/https/templates/bridges.html:73
+msgid ""
+"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
+" your bridge lines onto mobile and other devices."
+msgstr "QR код садржи ваше премошћиваче. Скенирајет га са читаћем QR кода да бисте ископирали ваше премошћиваче на моблине као и на друге уређаје."
+
+#: bridgedb/https/templates/bridges.html:131
+msgid "There currently aren't any bridges available..."
+msgstr "Тренутно нема доступних премошћивача..."
+
+#: bridgedb/https/templates/bridges.html:132
+#, python-format
+msgid ""
+" Perhaps you should try %s going back %s and choosing a different bridge "
+"type!"
+msgstr "Можда бисте требали да покушате %s да се вратите %s и изаберете другу врсту премошћивача!"
+
+#: bridgedb/https/templates/index.html:11
+#, python-format
+msgid "Step %s1%s"
+msgstr "Корак %s1%s"
+
+#: bridgedb/https/templates/index.html:13
+#, python-format
+msgid "Download %s Tor Browser %s"
+msgstr "Преузмите %s Тор прегледач %s"
+
+#: bridgedb/https/templates/index.html:25
+#, python-format
+msgid "Step %s2%s"
+msgstr "Корак %s2%s"
+
+#: bridgedb/https/templates/index.html:27
+#, python-format
+msgid "Get %s bridges %s"
+msgstr "Добијте %s премошћиваче %s"
+
+#: bridgedb/https/templates/index.html:36
+#, python-format
+msgid "Step %s3%s"
+msgstr "Корак %s3%s"
+
+#: bridgedb/https/templates/index.html:38
+#, python-format
+msgid "Now %s add the bridges to Tor Browser %s"
+msgstr "Сада %s додајте премошћиваче у Тор прегледач %s"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. (These are used to insert HTML5 underlining tags, to mark accesskeys
+#. for disabled users.)
+#: bridgedb/https/templates/options.html:38
+#, python-format
+msgid "%sJ%sust give me bridges!"
+msgstr "%sС%sамо ми дај премошћиваче!"
+
+#: bridgedb/https/templates/options.html:51
+msgid "Advanced Options"
+msgstr "Напредне опције"
+
+#: bridgedb/https/templates/options.html:86
+msgid "No"
+msgstr "Не"
+
+#: bridgedb/https/templates/options.html:87
+msgid "none"
+msgstr "нема"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
+#: bridgedb/https/templates/options.html:124
+#, python-format
+msgid "%sY%ses!"
+msgstr "%sТ%sо!"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Please do NOT translate the word "bridge"!
+#: bridgedb/https/templates/options.html:147
+#, python-format
+msgid "%sG%set Bridges"
+msgstr "%sД%sобијте премошћиваче"
+
+#: bridgedb/strings.py:43
msgid "[This is an automated message; please do not reply.]"
msgstr "[Ово је аутоматска порука; молимо вас да не одговарате.]"
-#: lib/bridgedb/strings.py:20
+#: bridgedb/strings.py:45
msgid "Here are your bridges:"
msgstr "Ево Ваших премошћивача:"
-#: lib/bridgedb/strings.py:22
+#: bridgedb/strings.py:47
#, python-format
msgid ""
"You have exceeded the rate limit. Please slow down! The minimum time between\n"
"emails is %s hours. All further emails during this time period will be ignored."
msgstr "Достигли сте ваш лимит. Молим, успорите! Минимално време између\nе-поште је %s сати. Сва наредна е-пошта током овог периода биће игнорисана. "
-#: lib/bridgedb/strings.py:25
+#: bridgedb/strings.py:50
msgid ""
"COMMANDs: (combine COMMANDs to specify multiple options simultaneously)"
msgstr "COMMANDs: (комбинујте COMMANDs да одредите вишеструке опције истовремено)"
#. TRANSLATORS: Please DO NOT translate the word "BridgeDB".
-#: lib/bridgedb/strings.py:28
+#: bridgedb/strings.py:53
msgid "Welcome to BridgeDB!"
msgstr "Добродошли у BridgeDB!"
#. TRANSLATORS: Please DO NOT translate the words "transport" or "TYPE".
-#: lib/bridgedb/strings.py:30
+#: bridgedb/strings.py:55
msgid "Currently supported transport TYPEs:"
msgstr "Тренутно подржани transport TYPEs:"
-#: lib/bridgedb/strings.py:31
+#: bridgedb/strings.py:56
#, python-format
msgid "Hey, %s!"
msgstr "Здраво, %s!"
-#: lib/bridgedb/strings.py:32
+#: bridgedb/strings.py:57
msgid "Hello, friend!"
msgstr "Здраво, пријатељу!"
-#: lib/bridgedb/strings.py:33 lib/bridgedb/templates/base.html:100
+#: bridgedb/strings.py:58 bridgedb/https/templates/base.html:90
msgid "Public Keys"
msgstr "Јавни кључеви"
#. TRANSLATORS: This string will end up saying something like:
#. "This email was generated with rainbows, unicorns, and sparkles
#. for alice(a)example.com on Friday, 09 May, 2014 at 18:59:39."
-#: lib/bridgedb/strings.py:37
+#: bridgedb/strings.py:62
#, python-format
msgid ""
"This email was generated with rainbows, unicorns, and sparkles\n"
@@ -93,7 +220,7 @@ msgstr "Ова е-пошта је направљена са дугама, јед
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor".
#. TRANSLATORS: Please DO NOT translate "Tor Network".
-#: lib/bridgedb/strings.py:47
+#: bridgedb/strings.py:72
#, python-format
msgid ""
"BridgeDB can provide bridges with several %stypes of Pluggable Transports%s,\n"
@@ -104,7 +231,7 @@ msgid ""
msgstr "BridgeDB може обезбедити мостове са више %s типова Pluggable Transports %s,\nшто може помоћи прикривању ваших конекција са Тор Мрежом да би било коме ко\nпосматра ваш интенет саобраћај било теже да утврди да користите Тор.\n\n"
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
-#: lib/bridgedb/strings.py:54
+#: bridgedb/strings.py:79
msgid ""
"Some bridges with IPv6 addresses are also available, though some Pluggable\n"
"Transports aren't IPv6 compatible.\n"
@@ -116,7 +243,7 @@ msgstr "Неки мостови са IPv6 адресама су такође д
#. regular, or unexciting". Like vanilla ice cream. It refers to bridges
#. which do not have Pluggable Transports, and only speak the regular,
#. boring Tor protocol. Translate it as you see fit. Have fun with it.
-#: lib/bridgedb/strings.py:63
+#: bridgedb/strings.py:88
#, python-format
msgid ""
"Additionally, BridgeDB has plenty of plain-ol'-vanilla bridges %s without any\n"
@@ -125,20 +252,20 @@ msgid ""
"\n"
msgstr "Поред тога, BridgeDB има пуно најобичнијих мостова %s без икаквих\nPluggable Transports %s што можда не звучи толико кул, али они ипак\nу много случајева могу помоћи да се заобиђе интернет цензура.\n"
-#: lib/bridgedb/strings.py:76
+#: bridgedb/strings.py:101
msgid "What are bridges?"
msgstr "Шта су премошћивачи?"
-#: lib/bridgedb/strings.py:77
+#: bridgedb/strings.py:102
#, python-format
msgid "%s Bridges %s are Tor relays that help you circumvent censorship."
msgstr "%s Премошћивачи %s су Тор преносници који Вам помажу да заобиђете цензуру."
-#: lib/bridgedb/strings.py:82
+#: bridgedb/strings.py:107
msgid "I need an alternative way of getting bridges!"
msgstr "Потребан ми је алтернативан начин за добијање премошћивача!"
-#: lib/bridgedb/strings.py:83
+#: bridgedb/strings.py:108
#, python-format
msgid ""
"Another way to get bridges is to send an email to %s. Please note that you must\n"
@@ -146,12 +273,12 @@ msgid ""
"%s, %s or %s."
msgstr "Још један начин добијања мостова је да се пошаље и-мејл на %s. Узмите у обзир да\nморате послате и-мејл користећи адресу једног од следећих и-мејл провајдера.\n%s, %s или %s."
-#: lib/bridgedb/strings.py:90
+#: bridgedb/strings.py:115
msgid "My bridges don't work! I need help!"
msgstr "Моји премошћивачи не раде! Потребна ми је помоћ!"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:92
+#: bridgedb/strings.py:117
#, python-format
msgid "If your Tor doesn't work, you should email %s."
msgstr "Ако Ваш Тор не ради, пошаљите електронску пошту %s."
@@ -159,48 +286,48 @@ msgstr "Ако Ваш Тор не ради, пошаљите електронс
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:96
+#: bridgedb/strings.py:121
msgid ""
"Try including as much info about your case as you can, including the list of\n"
"bridges and Pluggable Transports you tried to use, your Tor Browser version,\n"
"and any messages which Tor gave out, etc."
msgstr "Unesite što više informacija o vašem slučaju, uključujući: spisak\nmostova i priključivih transporta koje ste pokušali da koristite, verziju\nvašeg Tor Brauzera, bilo koju sliku koju vam je Tor izbacio, itd."
-#: lib/bridgedb/strings.py:103
+#: bridgedb/strings.py:128
msgid "Here are your bridge lines:"
msgstr "Evo vaših premošćivača:"
-#: lib/bridgedb/strings.py:104
+#: bridgedb/strings.py:129
msgid "Get Bridges!"
msgstr "Добијте премошћиваче!"
-#: lib/bridgedb/strings.py:108
+#: bridgedb/strings.py:133
msgid "Please select options for bridge type:"
msgstr "Молимо Вас, изаберите опције за врсту премошћивача:"
-#: lib/bridgedb/strings.py:109
+#: bridgedb/strings.py:134
msgid "Do you need IPv6 addresses?"
msgstr "Да ли су Вам потребне IPv6 адресе?"
-#: lib/bridgedb/strings.py:110
+#: bridgedb/strings.py:135
#, python-format
msgid "Do you need a %s?"
msgstr "Да ли Вам треба %s?"
-#: lib/bridgedb/strings.py:114
+#: bridgedb/strings.py:139
msgid "Your browser is not displaying images properly."
msgstr "Ваш прегледач не приказује слике исправно."
-#: lib/bridgedb/strings.py:115
+#: bridgedb/strings.py:140
msgid "Enter the characters from the image above..."
msgstr "Унесите знакове са слике изнад..."
-#: lib/bridgedb/strings.py:119
+#: bridgedb/strings.py:144
msgid "How to start using your bridges"
msgstr "Како да почнете са коришћењем Ваших премошћивача"
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
-#: lib/bridgedb/strings.py:121
+#: bridgedb/strings.py:146
#, python-format
msgid ""
"To enter bridges into Tor Browser, first go to the %s Tor Browser download\n"
@@ -209,21 +336,21 @@ msgid ""
msgstr "Da biste uneli mostove u Tor Brauzer, prvo idite na %s Tor Brauzer\ndownload stranicu %s , a onda sledite uputstva za preuzimanje i \nstartovanje Tor Brauzera."
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:126
+#: bridgedb/strings.py:151
msgid ""
"When the 'Tor Network Settings' dialogue pops up, click 'Configure' and follow\n"
"the wizard until it asks:"
msgstr "Када се 'Подешавања Тор мреже' дијалог појави, кликните 'Конфигуриши' и пратите упутства док не питају:"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:130
+#: bridgedb/strings.py:155
msgid ""
"Does your Internet Service Provider (ISP) block or otherwise censor connections\n"
"to the Tor network?"
msgstr "Да ли ваш интернет сервис провајдер (ИСП) блокира или на било који начин цензурише повезивање на Тор мрежу?"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:134
+#: bridgedb/strings.py:159
msgid ""
"Select 'Yes' and then click 'Next'. To configure your new bridges, copy and\n"
"paste the bridge lines into the text input box. Finally, click 'Connect', and\n"
@@ -231,153 +358,28 @@ msgid ""
"button in the 'Tor Network Settings' wizard for further assistance."
msgstr "Selektujte 'Yes' i onda kliknite na 'Next'. Da biste konfigurisali vaše nove mostove,\niskopirajte i pejstujte premošćivače u polje za unos teksta. Konačno, kliknite na\n'Connect', i spremni ste za polazak! Ako budete imali problema, kliknite na 'Help'\ndugme u 'Tor Network Settings' čarobnjaku da biste dobili dalju pomoć."
-#: lib/bridgedb/strings.py:142
+#: bridgedb/strings.py:167
msgid "Displays this message."
msgstr "Приказује ову слику."
#. TRANSLATORS: Please try to make it clear that "vanilla" here refers to the
#. same non-Pluggable Transport bridges described above as being
#. "plain-ol'-vanilla" bridges.
-#: lib/bridgedb/strings.py:146
+#: bridgedb/strings.py:171
msgid "Request vanilla bridges."
msgstr "Zahtevati vanila mostove."
-#: lib/bridgedb/strings.py:147
+#: bridgedb/strings.py:172
msgid "Request IPv6 bridges."
msgstr "Затражите IPv6 премошћиваче."
#. TRANSLATORS: Please DO NOT translate the word the word "TYPE".
-#: lib/bridgedb/strings.py:149
+#: bridgedb/strings.py:174
msgid "Request a Pluggable Transport by TYPE."
msgstr "Zahtevati Priključivi Transport po TIPU."
#. TRANSLATORS: Please DO NOT translate "BridgeDB".
#. TRANSLATORS: Please DO NOT translate "GnuPG".
-#: lib/bridgedb/strings.py:152
+#: bridgedb/strings.py:177
msgid "Get a copy of BridgeDB's public GnuPG key."
msgstr "Добијте копију BridgeDB јавног GnuPG кључа."
-
-#: lib/bridgedb/templates/base.html:89
-msgid "Report a Bug"
-msgstr "Пријавите грешку."
-
-#: lib/bridgedb/templates/base.html:92
-msgid "Source Code"
-msgstr "Изворни код"
-
-#: lib/bridgedb/templates/base.html:95
-msgid "Changelog"
-msgstr "Promena loga"
-
-#: lib/bridgedb/templates/base.html:98
-msgid "Contact"
-msgstr "Контакт"
-
-#: lib/bridgedb/templates/bridges.html:81
-msgid "Select All"
-msgstr "Обележи све"
-
-#: lib/bridgedb/templates/bridges.html:87
-msgid "Show QRCode"
-msgstr "Прикажи QRCode"
-
-#: lib/bridgedb/templates/bridges.html:100
-msgid "QRCode for your bridge lines"
-msgstr "QR kod za vaše premošćivače"
-
-#. TRANSLATORS: Please translate this into some silly way to say
-#. "There was a problem!" in your language. For example,
-#. for Italian, you might translate this into "Mama mia!",
-#. or for French: "Sacrebleu!". :)
-#: lib/bridgedb/templates/bridges.html:115
-#: lib/bridgedb/templates/bridges.html:175
-msgid "Uh oh, spaghettios!"
-msgstr "Ух, страшно!"
-
-#: lib/bridgedb/templates/bridges.html:116
-msgid "It seems there was an error getting your QRCode."
-msgstr "Došlo je do greške pri nabavljanju vašeg QR koda."
-
-#: lib/bridgedb/templates/bridges.html:121
-msgid ""
-"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
-" your bridge lines onto mobile and other devices."
-msgstr "QR kod sadrži vaše premošćivače. Skenirajte ga sa čitačem QR koda da biste iskopirali vaše premošćivače na mobilne kao i druge uređaje."
-
-#: lib/bridgedb/templates/bridges.html:181
-msgid "There currently aren't any bridges available..."
-msgstr "Тренутно нема доступних премошћивача..."
-
-#: lib/bridgedb/templates/bridges.html:182
-#, python-format
-msgid ""
-" Perhaps you should try %s going back %s and choosing a different bridge "
-"type!"
-msgstr "Можда бисте требали да покушате %s да се вратите %s и изаберете другу врсту премошћивача!"
-
-#: lib/bridgedb/templates/index.html:11
-#, python-format
-msgid "Step %s1%s"
-msgstr "Корак %s1%s"
-
-#: lib/bridgedb/templates/index.html:13
-#, python-format
-msgid "Download %s Tor Browser %s"
-msgstr "Преузмите %s Тор прегледач %s"
-
-#: lib/bridgedb/templates/index.html:25
-#, python-format
-msgid "Step %s2%s"
-msgstr "Корак %s2%s"
-
-#: lib/bridgedb/templates/index.html:27
-#, python-format
-msgid "Get %s bridges %s"
-msgstr "Добијте %s премошћиваче %s"
-
-#: lib/bridgedb/templates/index.html:36
-#, python-format
-msgid "Step %s3%s"
-msgstr "Корак %s3%s"
-
-#: lib/bridgedb/templates/index.html:38
-#, python-format
-msgid "Now %s add the bridges to Tor Browser %s"
-msgstr "Сада %s додајте премошћиваче у Тор прегледач %s"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. (These are used to insert HTML5 underlining tags, to mark accesskeys
-#. for disabled users.)
-#: lib/bridgedb/templates/options.html:38
-#, python-format
-msgid "%sJ%sust give me bridges!"
-msgstr "%sС%sамо ми дај премошћиваче!"
-
-#: lib/bridgedb/templates/options.html:52
-msgid "Advanced Options"
-msgstr "Напредне опције"
-
-#: lib/bridgedb/templates/options.html:88
-msgid "No"
-msgstr "Не"
-
-#: lib/bridgedb/templates/options.html:89
-msgid "none"
-msgstr "нема"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
-#: lib/bridgedb/templates/options.html:127
-#, python-format
-msgid "%sY%ses!"
-msgstr "%sТ%sо!"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Please do NOT translate the word "bridge"!
-#: lib/bridgedb/templates/options.html:151
-#, python-format
-msgid "%sG%set Bridges"
-msgstr "%sД%sобијте премошћиваче"
1
0

13 Oct '15
commit 4da95713438efb54f1ff6ac0d9d079e5d59973b1
Author: Translation commit bot <translation(a)torproject.org>
Date: Tue Oct 13 15:45:04 2015 +0000
Update translations for bridgedb
---
nb/LC_MESSAGES/bridgedb.po | 344 ++++++++++++++++++++++----------------------
sr/LC_MESSAGES/bridgedb.po | 338 +++++++++++++++++++++----------------------
2 files changed, 343 insertions(+), 339 deletions(-)
diff --git a/nb/LC_MESSAGES/bridgedb.po b/nb/LC_MESSAGES/bridgedb.po
index 0e00bac..2e61082 100644
--- a/nb/LC_MESSAGES/bridgedb.po
+++ b/nb/LC_MESSAGES/bridgedb.po
@@ -4,23 +4,25 @@
#
# Translators:
# Allan Nordhøy <epost(a)anotheragency.no>, 2014
-# Erik Matson <erik(a)norwenglish.net>, 2015
+# Erik Matson, 2015
# Harald <haarektrans(a)gmail.com>, 2014
# Kristian Andre Henriksen <kris.andre.h(a)gmail.com>, 2015
# lateralus, 2013
+# Pål Fiksdal <plf715(a)gmail.com>, 2015
# Per Thorsheim <transifex(a)thorsheim.net>, 2015
# thor574 <thor.hovden(a)gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
-"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'POT-Creation-Date: 2015-03-19 22:13+0000\n"
-"PO-Revision-Date: 2015-06-23 12:17+0000\n"
-"Last-Translator: Erik Matson <erik(a)norwenglish.net>\n"
-"Language-Team: Norwegian Bokmål (http://www.transifex.com/projects/p/torproject/language/nb/)\n"
+"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'\n"
+"POT-Creation-Date: 2015-07-25 03:40+0000\n"
+"PO-Revision-Date: 2015-10-13 15:27+0000\n"
+"Last-Translator: Pål Fiksdal <plf715(a)gmail.com>\n"
+"Language-Team: Norwegian Bokmål (http://www.transifex.com/otf/torproject/language/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 0.9.6\n"
+"Generated-By: Babel 1.3\n"
"Language: nb\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -35,57 +37,182 @@ msgstr ""
#. "fteproxy"
#. "Tor"
#. "Tor Browser"
-#: lib/bridgedb/HTTPServer.py:107
+#: bridgedb/https/server.py:167
msgid "Sorry! Something went wrong with your request."
-msgstr "Dette var leit! Noe gikk galt med forespørselen din."
+msgstr "Beklager! Noe gikk galt med forespørselen din."
-#: lib/bridgedb/strings.py:18
+#: bridgedb/https/templates/base.html:79
+msgid "Report a Bug"
+msgstr "Rapporter en feil"
+
+#: bridgedb/https/templates/base.html:82
+msgid "Source Code"
+msgstr "Kildekode"
+
+#: bridgedb/https/templates/base.html:85
+msgid "Changelog"
+msgstr "Endringslogg"
+
+#: bridgedb/https/templates/base.html:88
+msgid "Contact"
+msgstr "Kontakt"
+
+#: bridgedb/https/templates/bridges.html:35
+msgid "Select All"
+msgstr "Velg alle"
+
+#: bridgedb/https/templates/bridges.html:40
+msgid "Show QRCode"
+msgstr "Vis QR kode"
+
+#: bridgedb/https/templates/bridges.html:52
+msgid "QRCode for your bridge lines"
+msgstr "QR kode for dine brolinjer"
+
+#. TRANSLATORS: Please translate this into some silly way to say
+#. "There was a problem!" in your language. For example,
+#. for Italian, you might translate this into "Mama mia!",
+#. or for French: "Sacrebleu!". :)
+#: bridgedb/https/templates/bridges.html:67
+#: bridgedb/https/templates/bridges.html:125
+msgid "Uh oh, spaghettios!"
+msgstr "Oisann!"
+
+#: bridgedb/https/templates/bridges.html:68
+msgid "It seems there was an error getting your QRCode."
+msgstr "Det oppsto en feil ved innhenting av din QR kode."
+
+#: bridgedb/https/templates/bridges.html:73
+msgid ""
+"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
+" your bridge lines onto mobile and other devices."
+msgstr "Denne QR koden inneholder dine brolinjer. Skann den med en QR leser for å kopiere dine brolinjer over på mobile og andre enheter."
+
+#: bridgedb/https/templates/bridges.html:131
+msgid "There currently aren't any bridges available..."
+msgstr "Det er for tiden ingen tilgjengelige broer..."
+
+#: bridgedb/https/templates/bridges.html:132
+#, python-format
+msgid ""
+" Perhaps you should try %s going back %s and choosing a different bridge "
+"type!"
+msgstr "Kanskje du bør prøve %s gå tilbake til %s og velge en annen brotype!"
+
+#: bridgedb/https/templates/index.html:11
+#, python-format
+msgid "Step %s1%s"
+msgstr "Steg %s1%s"
+
+#: bridgedb/https/templates/index.html:13
+#, python-format
+msgid "Download %s Tor Browser %s"
+msgstr "Last ned %s Tor-nettleser %s"
+
+#: bridgedb/https/templates/index.html:25
+#, python-format
+msgid "Step %s2%s"
+msgstr "Steg %s2%s"
+
+#: bridgedb/https/templates/index.html:27
+#, python-format
+msgid "Get %s bridges %s"
+msgstr "Hent %s broer %s"
+
+#: bridgedb/https/templates/index.html:36
+#, python-format
+msgid "Step %s3%s"
+msgstr "Steg %s3%s"
+
+#: bridgedb/https/templates/index.html:38
+#, python-format
+msgid "Now %s add the bridges to Tor Browser %s"
+msgstr "Nå %s legg til broer til Tor-nettleser %s"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. (These are used to insert HTML5 underlining tags, to mark accesskeys
+#. for disabled users.)
+#: bridgedb/https/templates/options.html:38
+#, python-format
+msgid "%sJ%sust give me bridges!"
+msgstr "%sB%sare gi meg noen broer!"
+
+#: bridgedb/https/templates/options.html:51
+msgid "Advanced Options"
+msgstr "Avanserte valg"
+
+#: bridgedb/https/templates/options.html:86
+msgid "No"
+msgstr "Nei"
+
+#: bridgedb/https/templates/options.html:87
+msgid "none"
+msgstr "ingen"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
+#: bridgedb/https/templates/options.html:124
+#, python-format
+msgid "%sY%ses!"
+msgstr "%sJ%sa!"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Please do NOT translate the word "bridge"!
+#: bridgedb/https/templates/options.html:147
+#, python-format
+msgid "%sG%set Bridges"
+msgstr "%sT%silknytt broer"
+
+#: bridgedb/strings.py:43
msgid "[This is an automated message; please do not reply.]"
msgstr "[Dette er en automatisert melding; vennligst ikke svar.]"
-#: lib/bridgedb/strings.py:20
+#: bridgedb/strings.py:45
msgid "Here are your bridges:"
msgstr "Her er dine broer:"
-#: lib/bridgedb/strings.py:22
+#: bridgedb/strings.py:47
#, python-format
msgid ""
"You have exceeded the rate limit. Please slow down! The minimum time between\n"
"emails is %s hours. All further emails during this time period will be ignored."
msgstr "Du har gått over hastighetsbegrensningen. Vennligst ta det med ro! Minste tid mellom e-poster er %s timer. Alle videre eposter i denne tidsperioden vil bli ignorert."
-#: lib/bridgedb/strings.py:25
+#: bridgedb/strings.py:50
msgid ""
"COMMANDs: (combine COMMANDs to specify multiple options simultaneously)"
msgstr "KOMMANDOer: (kombiner KOMMANDer to å angi flere valg samtidig)"
#. TRANSLATORS: Please DO NOT translate the word "BridgeDB".
-#: lib/bridgedb/strings.py:28
+#: bridgedb/strings.py:53
msgid "Welcome to BridgeDB!"
msgstr "Velkommen til BridgeDB!"
#. TRANSLATORS: Please DO NOT translate the words "transport" or "TYPE".
-#: lib/bridgedb/strings.py:30
+#: bridgedb/strings.py:55
msgid "Currently supported transport TYPEs:"
msgstr "Nåværende støttede transport TYPEr:"
-#: lib/bridgedb/strings.py:31
+#: bridgedb/strings.py:56
#, python-format
msgid "Hey, %s!"
msgstr "Hei, %s!"
-#: lib/bridgedb/strings.py:32
+#: bridgedb/strings.py:57
msgid "Hello, friend!"
msgstr "Hallo, lille venn!"
-#: lib/bridgedb/strings.py:33 lib/bridgedb/templates/base.html:100
+#: bridgedb/strings.py:58 bridgedb/https/templates/base.html:90
msgid "Public Keys"
msgstr "Offentlige nøkler"
#. TRANSLATORS: This string will end up saying something like:
#. "This email was generated with rainbows, unicorns, and sparkles
#. for alice(a)example.com on Friday, 09 May, 2014 at 18:59:39."
-#: lib/bridgedb/strings.py:37
+#: bridgedb/strings.py:62
#, python-format
msgid ""
"This email was generated with rainbows, unicorns, and sparkles\n"
@@ -96,7 +223,7 @@ msgstr "Denne e-posten ble laget med regnbuer, enhjørninger og stjerneskudd for
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor".
#. TRANSLATORS: Please DO NOT translate "Tor Network".
-#: lib/bridgedb/strings.py:47
+#: bridgedb/strings.py:72
#, python-format
msgid ""
"BridgeDB can provide bridges with several %stypes of Pluggable Transports%s,\n"
@@ -107,7 +234,7 @@ msgid ""
msgstr "I BridgeDB finnes broer med flere %styper av pluggbare transporter%s,\nsom kan hjelpe deg med å tilsløre dine tilkoblinger til Tor-nettverket, noe som gjør det\nvanskelig for noen som overvåker din internett-trafikk å fastsette hvorvidt du\nbruker Tor eller ei\n\n"
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
-#: lib/bridgedb/strings.py:54
+#: bridgedb/strings.py:79
msgid ""
"Some bridges with IPv6 addresses are also available, though some Pluggable\n"
"Transports aren't IPv6 compatible.\n"
@@ -119,7 +246,7 @@ msgstr "Noen broer med IPv6-adresser er også tilgjelgelige, dog er noen pluggba
#. regular, or unexciting". Like vanilla ice cream. It refers to bridges
#. which do not have Pluggable Transports, and only speak the regular,
#. boring Tor protocol. Translate it as you see fit. Have fun with it.
-#: lib/bridgedb/strings.py:63
+#: bridgedb/strings.py:88
#, python-format
msgid ""
"Additionally, BridgeDB has plenty of plain-ol'-vanilla bridges %s without any\n"
@@ -128,20 +255,20 @@ msgid ""
"\n"
msgstr "Merk også, BridgeDB har massevis av standardbroer med fabrikkoppsett %s uten\nnoen pluggbare transporter %s hvilket kanskje ikke høres så tøft ut, men de kan fremdeles\nbehjelpe omgåelse av internettsensur i de fleste fall.\n\n"
-#: lib/bridgedb/strings.py:76
+#: bridgedb/strings.py:101
msgid "What are bridges?"
msgstr "Hva er broer?"
-#: lib/bridgedb/strings.py:77
+#: bridgedb/strings.py:102
#, python-format
msgid "%s Bridges %s are Tor relays that help you circumvent censorship."
msgstr "%s Broer %s er Tor-tilknyttninger som hjelper deg med å omgå sensur."
-#: lib/bridgedb/strings.py:82
+#: bridgedb/strings.py:107
msgid "I need an alternative way of getting bridges!"
msgstr "Jeg trenger en alternativ måte å få broer på!"
-#: lib/bridgedb/strings.py:83
+#: bridgedb/strings.py:108
#, python-format
msgid ""
"Another way to get bridges is to send an email to %s. Please note that you must\n"
@@ -149,12 +276,12 @@ msgid ""
"%s, %s or %s."
msgstr "En annen måte tilknytte seg broer er å sende en e-post til %s. Merk at du må sende\ne-post fra en adresse tilhørende en av følgende e-posttilbydere:\n%s, %s eller %s."
-#: lib/bridgedb/strings.py:90
+#: bridgedb/strings.py:115
msgid "My bridges don't work! I need help!"
msgstr "Broene mine virker ikke! Jeg trenger hjelp!"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:92
+#: bridgedb/strings.py:117
#, python-format
msgid "If your Tor doesn't work, you should email %s."
msgstr "Hvis din Tor ikke virker, burde du skrive epost til %s."
@@ -162,48 +289,48 @@ msgstr "Hvis din Tor ikke virker, burde du skrive epost til %s."
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:96
+#: bridgedb/strings.py:121
msgid ""
"Try including as much info about your case as you can, including the list of\n"
"bridges and Pluggable Transports you tried to use, your Tor Browser version,\n"
"and any messages which Tor gave out, etc."
msgstr "Prøv å få med så mye info om dit tilfelle du kan, inkludert en liste over\nbroene og pluggbare transporter du prøvde å bruke, din Tor-nettleser-versjon,\nog alle meldinger Tor måtte produsere, osv."
-#: lib/bridgedb/strings.py:103
+#: bridgedb/strings.py:128
msgid "Here are your bridge lines:"
msgstr "Her er dine bro-linjer:"
-#: lib/bridgedb/strings.py:104
+#: bridgedb/strings.py:129
msgid "Get Bridges!"
msgstr "Få broer!"
-#: lib/bridgedb/strings.py:108
+#: bridgedb/strings.py:133
msgid "Please select options for bridge type:"
msgstr "Gjør valg for brotype:"
-#: lib/bridgedb/strings.py:109
+#: bridgedb/strings.py:134
msgid "Do you need IPv6 addresses?"
msgstr "Trenger du IPv6-adresser?"
-#: lib/bridgedb/strings.py:110
+#: bridgedb/strings.py:135
#, python-format
msgid "Do you need a %s?"
msgstr "Trenger du en %s?"
-#: lib/bridgedb/strings.py:114
+#: bridgedb/strings.py:139
msgid "Your browser is not displaying images properly."
msgstr "Nettleseren din viser ikke bilder ordentlig."
-#: lib/bridgedb/strings.py:115
+#: bridgedb/strings.py:140
msgid "Enter the characters from the image above..."
msgstr "Skriv inn bokstavene fra bildet ovenfor..."
-#: lib/bridgedb/strings.py:119
+#: bridgedb/strings.py:144
msgid "How to start using your bridges"
msgstr "Hvordan starte med bruk av dine broer"
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
-#: lib/bridgedb/strings.py:121
+#: bridgedb/strings.py:146
#, python-format
msgid ""
"To enter bridges into Tor Browser, first go to the %s Tor Browser download\n"
@@ -212,175 +339,50 @@ msgid ""
msgstr "For å sette opp broer i Tor Browser, først gå til %s Tor Browser download\nsiden %s følg så instruksene for nedlasting og start av Tor Browser."
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:126
+#: bridgedb/strings.py:151
msgid ""
"When the 'Tor Network Settings' dialogue pops up, click 'Configure' and follow\n"
"the wizard until it asks:"
msgstr "Når 'Tor nettverks-innstillinger' dialogboksen spretter opp, trykk på 'oppsett' og følg\nveiviseren til den forespør:"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:130
+#: bridgedb/strings.py:155
msgid ""
"Does your Internet Service Provider (ISP) block or otherwise censor connections\n"
"to the Tor network?"
msgstr "Sensurerer, eller blokkerer på annen måte, din internetttilbyder (ISP) tilkoblinger\ntil Tor-nettverket?"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:134
+#: bridgedb/strings.py:159
msgid ""
"Select 'Yes' and then click 'Next'. To configure your new bridges, copy and\n"
"paste the bridge lines into the text input box. Finally, click 'Connect', and\n"
"you should be good to go! If you experience trouble, try clicking the 'Help'\n"
"button in the 'Tor Network Settings' wizard for further assistance."
-msgstr "Velg 'Ja' og klikk så 'Neste'. For å sette opp nye broer, kopier og\nlim inn brolinjene i tekstboksen. Til slutt, trykk 'Koble til', og\ndu burde være klar til kamp! Hvis du får problemer, trykk 'Hjelp'\n-knappen i \"Tor-nettverksinnstillinger'-veiviseren for ytterligere hjelp."
+msgstr "Velg 'Ja' og klikk så 'Neste'. For å konfigurere de nye broene dine, kopier og\nlim inn brolinjene i tekstboksen. Til slutt, trykk 'Koble til', og\ndu burde være klar til kamp! Hvis du får problemer, trykk 'Hjelp'\n-knappen i \"Tor-nettverksinnstillinger'-veiviseren for ytterligere hjelp."
-#: lib/bridgedb/strings.py:142
+#: bridgedb/strings.py:167
msgid "Displays this message."
msgstr "Vis denne meldingen."
#. TRANSLATORS: Please try to make it clear that "vanilla" here refers to the
#. same non-Pluggable Transport bridges described above as being
#. "plain-ol'-vanilla" bridges.
-#: lib/bridgedb/strings.py:146
+#: bridgedb/strings.py:171
msgid "Request vanilla bridges."
msgstr "Be om broer med \"vanilla\" fabrikkoppsett."
-#: lib/bridgedb/strings.py:147
+#: bridgedb/strings.py:172
msgid "Request IPv6 bridges."
msgstr "Etterspør IPv6-broer."
#. TRANSLATORS: Please DO NOT translate the word the word "TYPE".
-#: lib/bridgedb/strings.py:149
+#: bridgedb/strings.py:174
msgid "Request a Pluggable Transport by TYPE."
msgstr "Be om en pluggbar transport etter TYPE."
#. TRANSLATORS: Please DO NOT translate "BridgeDB".
#. TRANSLATORS: Please DO NOT translate "GnuPG".
-#: lib/bridgedb/strings.py:152
+#: bridgedb/strings.py:177
msgid "Get a copy of BridgeDB's public GnuPG key."
msgstr "Få kopi av BridgeDBs offentlige GnuPG-nøkkel."
-
-#: lib/bridgedb/templates/base.html:89
-msgid "Report a Bug"
-msgstr "Rapporter en feil"
-
-#: lib/bridgedb/templates/base.html:92
-msgid "Source Code"
-msgstr "Kildekode"
-
-#: lib/bridgedb/templates/base.html:95
-msgid "Changelog"
-msgstr "Endringslogg"
-
-#: lib/bridgedb/templates/base.html:98
-msgid "Contact"
-msgstr "Kontakt"
-
-#: lib/bridgedb/templates/bridges.html:81
-msgid "Select All"
-msgstr "Velg alle"
-
-#: lib/bridgedb/templates/bridges.html:87
-msgid "Show QRCode"
-msgstr "Vis QR kode"
-
-#: lib/bridgedb/templates/bridges.html:100
-msgid "QRCode for your bridge lines"
-msgstr "QR kode for dine brolinjer"
-
-#. TRANSLATORS: Please translate this into some silly way to say
-#. "There was a problem!" in your language. For example,
-#. for Italian, you might translate this into "Mama mia!",
-#. or for French: "Sacrebleu!". :)
-#: lib/bridgedb/templates/bridges.html:115
-#: lib/bridgedb/templates/bridges.html:175
-msgid "Uh oh, spaghettios!"
-msgstr "Oisann!"
-
-#: lib/bridgedb/templates/bridges.html:116
-msgid "It seems there was an error getting your QRCode."
-msgstr "Det oppsto en feil ved innhenting av din QR kode."
-
-#: lib/bridgedb/templates/bridges.html:121
-msgid ""
-"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
-" your bridge lines onto mobile and other devices."
-msgstr "Denne QR koden inneholder dine brolinjer. Skann den med en QR leser for å kopiere dine brolinjer over på mobile og andre enheter."
-
-#: lib/bridgedb/templates/bridges.html:181
-msgid "There currently aren't any bridges available..."
-msgstr "Det er for tiden ingen tilgjengelige broer..."
-
-#: lib/bridgedb/templates/bridges.html:182
-#, python-format
-msgid ""
-" Perhaps you should try %s going back %s and choosing a different bridge "
-"type!"
-msgstr "Kanskje du bør prøve %s gå tilbake til %s og velge en annen brotype!"
-
-#: lib/bridgedb/templates/index.html:11
-#, python-format
-msgid "Step %s1%s"
-msgstr "Steg %s1%s"
-
-#: lib/bridgedb/templates/index.html:13
-#, python-format
-msgid "Download %s Tor Browser %s"
-msgstr "Last ned %s Tor-nettleser %s"
-
-#: lib/bridgedb/templates/index.html:25
-#, python-format
-msgid "Step %s2%s"
-msgstr "Steg %s2%s"
-
-#: lib/bridgedb/templates/index.html:27
-#, python-format
-msgid "Get %s bridges %s"
-msgstr "Hent %s broer %s"
-
-#: lib/bridgedb/templates/index.html:36
-#, python-format
-msgid "Step %s3%s"
-msgstr "Steg %s3%s"
-
-#: lib/bridgedb/templates/index.html:38
-#, python-format
-msgid "Now %s add the bridges to Tor Browser %s"
-msgstr "Nå %s legg til broer til Tor-nettleser %s"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. (These are used to insert HTML5 underlining tags, to mark accesskeys
-#. for disabled users.)
-#: lib/bridgedb/templates/options.html:38
-#, python-format
-msgid "%sJ%sust give me bridges!"
-msgstr "%sB%sare gi meg noen broer!"
-
-#: lib/bridgedb/templates/options.html:52
-msgid "Advanced Options"
-msgstr "Avanserte valg"
-
-#: lib/bridgedb/templates/options.html:88
-msgid "No"
-msgstr "Nei"
-
-#: lib/bridgedb/templates/options.html:89
-msgid "none"
-msgstr "ingen"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
-#: lib/bridgedb/templates/options.html:127
-#, python-format
-msgid "%sY%ses!"
-msgstr "%sJ%sa!"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Please do NOT translate the word "bridge"!
-#: lib/bridgedb/templates/options.html:151
-#, python-format
-msgid "%sG%set Bridges"
-msgstr "%sT%silknytt broer"
diff --git a/sr/LC_MESSAGES/bridgedb.po b/sr/LC_MESSAGES/bridgedb.po
index 105597e..f1b0c85 100644
--- a/sr/LC_MESSAGES/bridgedb.po
+++ b/sr/LC_MESSAGES/bridgedb.po
@@ -5,19 +5,21 @@
# Translators:
# obj.petit.a, 2014
# Ivan Radeljic <radeljicivan85(a)gmail.com>, 2014-2015
+# Lidija <llazic.bgd(a)gmail.com>, 2015
# Milenko Doder <milenko.doder(a)gmail.com>, 2015
# obj.petit.a, 2014
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
-"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'POT-Creation-Date: 2015-03-19 22:13+0000\n"
-"PO-Revision-Date: 2015-07-10 09:32+0000\n"
-"Last-Translator: Milenko Doder <milenko.doder(a)gmail.com>\n"
-"Language-Team: Serbian (http://www.transifex.com/p/torproject/language/sr/)\n"
+"Report-Msgid-Bugs-To: 'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB&keywo…'\n"
+"POT-Creation-Date: 2015-07-25 03:40+0000\n"
+"PO-Revision-Date: 2015-10-13 15:42+0000\n"
+"Last-Translator: Lidija <llazic.bgd(a)gmail.com>\n"
+"Language-Team: Serbian (http://www.transifex.com/otf/torproject/language/sr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 0.9.6\n"
+"Generated-By: Babel 1.3\n"
"Language: sr\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
@@ -32,57 +34,182 @@ msgstr ""
#. "fteproxy"
#. "Tor"
#. "Tor Browser"
-#: lib/bridgedb/HTTPServer.py:107
+#: bridgedb/https/server.py:167
msgid "Sorry! Something went wrong with your request."
msgstr "Извините! Нешто се лоше десило са вашим захтевом."
-#: lib/bridgedb/strings.py:18
+#: bridgedb/https/templates/base.html:79
+msgid "Report a Bug"
+msgstr "Пријавите грешку."
+
+#: bridgedb/https/templates/base.html:82
+msgid "Source Code"
+msgstr "Изворни код"
+
+#: bridgedb/https/templates/base.html:85
+msgid "Changelog"
+msgstr "Promena loga"
+
+#: bridgedb/https/templates/base.html:88
+msgid "Contact"
+msgstr "Контакт"
+
+#: bridgedb/https/templates/bridges.html:35
+msgid "Select All"
+msgstr "Обележи све"
+
+#: bridgedb/https/templates/bridges.html:40
+msgid "Show QRCode"
+msgstr "Прикажи QRCode"
+
+#: bridgedb/https/templates/bridges.html:52
+msgid "QRCode for your bridge lines"
+msgstr "QR код за ваше премошћиваче"
+
+#. TRANSLATORS: Please translate this into some silly way to say
+#. "There was a problem!" in your language. For example,
+#. for Italian, you might translate this into "Mama mia!",
+#. or for French: "Sacrebleu!". :)
+#: bridgedb/https/templates/bridges.html:67
+#: bridgedb/https/templates/bridges.html:125
+msgid "Uh oh, spaghettios!"
+msgstr "Ух, страшно!"
+
+#: bridgedb/https/templates/bridges.html:68
+msgid "It seems there was an error getting your QRCode."
+msgstr "Дошло је до грешке при набавлјању вашег QR kода."
+
+#: bridgedb/https/templates/bridges.html:73
+msgid ""
+"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
+" your bridge lines onto mobile and other devices."
+msgstr "QR код садржи ваше премошћиваче. Скенирајет га са читаћем QR кода да бисте ископирали ваше премошћиваче на моблине као и на друге уређаје."
+
+#: bridgedb/https/templates/bridges.html:131
+msgid "There currently aren't any bridges available..."
+msgstr "Тренутно нема доступних премошћивача..."
+
+#: bridgedb/https/templates/bridges.html:132
+#, python-format
+msgid ""
+" Perhaps you should try %s going back %s and choosing a different bridge "
+"type!"
+msgstr "Можда бисте требали да покушате %s да се вратите %s и изаберете другу врсту премошћивача!"
+
+#: bridgedb/https/templates/index.html:11
+#, python-format
+msgid "Step %s1%s"
+msgstr "Корак %s1%s"
+
+#: bridgedb/https/templates/index.html:13
+#, python-format
+msgid "Download %s Tor Browser %s"
+msgstr "Преузмите %s Тор прегледач %s"
+
+#: bridgedb/https/templates/index.html:25
+#, python-format
+msgid "Step %s2%s"
+msgstr "Корак %s2%s"
+
+#: bridgedb/https/templates/index.html:27
+#, python-format
+msgid "Get %s bridges %s"
+msgstr "Добијте %s премошћиваче %s"
+
+#: bridgedb/https/templates/index.html:36
+#, python-format
+msgid "Step %s3%s"
+msgstr "Корак %s3%s"
+
+#: bridgedb/https/templates/index.html:38
+#, python-format
+msgid "Now %s add the bridges to Tor Browser %s"
+msgstr "Сада %s додајте премошћиваче у Тор прегледач %s"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. (These are used to insert HTML5 underlining tags, to mark accesskeys
+#. for disabled users.)
+#: bridgedb/https/templates/options.html:38
+#, python-format
+msgid "%sJ%sust give me bridges!"
+msgstr "%sС%sамо ми дај премошћиваче!"
+
+#: bridgedb/https/templates/options.html:51
+msgid "Advanced Options"
+msgstr "Напредне опције"
+
+#: bridgedb/https/templates/options.html:86
+msgid "No"
+msgstr "Не"
+
+#: bridgedb/https/templates/options.html:87
+msgid "none"
+msgstr "нема"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
+#: bridgedb/https/templates/options.html:124
+#, python-format
+msgid "%sY%ses!"
+msgstr "%sТ%sо!"
+
+#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
+#. beginning of words are present in your final translation. Thanks!
+#. TRANSLATORS: Please do NOT translate the word "bridge"!
+#: bridgedb/https/templates/options.html:147
+#, python-format
+msgid "%sG%set Bridges"
+msgstr "%sД%sобијте премошћиваче"
+
+#: bridgedb/strings.py:43
msgid "[This is an automated message; please do not reply.]"
msgstr "[Ово је аутоматска порука; молимо вас да не одговарате.]"
-#: lib/bridgedb/strings.py:20
+#: bridgedb/strings.py:45
msgid "Here are your bridges:"
msgstr "Ево Ваших премошћивача:"
-#: lib/bridgedb/strings.py:22
+#: bridgedb/strings.py:47
#, python-format
msgid ""
"You have exceeded the rate limit. Please slow down! The minimum time between\n"
"emails is %s hours. All further emails during this time period will be ignored."
msgstr "Достигли сте ваш лимит. Молим, успорите! Минимално време између\nе-поште је %s сати. Сва наредна е-пошта током овог периода биће игнорисана. "
-#: lib/bridgedb/strings.py:25
+#: bridgedb/strings.py:50
msgid ""
"COMMANDs: (combine COMMANDs to specify multiple options simultaneously)"
msgstr "COMMANDs: (комбинујте COMMANDs да одредите вишеструке опције истовремено)"
#. TRANSLATORS: Please DO NOT translate the word "BridgeDB".
-#: lib/bridgedb/strings.py:28
+#: bridgedb/strings.py:53
msgid "Welcome to BridgeDB!"
msgstr "Добродошли у BridgeDB!"
#. TRANSLATORS: Please DO NOT translate the words "transport" or "TYPE".
-#: lib/bridgedb/strings.py:30
+#: bridgedb/strings.py:55
msgid "Currently supported transport TYPEs:"
msgstr "Тренутно подржани transport TYPEs:"
-#: lib/bridgedb/strings.py:31
+#: bridgedb/strings.py:56
#, python-format
msgid "Hey, %s!"
msgstr "Здраво, %s!"
-#: lib/bridgedb/strings.py:32
+#: bridgedb/strings.py:57
msgid "Hello, friend!"
msgstr "Здраво, пријатељу!"
-#: lib/bridgedb/strings.py:33 lib/bridgedb/templates/base.html:100
+#: bridgedb/strings.py:58 bridgedb/https/templates/base.html:90
msgid "Public Keys"
msgstr "Јавни кључеви"
#. TRANSLATORS: This string will end up saying something like:
#. "This email was generated with rainbows, unicorns, and sparkles
#. for alice(a)example.com on Friday, 09 May, 2014 at 18:59:39."
-#: lib/bridgedb/strings.py:37
+#: bridgedb/strings.py:62
#, python-format
msgid ""
"This email was generated with rainbows, unicorns, and sparkles\n"
@@ -93,7 +220,7 @@ msgstr "Ова е-пошта је направљена са дугама, јед
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor".
#. TRANSLATORS: Please DO NOT translate "Tor Network".
-#: lib/bridgedb/strings.py:47
+#: bridgedb/strings.py:72
#, python-format
msgid ""
"BridgeDB can provide bridges with several %stypes of Pluggable Transports%s,\n"
@@ -104,7 +231,7 @@ msgid ""
msgstr "BridgeDB може обезбедити мостове са више %s типова Pluggable Transports %s,\nшто може помоћи прикривању ваших конекција са Тор Мрежом да би било коме ко\nпосматра ваш интенет саобраћај било теже да утврди да користите Тор.\n\n"
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
-#: lib/bridgedb/strings.py:54
+#: bridgedb/strings.py:79
msgid ""
"Some bridges with IPv6 addresses are also available, though some Pluggable\n"
"Transports aren't IPv6 compatible.\n"
@@ -116,7 +243,7 @@ msgstr "Неки мостови са IPv6 адресама су такође д
#. regular, or unexciting". Like vanilla ice cream. It refers to bridges
#. which do not have Pluggable Transports, and only speak the regular,
#. boring Tor protocol. Translate it as you see fit. Have fun with it.
-#: lib/bridgedb/strings.py:63
+#: bridgedb/strings.py:88
#, python-format
msgid ""
"Additionally, BridgeDB has plenty of plain-ol'-vanilla bridges %s without any\n"
@@ -125,20 +252,20 @@ msgid ""
"\n"
msgstr "Поред тога, BridgeDB има пуно најобичнијих мостова %s без икаквих\nPluggable Transports %s што можда не звучи толико кул, али они ипак\nу много случајева могу помоћи да се заобиђе интернет цензура.\n"
-#: lib/bridgedb/strings.py:76
+#: bridgedb/strings.py:101
msgid "What are bridges?"
msgstr "Шта су премошћивачи?"
-#: lib/bridgedb/strings.py:77
+#: bridgedb/strings.py:102
#, python-format
msgid "%s Bridges %s are Tor relays that help you circumvent censorship."
msgstr "%s Премошћивачи %s су Тор преносници који Вам помажу да заобиђете цензуру."
-#: lib/bridgedb/strings.py:82
+#: bridgedb/strings.py:107
msgid "I need an alternative way of getting bridges!"
msgstr "Потребан ми је алтернативан начин за добијање премошћивача!"
-#: lib/bridgedb/strings.py:83
+#: bridgedb/strings.py:108
#, python-format
msgid ""
"Another way to get bridges is to send an email to %s. Please note that you must\n"
@@ -146,12 +273,12 @@ msgid ""
"%s, %s or %s."
msgstr "Још један начин добијања мостова је да се пошаље и-мејл на %s. Узмите у обзир да\nморате послате и-мејл користећи адресу једног од следећих и-мејл провајдера.\n%s, %s или %s."
-#: lib/bridgedb/strings.py:90
+#: bridgedb/strings.py:115
msgid "My bridges don't work! I need help!"
msgstr "Моји премошћивачи не раде! Потребна ми је помоћ!"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:92
+#: bridgedb/strings.py:117
#, python-format
msgid "If your Tor doesn't work, you should email %s."
msgstr "Ако Ваш Тор не ради, пошаљите електронску пошту %s."
@@ -159,48 +286,48 @@ msgstr "Ако Ваш Тор не ради, пошаљите електронс
#. TRANSLATORS: Please DO NOT translate "Pluggable Transports".
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:96
+#: bridgedb/strings.py:121
msgid ""
"Try including as much info about your case as you can, including the list of\n"
"bridges and Pluggable Transports you tried to use, your Tor Browser version,\n"
"and any messages which Tor gave out, etc."
msgstr "Unesite što više informacija o vašem slučaju, uključujući: spisak\nmostova i priključivih transporta koje ste pokušali da koristite, verziju\nvašeg Tor Brauzera, bilo koju sliku koju vam je Tor izbacio, itd."
-#: lib/bridgedb/strings.py:103
+#: bridgedb/strings.py:128
msgid "Here are your bridge lines:"
msgstr "Evo vaših premošćivača:"
-#: lib/bridgedb/strings.py:104
+#: bridgedb/strings.py:129
msgid "Get Bridges!"
msgstr "Добијте премошћиваче!"
-#: lib/bridgedb/strings.py:108
+#: bridgedb/strings.py:133
msgid "Please select options for bridge type:"
msgstr "Молимо Вас, изаберите опције за врсту премошћивача:"
-#: lib/bridgedb/strings.py:109
+#: bridgedb/strings.py:134
msgid "Do you need IPv6 addresses?"
msgstr "Да ли су Вам потребне IPv6 адресе?"
-#: lib/bridgedb/strings.py:110
+#: bridgedb/strings.py:135
#, python-format
msgid "Do you need a %s?"
msgstr "Да ли Вам треба %s?"
-#: lib/bridgedb/strings.py:114
+#: bridgedb/strings.py:139
msgid "Your browser is not displaying images properly."
msgstr "Ваш прегледач не приказује слике исправно."
-#: lib/bridgedb/strings.py:115
+#: bridgedb/strings.py:140
msgid "Enter the characters from the image above..."
msgstr "Унесите знакове са слике изнад..."
-#: lib/bridgedb/strings.py:119
+#: bridgedb/strings.py:144
msgid "How to start using your bridges"
msgstr "Како да почнете са коришћењем Ваших премошћивача"
#. TRANSLATORS: Please DO NOT translate "Tor Browser".
-#: lib/bridgedb/strings.py:121
+#: bridgedb/strings.py:146
#, python-format
msgid ""
"To enter bridges into Tor Browser, first go to the %s Tor Browser download\n"
@@ -209,21 +336,21 @@ msgid ""
msgstr "Da biste uneli mostove u Tor Brauzer, prvo idite na %s Tor Brauzer\ndownload stranicu %s , a onda sledite uputstva za preuzimanje i \nstartovanje Tor Brauzera."
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:126
+#: bridgedb/strings.py:151
msgid ""
"When the 'Tor Network Settings' dialogue pops up, click 'Configure' and follow\n"
"the wizard until it asks:"
msgstr "Када се 'Подешавања Тор мреже' дијалог појави, кликните 'Конфигуриши' и пратите упутства док не питају:"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:130
+#: bridgedb/strings.py:155
msgid ""
"Does your Internet Service Provider (ISP) block or otherwise censor connections\n"
"to the Tor network?"
msgstr "Да ли ваш интернет сервис провајдер (ИСП) блокира или на било који начин цензурише повезивање на Тор мрежу?"
#. TRANSLATORS: Please DO NOT translate "Tor".
-#: lib/bridgedb/strings.py:134
+#: bridgedb/strings.py:159
msgid ""
"Select 'Yes' and then click 'Next'. To configure your new bridges, copy and\n"
"paste the bridge lines into the text input box. Finally, click 'Connect', and\n"
@@ -231,153 +358,28 @@ msgid ""
"button in the 'Tor Network Settings' wizard for further assistance."
msgstr "Selektujte 'Yes' i onda kliknite na 'Next'. Da biste konfigurisali vaše nove mostove,\niskopirajte i pejstujte premošćivače u polje za unos teksta. Konačno, kliknite na\n'Connect', i spremni ste za polazak! Ako budete imali problema, kliknite na 'Help'\ndugme u 'Tor Network Settings' čarobnjaku da biste dobili dalju pomoć."
-#: lib/bridgedb/strings.py:142
+#: bridgedb/strings.py:167
msgid "Displays this message."
msgstr "Приказује ову слику."
#. TRANSLATORS: Please try to make it clear that "vanilla" here refers to the
#. same non-Pluggable Transport bridges described above as being
#. "plain-ol'-vanilla" bridges.
-#: lib/bridgedb/strings.py:146
+#: bridgedb/strings.py:171
msgid "Request vanilla bridges."
msgstr "Zahtevati vanila mostove."
-#: lib/bridgedb/strings.py:147
+#: bridgedb/strings.py:172
msgid "Request IPv6 bridges."
msgstr "Затражите IPv6 премошћиваче."
#. TRANSLATORS: Please DO NOT translate the word the word "TYPE".
-#: lib/bridgedb/strings.py:149
+#: bridgedb/strings.py:174
msgid "Request a Pluggable Transport by TYPE."
msgstr "Zahtevati Priključivi Transport po TIPU."
#. TRANSLATORS: Please DO NOT translate "BridgeDB".
#. TRANSLATORS: Please DO NOT translate "GnuPG".
-#: lib/bridgedb/strings.py:152
+#: bridgedb/strings.py:177
msgid "Get a copy of BridgeDB's public GnuPG key."
msgstr "Добијте копију BridgeDB јавног GnuPG кључа."
-
-#: lib/bridgedb/templates/base.html:89
-msgid "Report a Bug"
-msgstr "Пријавите грешку."
-
-#: lib/bridgedb/templates/base.html:92
-msgid "Source Code"
-msgstr "Изворни код"
-
-#: lib/bridgedb/templates/base.html:95
-msgid "Changelog"
-msgstr "Promena loga"
-
-#: lib/bridgedb/templates/base.html:98
-msgid "Contact"
-msgstr "Контакт"
-
-#: lib/bridgedb/templates/bridges.html:81
-msgid "Select All"
-msgstr "Обележи све"
-
-#: lib/bridgedb/templates/bridges.html:87
-msgid "Show QRCode"
-msgstr "Прикажи QRCode"
-
-#: lib/bridgedb/templates/bridges.html:100
-msgid "QRCode for your bridge lines"
-msgstr "QR kod za vaše premošćivače"
-
-#. TRANSLATORS: Please translate this into some silly way to say
-#. "There was a problem!" in your language. For example,
-#. for Italian, you might translate this into "Mama mia!",
-#. or for French: "Sacrebleu!". :)
-#: lib/bridgedb/templates/bridges.html:115
-#: lib/bridgedb/templates/bridges.html:175
-msgid "Uh oh, spaghettios!"
-msgstr "Ух, страшно!"
-
-#: lib/bridgedb/templates/bridges.html:116
-msgid "It seems there was an error getting your QRCode."
-msgstr "Došlo je do greške pri nabavljanju vašeg QR koda."
-
-#: lib/bridgedb/templates/bridges.html:121
-msgid ""
-"This QRCode contains your bridge lines. Scan it with a QRCode reader to copy"
-" your bridge lines onto mobile and other devices."
-msgstr "QR kod sadrži vaše premošćivače. Skenirajte ga sa čitačem QR koda da biste iskopirali vaše premošćivače na mobilne kao i druge uređaje."
-
-#: lib/bridgedb/templates/bridges.html:181
-msgid "There currently aren't any bridges available..."
-msgstr "Тренутно нема доступних премошћивача..."
-
-#: lib/bridgedb/templates/bridges.html:182
-#, python-format
-msgid ""
-" Perhaps you should try %s going back %s and choosing a different bridge "
-"type!"
-msgstr "Можда бисте требали да покушате %s да се вратите %s и изаберете другу врсту премошћивача!"
-
-#: lib/bridgedb/templates/index.html:11
-#, python-format
-msgid "Step %s1%s"
-msgstr "Корак %s1%s"
-
-#: lib/bridgedb/templates/index.html:13
-#, python-format
-msgid "Download %s Tor Browser %s"
-msgstr "Преузмите %s Тор прегледач %s"
-
-#: lib/bridgedb/templates/index.html:25
-#, python-format
-msgid "Step %s2%s"
-msgstr "Корак %s2%s"
-
-#: lib/bridgedb/templates/index.html:27
-#, python-format
-msgid "Get %s bridges %s"
-msgstr "Добијте %s премошћиваче %s"
-
-#: lib/bridgedb/templates/index.html:36
-#, python-format
-msgid "Step %s3%s"
-msgstr "Корак %s3%s"
-
-#: lib/bridgedb/templates/index.html:38
-#, python-format
-msgid "Now %s add the bridges to Tor Browser %s"
-msgstr "Сада %s додајте премошћиваче у Тор прегледач %s"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. (These are used to insert HTML5 underlining tags, to mark accesskeys
-#. for disabled users.)
-#: lib/bridgedb/templates/options.html:38
-#, python-format
-msgid "%sJ%sust give me bridges!"
-msgstr "%sС%sамо ми дај премошћиваче!"
-
-#: lib/bridgedb/templates/options.html:52
-msgid "Advanced Options"
-msgstr "Напредне опције"
-
-#: lib/bridgedb/templates/options.html:88
-msgid "No"
-msgstr "Не"
-
-#: lib/bridgedb/templates/options.html:89
-msgid "none"
-msgstr "нема"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Translate "Yes!" as in "Yes! I do need IPv6 addresses."
-#: lib/bridgedb/templates/options.html:127
-#, python-format
-msgid "%sY%ses!"
-msgstr "%sТ%sо!"
-
-#. TRANSLATORS: Please make sure the '%s' surrounding single letters at the
-#. beginning of words are present in your final translation. Thanks!
-#. TRANSLATORS: Please do NOT translate the word "bridge"!
-#: lib/bridgedb/templates/options.html:151
-#, python-format
-msgid "%sG%set Bridges"
-msgstr "%sД%sобијте премошћиваче"
1
0

[translation/tor-messenger-ircproperties] Update translations for tor-messenger-ircproperties
by translation@torproject.org 13 Oct '15
by translation@torproject.org 13 Oct '15
13 Oct '15
commit d3145b9c2ea4e33d1af142c50c4ce3268b119974
Author: Translation commit bot <translation(a)torproject.org>
Date: Tue Oct 13 14:46:22 2015 +0000
Update translations for tor-messenger-ircproperties
---
el/irc.properties | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/el/irc.properties b/el/irc.properties
index b68e916..84596c1 100644
--- a/el/irc.properties
+++ b/el/irc.properties
@@ -120,7 +120,7 @@ message.alreadyInChannel=%1$S is already in %2$S.
# %S is the nickname of the user who was summoned.
message.summoned=%S was summoned.
# %S is the nickname of the user whose WHOIS information follows this message.
-message.whois=WHOIS information for %S:
+message.whois=Πληροφορίες WHOIS για %S:
# %1$S is the nickname of the (offline) user whose WHOWAS information follows this message.
message.whowas=%1$S is offline. WHOWAS information for %1$S:
# %1$S is the entry description (from tooltip.*), %2$S is its value.
@@ -155,7 +155,7 @@ error.banned=You are banned from this server.
error.bannedSoon=You will soon be banned from this server.
error.mode.wrongUser=You cannot change modes for other users.
# %S is the nickname or channel name that isn't available.
-error.noSuchNick=%S is not online.
+error.noSuchNick=Ο %S δεν είναι συνδεδεμένος.
error.wasNoSuchNick=There was no nickname: %S
error.noSuchChannel=There is no channel: %S.
error.unavailable=%S is temporarily unavailable.
@@ -190,7 +190,7 @@ tooltip.secure=Using a secure connection
tooltip.away=Μακριά
tooltip.ircOp=IRC Operator
tooltip.bot=Bot
-tooltip.lastActivity=Last activity
+tooltip.lastActivity=Τελευταία δραστηριότητα
# %S is the timespan elapsed since the last activity.
tooltip.timespan=%S ago
tooltip.channels=Currently on
1
0

[translation/tails-misc] Update translations for tails-misc
by translation@torproject.org 13 Oct '15
by translation@torproject.org 13 Oct '15
13 Oct '15
commit a77050c86571c7d34316ec746a206fbce51b386e
Author: Translation commit bot <translation(a)torproject.org>
Date: Tue Oct 13 13:45:37 2015 +0000
Update translations for tails-misc
---
fr.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fr.po b/fr.po
index 487bd56..a54f836 100644
--- a/fr.po
+++ b/fr.po
@@ -20,7 +20,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-20 19:32+0200\n"
-"PO-Revision-Date: 2015-09-21 09:20+0000\n"
+"PO-Revision-Date: 2015-10-13 13:23+0000\n"
"Last-Translator: carolyn <carolyn(a)anhalt.org>\n"
"Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
1
0

[torbutton/maint-1.9.3] Revert "remove obsolete files, re Bug 1506 P0"
by gk@torproject.org 13 Oct '15
by gk@torproject.org 13 Oct '15
13 Oct '15
commit 9f37464b6f446feec96147b32b3e2f2537f93636
Author: Yan Zhu <yan(a)mit.edu>
Date: Tue Jul 29 17:08:36 2014 -0700
Revert "remove obsolete files, re Bug 1506 P0"
This reverts commit 80b06cdf422238f5eece38a1974d31e6e7be7a17.
---
src/chrome.manifest | 12 +++
src/components/tor-protocol.js | 103 ++++++++++++++++++++++
src/components/torRefSpoofer.js | 125 +++++++++++++++++++++++++++
src/components/tors-protocol.js | 103 ++++++++++++++++++++++
src/components/window-mapper.js | 180 +++++++++++++++++++++++++++++++++++++++
5 files changed, 523 insertions(+)
diff --git a/src/chrome.manifest b/src/chrome.manifest
index 8323e66..ddf582e 100644
--- a/src/chrome.manifest
+++ b/src/chrome.manifest
@@ -159,6 +159,18 @@ contract @torproject.org/torbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d
component {e33fd6d4-270f-475f-a96f-ff3140279f68} components/domain-isolator.js
contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
+# component {b985e49c-12cb-4f29-9d14-b62603332ec4} components/window-mapper.js
+# contract @torproject.org/content-window-mapper;1 {b985e49c-12cb-4f29-9d14-b62603332ec4}
+
+# component {65be2be0-ceb4-44c2-91a5-9c75c53430bf} components/torRefSpoofer.js
+# contract @torproject.org/torRefSpoofer;1 {65be2be0-ceb4-44c2-91a5-9c75c53430bf}
+
+# component {52183e20-4d4b-11de-8a39-0800200c9a66} components/tor-protocol.js
+# contract @mozilla.org/network/protocol;1?name=tor {52183e20-4d4b-11de-8a39-0800200c9a66}
+
+# component {a5a4bc50-5e8d-11de-8a39-0800200c9a66} components/tors-protocol.js
+# contract @mozilla.org/network/protocol;1?name=tors {a5a4bc50-5e8d-11de-8a39-0800200c9a66}
+
category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
category profile-after-change StartupObserver @torproject.org/startup-observer;1
category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
diff --git a/src/components/tor-protocol.js b/src/components/tor-protocol.js
new file mode 100644
index 0000000..4ba5cf4
--- /dev/null
+++ b/src/components/tor-protocol.js
@@ -0,0 +1,103 @@
+// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
+
+// Test protocol related
+const kSCHEME = "tor";
+const kPROTOCOL_NAME = "tor";
+const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
+const kPROTOCOL_CID = Components.ID("52183e20-4d4b-11de-8a39-0800200c9a66");
+
+// Mozilla defined
+const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
+const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
+const nsISupports = Components.interfaces.nsISupports;
+const nsIIOService = Components.interfaces.nsIIOService;
+const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
+const nsIURI = Components.interfaces.nsIURI;
+
+function Protocol()
+{
+}
+
+Protocol.prototype =
+{
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(nsIProtocolHandler) &&
+ !iid.equals(nsISupports))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ return this;
+ },
+
+ scheme: kSCHEME,
+ defaultPort: -1,
+ protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
+ nsIProtocolHandler.URI_NOAUTH,
+
+ allowPort: function(port, scheme)
+ {
+ return false;
+ },
+
+ newURI: function(spec, charset, baseURI)
+ {
+ const nsIStandardURL = Components.interfaces.nsIStandardURL;
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
+ uri.init(nsIStandardURL.URLTYPE_STANDARD, 80, spec, charset, baseURI);
+
+ return uri.QueryInterface(Components.interfaces.nsIURI);
+
+ },
+
+ newChannel: function(aURI)
+ {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
+ throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
+ }
+
+ /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of http.*/
+ var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
+ var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
+ .getService(Components.interfaces.nsIPromptService);
+ var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var chrome = wm.getMostRecentWindow("navigator:browser");
+ if (!ios.allowPort(aURI.port, aURI.scheme))
+ throw Components.results.NS_ERROR_FAILURE;
+
+ if (!tor_enabled)
+ {
+ var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
+ if (!result)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ chrome.torbutton_enable_tor(true);
+ }
+
+ //if tor is turned on then, else we should throw exception of some sort.
+ tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ if (!tor_enabled)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ else
+ {
+ aURI.scheme = "http";
+ return ios.newChannelFromURI(aURI);
+ }
+ },
+
+ // method of nsIClassInfo
+ classDescription: "Tor protocol handler",
+ classID: kPROTOCOL_CID,
+ contractID: kPROTOCOL_CONTRACTID,
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/torRefSpoofer.js b/src/components/torRefSpoofer.js
new file mode 100644
index 0000000..8b50075
--- /dev/null
+++ b/src/components/torRefSpoofer.js
@@ -0,0 +1,125 @@
+// Bug 1506 P0: I don't really believe referers matter in the grand scheme.
+// Kill this code.
+
+const kMODULE_CID = Components.ID("65be2be0-ceb4-44c2-91a5-9c75c53430bf");
+const kMODULE_CONTRACTID = "@torproject.org/torRefSpoofer;1";
+
+function RefSpoofer() {
+ this.logger = Components.classes["@torproject.org/torbutton-logger;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
+ this.logger.log(3, "RefSpoof component created");
+ this.specials = /[-[\]{}()*+?.,\\^$|#\s]/g;
+}
+
+
+RefSpoofer.prototype = {
+ observe: function(subject, topic, data)
+ {
+ if (topic == "http-on-modify-request") {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+
+ if (!tor_enabled)
+ return;
+
+ subject.QueryInterface(Components.interfaces.nsIHttpChannel);
+ this.onModifyRequest(subject);
+ return;
+ }
+ if (topic == "profile-after-change") {
+ this.logger.log(3, "RefSpoof got profile-after-change");
+ var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
+ os.addObserver(this, "http-on-modify-request", false);
+ return;
+ }
+ },
+ onModifyRequest: function(oHttpChannel)
+ {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+ var spoofmode = prefs.getIntPref("extensions.torbutton.refererspoof");
+
+ var ios = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+
+ if (spoofmode == 0)
+ try {
+ oHttpChannel.QueryInterface(Components.interfaces.nsIChannel);
+ var referer;
+ try{
+ referer = oHttpChannel.getRequestHeader("Referer");
+ referer = ios.newURI(referer,null,null);//make a nsIURI object for referer
+ }catch(referr) {
+ return;//no referer available or invalid uri
+ }
+ var requestURI = oHttpChannel.URI; //request nsIURI object
+ var destHost = referer.host; //referer host w/o scheme
+ var srcHost = oHttpChannel.URI.host;//request host without scheme
+
+ // match is not what we want, unless we escape dots:
+ var destHostMatch = destHost.replace(this.specials, "\\$&");
+ var srcHostMatch = srcHost.replace(this.specials, "\\$&");
+
+ // FIXME: This isn't exactly bulletproof security here, but it still
+ // may need to be more lenient not to break sites...
+ //
+ // If we suspect issues, we can try doing the following first:
+ // 1. Strip off all TLD suffixes, up to but not including '.'
+ // 2. If more than one domain part is till left, strip off prefix
+
+ //if they're in the same domain(if we can tell) or have the same host, keep the referer
+ if (srcHost.split(".").length >= destHost.split(".").length
+ && srcHost.match(destHostMatch)) // dest is a substring of src
+ return;
+ else if (destHost.split(".").length >= srcHost.split(".").length
+ && destHost.match(srcHostMatch)) // src is a substring of dest
+ return;
+ //if they do not have the same host
+ this.adjustRef(oHttpChannel, requestURI.scheme + "://" + requestURI.host);
+ this.logger.safe_log(3, "Adjusting Referer, ",
+ "from " + destHost + " to " + requestURI.host);
+ }
+ catch (ex) {
+ this.logger.log(5, "RefSpoof onModifyRequest: " +ex);
+ }
+ else if (spoofmode == 2)
+ this.adjustRef(oHttpChannel, "");
+ },
+ adjustRef: function(oChannel, sRef)
+ {
+ try {
+ if (oChannel.referrer)
+ {
+ oChannel.referrer.spec = sRef;
+ oChannel.setRequestHeader("Referer", sRef, false);
+ }
+ return true;
+ }
+ catch (ex) {
+ this.logger.log(5, "RefSpoof adjustRef: " +ex);
+ }
+ return false;
+ },
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(Components.interfaces.nsISupports) &&
+ !iid.equals(Components.interfaces.nsIObserver) &&
+ !iid.equals(Components.interfaces.nsISupportsWeakReference))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ return this;
+ },
+ _xpcom_categories: [{category:"profile-after-change"}],
+ classID: kMODULE_CID,
+ contractID: kMODULE_CONTRACTID,
+ classDescription: "Tor Ref Spoofer"
+};
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefSpoofer]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([RefSpoofer]);
diff --git a/src/components/tors-protocol.js b/src/components/tors-protocol.js
new file mode 100644
index 0000000..f075e43
--- /dev/null
+++ b/src/components/tors-protocol.js
@@ -0,0 +1,103 @@
+// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
+
+// Test protocol related
+const kSCHEME = "tors";
+const kPROTOCOL_NAME = "tors";
+const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
+const kPROTOCOL_CID = Components.ID("a5a4bc50-5e8d-11de-8a39-0800200c9a66");
+
+// Mozilla defined
+const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
+const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
+const nsISupports = Components.interfaces.nsISupports;
+const nsIIOService = Components.interfaces.nsIIOService;
+const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
+const nsIURI = Components.interfaces.nsIURI;
+
+function Protocol()
+{
+}
+
+Protocol.prototype =
+{
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(nsIProtocolHandler) &&
+ !iid.equals(nsISupports))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ return this;
+ },
+
+ scheme: kSCHEME,
+ defaultPort: -1,
+ protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
+ nsIProtocolHandler.URI_NOAUTH,
+
+ allowPort: function(port, scheme)
+ {
+ return false;
+ },
+
+ newURI: function(spec, charset, baseURI)
+ {
+ const nsIStandardURL = Components.interfaces.nsIStandardURL;
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
+ uri.init(nsIStandardURL.URLTYPE_STANDARD, 433, spec, charset, baseURI);
+
+ return uri.QueryInterface(Components.interfaces.nsIURI);
+
+ },
+
+ newChannel: function(aURI)
+ {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
+ throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
+ }
+
+ /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of https.*/
+ var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
+ var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
+ .getService(Components.interfaces.nsIPromptService);
+ var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var chrome = wm.getMostRecentWindow("navigator:browser");
+ if (!ios.allowPort(aURI.port, aURI.scheme))
+ throw Components.results.NS_ERROR_FAILURE;
+
+ if (!tor_enabled)
+ {
+ var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
+ if (!result)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ chrome.torbutton_enable_tor(true);
+ }
+
+ //if tor is turned on then, else we should throw exception of some sort.
+ tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ if (!tor_enabled)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ else
+ {
+ aURI.scheme = "https";
+ return ios.newChannelFromURI(aURI);
+ }
+ },
+
+ // method of nsIClassInfo
+ classDescription: "Tor protocol handler",
+ classID: kPROTOCOL_CID,
+ contractID: kPROTOCOL_CONTRACTID
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/window-mapper.js b/src/components/window-mapper.js
new file mode 100644
index 0000000..a04f12b
--- /dev/null
+++ b/src/components/window-mapper.js
@@ -0,0 +1,180 @@
+// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
+
+/*************************************************************************
+ * ContentWindowMapper (JavaScript XPCOM component)
+ *
+ * Allows you to find a tabbrowser tab for a top level content window.
+ *
+ *************************************************************************/
+
+// Module specific constants
+const kMODULE_NAME = "Content Window Mapper";
+const kMODULE_CONTRACTID = "@torproject.org/content-window-mapper;1";
+const kMODULE_CID = Components.ID("b985e49c-12cb-4f29-9d14-b62603332ec4");
+
+const Cr = Components.results;
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const EXPIRATION_TIME = 60000; // 60 seconds
+
+const nsISupports = Components.interfaces.nsISupports;
+const nsIClassInfo = Components.interfaces.nsIClassInfo;
+const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
+const nsIObserverService = Components.interfaces.nsIObserverService;
+
+function ContentWindowMapper() {
+ this.cache = {};
+
+ this.logger = Components.classes["@torproject.org/torbutton-logger;1"]
+ .getService(Components.interfaces.nsISupports).wrappedJSObject;
+ this.logger.log(3, "Component Load 2: Content window mapper online: "+kMODULE_CONTRACTID);
+ this.last_expired = Date.now();
+ // This JSObject is exported directly to chrome
+ this.wrappedJSObject = this;
+}
+
+ContentWindowMapper.prototype =
+{
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(nsIClassInfo) &&
+ !iid.equals(nsISupports)) {
+ Components.returnCode = Cr.NS_ERROR_NO_INTERFACE;
+ return null;
+ }
+ return this;
+ },
+
+ wrappedJSObject: null, // Initialized by constructor
+
+ // make this an nsIClassInfo object
+ flags: nsIClassInfo.DOM_OBJECT,
+
+ // method of nsIClassInfo
+ classDescription: kMODULE_NAME,
+ classID: kMODULE_CID,
+ contractID: kMODULE_CONTRACTID,
+
+ // method of nsIClassInfo
+ getInterfaces: function(count) {
+ var interfaceList = [nsIClassInfo];
+ count.value = interfaceList.length;
+ return interfaceList;
+ },
+
+ // method of nsIClassInfo
+ getHelperForLanguage: function(count) { return null; },
+
+ checkCache: function(topContentWindow) {
+ if(typeof(topContentWindow.ghetto_guid) != "undefined"
+ && typeof(this.cache[topContentWindow.ghetto_guid]) != "undefined") {
+ return this.cache[topContentWindow.ghetto_guid].browser;
+ }
+
+ return null;
+ },
+
+ addCache: function(topContentWindow, browser) {
+ var insertion = new Object();
+ insertion.browser = browser;
+ insertion.time = Date.now();
+ topContentWindow.ghetto_guid = Math.random().toString()+Math.random().toString();
+ this.cache[topContentWindow.ghetto_guid] = insertion;
+ },
+
+ expireOldCache: function() {
+ var now = Date.now();
+
+ if((now - this.last_expired) < EXPIRATION_TIME) {
+ this.logger.log(3, "Early mapper check.");
+ return;
+ }
+
+ var delkeys = [];
+ for(var elem in this.cache) {
+ if((now - this.cache[elem].time) > EXPIRATION_TIME) {
+ this.logger.log(2, "Deleting cached element: "+elem.location);
+ delkeys.push(elem);
+ }
+ }
+
+ for(var k in delkeys) {
+ delete this.cache[k];
+ }
+
+ this.last_expired = now;
+ },
+
+ getBrowserForContentWindow: function(topContentWindow) {
+ if(topContentWindow instanceof Components.interfaces.nsIDOMChromeWindow) {
+ if(topContentWindow.browserDOMWindow) {
+ var browser = topContentWindow.getBrowser().selectedTab.linkedBrowser;
+ this.logger.log(3, "Chrome browser at "
+ +browser.contentWindow.location+" found for: "
+ +topContentWindow.location);
+ return browser;
+ }
+ // Allow strange chrome to go through..
+ this.logger.log(3, "Odd chome window"+topContentWindow.location);
+ return topContentWindow;
+ }
+
+ var cached = this.checkCache(topContentWindow);
+ if(cached != null) {
+ return cached;
+ }
+
+ try {
+ this.logger.log(3, "Cache failed for: "+topContentWindow.location);
+ } catch(e) {
+ this.logger.log(3, "Cache failed for unknown location?");
+ }
+
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var enumerator = wm.getEnumerator("navigator:browser");
+ while(enumerator.hasMoreElements()) {
+ var win = enumerator.getNext();
+ var browser = win.getBrowser();
+ for (var i = 0; i < browser.browsers.length; ++i) {
+ var b = browser.browsers[i];
+ if (b && b.contentWindow == topContentWindow) {
+ this.addCache(topContentWindow, b);
+ return b;
+ }
+ }
+ }
+
+ // SpeedDial, google notebook and other extensions can create their
+ // own "<browser>" tag elements. AFAICT, there is no way to enumerate
+ // these... Just punt and return the most recently used browser
+ try {
+ if(topContentWindow.name != "speedDialLoaderBrowser") {
+ if(topContentWindow && topContentWindow.location)
+ this.logger.safe_log(4, "No browser found: ", topContentWindow.location);
+ else
+ this.logger.safe_log(4, "No browser found: ", topContentWindow.name);
+ } else {
+ this.logger.log(3, "SpeedDial browser found: "+topContentWindow.name);
+ }
+ } catch(e) {
+ this.logger.log(4, "No browser found.");
+ }
+
+ // Punt..
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
+ getService(Components.interfaces.nsIWindowMediator);
+ var recentWindow = wm.getMostRecentWindow("navigator:browser");
+ return recentWindow ? recentWindow.getBrowser().selectedTab.linkedBrowser : null;
+ }
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentWindowMapper]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([ContentWindowMapper]);
1
0

[torbutton/maint-1.9.3] Bug 9263: Spoof referer when leaving a .onion domain
by gk@torproject.org 13 Oct '15
by gk@torproject.org 13 Oct '15
13 Oct '15
commit d5234a3e37fb717d5c2f65ef039cd7872cbd1de3
Author: Yan Zhu <yan(a)mit.edu>
Date: Tue Jul 29 17:36:27 2014 -0700
Bug 9263: Spoof referer when leaving a .onion domain
---
makexpi.sh | 2 +-
src/chrome.manifest | 15 +--
src/components/tor-protocol.js | 103 ------------------
src/components/torRefSpoofer.js | 103 ++++++------------
src/components/tors-protocol.js | 103 ------------------
src/components/window-mapper.js | 180 -------------------------------
src/defaults/preferences/preferences.js | 1 -
7 files changed, 39 insertions(+), 468 deletions(-)
diff --git a/makexpi.sh b/makexpi.sh
index 4d01e2c..243fbd6 100755
--- a/makexpi.sh
+++ b/makexpi.sh
@@ -21,7 +21,7 @@ echo ---------- create $APP_NAME.xpi ----------
mkdir -p pkg
cd src
echo zip -X -9r ../pkg/$XPI_NAME ./ -x "chrome/*" -x "*.diff" -x "*.svn/*"
-zip -X -9r ../pkg/$XPI_NAME ./ -x "*.svn/*" -x "*.diff" -x "components/torRefSpoofer.js" #-x "chrome/*"
+zip -X -9r ../pkg/$XPI_NAME ./ -x "*.svn/*" -x "*.diff" #-x "chrome/*"
#mv ../$APP_NAME.jar ./chrome
#zip -9m ../pkg/$XPI_NAME chrome/$APP_NAME.jar
cd ..
diff --git a/src/chrome.manifest b/src/chrome.manifest
index ddf582e..1d3efb4 100644
--- a/src/chrome.manifest
+++ b/src/chrome.manifest
@@ -159,18 +159,11 @@ contract @torproject.org/torbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d
component {e33fd6d4-270f-475f-a96f-ff3140279f68} components/domain-isolator.js
contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
-# component {b985e49c-12cb-4f29-9d14-b62603332ec4} components/window-mapper.js
-# contract @torproject.org/content-window-mapper;1 {b985e49c-12cb-4f29-9d14-b62603332ec4}
-
-# component {65be2be0-ceb4-44c2-91a5-9c75c53430bf} components/torRefSpoofer.js
-# contract @torproject.org/torRefSpoofer;1 {65be2be0-ceb4-44c2-91a5-9c75c53430bf}
-
-# component {52183e20-4d4b-11de-8a39-0800200c9a66} components/tor-protocol.js
-# contract @mozilla.org/network/protocol;1?name=tor {52183e20-4d4b-11de-8a39-0800200c9a66}
+category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
-# component {a5a4bc50-5e8d-11de-8a39-0800200c9a66} components/tors-protocol.js
-# contract @mozilla.org/network/protocol;1?name=tors {a5a4bc50-5e8d-11de-8a39-0800200c9a66}
+component {65be2be0-ceb4-44c2-91a5-9c75c53430bf} components/torRefSpoofer.js
+contract @torproject.org/torRefSpoofer;1 {65be2be0-ceb4-44c2-91a5-9c75c53430bf}
-category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
+category profile-after-change RefSpoofer @torproject.org/torRefSpoofer;1
category profile-after-change StartupObserver @torproject.org/startup-observer;1
category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
diff --git a/src/components/tor-protocol.js b/src/components/tor-protocol.js
deleted file mode 100644
index 4ba5cf4..0000000
--- a/src/components/tor-protocol.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
-
-// Test protocol related
-const kSCHEME = "tor";
-const kPROTOCOL_NAME = "tor";
-const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
-const kPROTOCOL_CID = Components.ID("52183e20-4d4b-11de-8a39-0800200c9a66");
-
-// Mozilla defined
-const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
-const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
-const nsISupports = Components.interfaces.nsISupports;
-const nsIIOService = Components.interfaces.nsIIOService;
-const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
-const nsIURI = Components.interfaces.nsIURI;
-
-function Protocol()
-{
-}
-
-Protocol.prototype =
-{
- QueryInterface: function(iid)
- {
- if (!iid.equals(nsIProtocolHandler) &&
- !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- scheme: kSCHEME,
- defaultPort: -1,
- protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
- nsIProtocolHandler.URI_NOAUTH,
-
- allowPort: function(port, scheme)
- {
- return false;
- },
-
- newURI: function(spec, charset, baseURI)
- {
- const nsIStandardURL = Components.interfaces.nsIStandardURL;
- var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
- uri.init(nsIStandardURL.URLTYPE_STANDARD, 80, spec, charset, baseURI);
-
- return uri.QueryInterface(Components.interfaces.nsIURI);
-
- },
-
- newChannel: function(aURI)
- {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
- throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
- }
-
- /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of http.*/
- var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
- var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var chrome = wm.getMostRecentWindow("navigator:browser");
- if (!ios.allowPort(aURI.port, aURI.scheme))
- throw Components.results.NS_ERROR_FAILURE;
-
- if (!tor_enabled)
- {
- var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
- if (!result)
- throw Components.results.NS_ERROR_UNEXPECTED;
- chrome.torbutton_enable_tor(true);
- }
-
- //if tor is turned on then, else we should throw exception of some sort.
- tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- if (!tor_enabled)
- throw Components.results.NS_ERROR_UNEXPECTED;
- else
- {
- aURI.scheme = "http";
- return ios.newChannelFromURI(aURI);
- }
- },
-
- // method of nsIClassInfo
- classDescription: "Tor protocol handler",
- classID: kPROTOCOL_CID,
- contractID: kPROTOCOL_CONTRACTID,
-}
-
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/torRefSpoofer.js b/src/components/torRefSpoofer.js
index 8b50075..b69f8e0 100644
--- a/src/components/torRefSpoofer.js
+++ b/src/components/torRefSpoofer.js
@@ -1,89 +1,60 @@
-// Bug 1506 P0: I don't really believe referers matter in the grand scheme.
-// Kill this code.
+// Clear referer on cross-domain requests to/from Tor Hidden Services: #9623
+// ("Smart referer" previously spoofed referer on all cross-domain requests.)
const kMODULE_CID = Components.ID("65be2be0-ceb4-44c2-91a5-9c75c53430bf");
const kMODULE_CONTRACTID = "@torproject.org/torRefSpoofer;1";
function RefSpoofer() {
- this.logger = Components.classes["@torproject.org/torbutton-logger;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
- this.logger.log(3, "RefSpoof component created");
- this.specials = /[-[\]{}()*+?.,\\^$|#\s]/g;
+ this.logger = Components.classes["@torproject.org/torbutton-logger;1"].
+ getService(Components.interfaces.nsISupports).wrappedJSObject;
+ this.logger.log(3, "RefSpoof component created");
+ this.onionDomainRegex = new RegExp("\\.onion$", "i"); // THS hosts
+ this.thirdPartyUtil = Components.classes["@mozilla.org/thirdpartyutil;1"].
+ getService(Components.interfaces.mozIThirdPartyUtil);
+ this.ios = Components.classes["@mozilla.org/network/io-service;1"].
+ getService(Components.interfaces.nsIIOService);
}
-RefSpoofer.prototype = {
+RefSpoofer.prototype = {
observe: function(subject, topic, data)
{
if (topic == "http-on-modify-request") {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
-
- if (!tor_enabled)
- return;
-
subject.QueryInterface(Components.interfaces.nsIHttpChannel);
this.onModifyRequest(subject);
return;
}
if (topic == "profile-after-change") {
this.logger.log(3, "RefSpoof got profile-after-change");
- var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
+ var os = Components.classes["@mozilla.org/observer-service;1"].
+ getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "http-on-modify-request", false);
return;
}
},
onModifyRequest: function(oHttpChannel)
{
- var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
-
- var spoofmode = prefs.getIntPref("extensions.torbutton.refererspoof");
-
- var ios = Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService);
+ var referer;
- if (spoofmode == 0)
try {
oHttpChannel.QueryInterface(Components.interfaces.nsIChannel);
- var referer;
- try{
+ try {
referer = oHttpChannel.getRequestHeader("Referer");
- referer = ios.newURI(referer,null,null);//make a nsIURI object for referer
- }catch(referr) {
- return;//no referer available or invalid uri
+ referer = this.ios.newURI(referer, null, null); //make a nsIURI object for referer
+ } catch (referr) {
+ return; //no referer available or invalid uri
}
- var requestURI = oHttpChannel.URI; //request nsIURI object
- var destHost = referer.host; //referer host w/o scheme
- var srcHost = oHttpChannel.URI.host;//request host without scheme
-
- // match is not what we want, unless we escape dots:
- var destHostMatch = destHost.replace(this.specials, "\\$&");
- var srcHostMatch = srcHost.replace(this.specials, "\\$&");
-
- // FIXME: This isn't exactly bulletproof security here, but it still
- // may need to be more lenient not to break sites...
- //
- // If we suspect issues, we can try doing the following first:
- // 1. Strip off all TLD suffixes, up to but not including '.'
- // 2. If more than one domain part is till left, strip off prefix
-
- //if they're in the same domain(if we can tell) or have the same host, keep the referer
- if (srcHost.split(".").length >= destHost.split(".").length
- && srcHost.match(destHostMatch)) // dest is a substring of src
- return;
- else if (destHost.split(".").length >= srcHost.split(".").length
- && destHost.match(srcHostMatch)) // src is a substring of dest
- return;
- //if they do not have the same host
- this.adjustRef(oHttpChannel, requestURI.scheme + "://" + requestURI.host);
- this.logger.safe_log(3, "Adjusting Referer, ",
- "from " + destHost + " to " + requestURI.host);
- }
- catch (ex) {
- this.logger.log(5, "RefSpoof onModifyRequest: " +ex);
+ // Only spoof referer for cross-domain requests from .onions
+ if (this.onionDomainRegex.test(referer.host) &&
+ this.thirdPartyUtil.isThirdPartyURI(referer, oHttpChannel.URI)) {
+ // Set the referer to the domain being requested. This makes it harder
+ // to tell that we are referer-spoofing.
+ this.adjustRef(oHttpChannel,
+ [oHttpChannel.URI.scheme, oHttpChannel.URI.host].join("://"));
+ }
+ } catch (ex) {
+ this.logger.log(5, "RefSpoof onModifyRequest: " + ex);
}
- else if (spoofmode == 2)
- this.adjustRef(oHttpChannel, "");
},
adjustRef: function(oChannel, sRef)
{
@@ -94,7 +65,7 @@ RefSpoofer.prototype = {
oChannel.setRequestHeader("Referer", sRef, false);
}
return true;
- }
+ }
catch (ex) {
this.logger.log(5, "RefSpoof adjustRef: " +ex);
}
@@ -103,9 +74,10 @@ RefSpoofer.prototype = {
QueryInterface: function(iid)
{
if (!iid.equals(Components.interfaces.nsISupports) &&
- !iid.equals(Components.interfaces.nsIObserver) &&
- !iid.equals(Components.interfaces.nsISupportsWeakReference))
- throw Components.results.NS_ERROR_NO_INTERFACE;
+ !iid.equals(Components.interfaces.nsIObserver) &&
+ !iid.equals(Components.interfaces.nsISupportsWeakReference)) {
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ }
return this;
},
_xpcom_categories: [{category:"profile-after-change"}],
@@ -114,12 +86,5 @@ RefSpoofer.prototype = {
classDescription: "Tor Ref Spoofer"
};
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefSpoofer]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([RefSpoofer]);
+var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefSpoofer]);
diff --git a/src/components/tors-protocol.js b/src/components/tors-protocol.js
deleted file mode 100644
index f075e43..0000000
--- a/src/components/tors-protocol.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
-
-// Test protocol related
-const kSCHEME = "tors";
-const kPROTOCOL_NAME = "tors";
-const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
-const kPROTOCOL_CID = Components.ID("a5a4bc50-5e8d-11de-8a39-0800200c9a66");
-
-// Mozilla defined
-const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
-const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
-const nsISupports = Components.interfaces.nsISupports;
-const nsIIOService = Components.interfaces.nsIIOService;
-const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
-const nsIURI = Components.interfaces.nsIURI;
-
-function Protocol()
-{
-}
-
-Protocol.prototype =
-{
- QueryInterface: function(iid)
- {
- if (!iid.equals(nsIProtocolHandler) &&
- !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- scheme: kSCHEME,
- defaultPort: -1,
- protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
- nsIProtocolHandler.URI_NOAUTH,
-
- allowPort: function(port, scheme)
- {
- return false;
- },
-
- newURI: function(spec, charset, baseURI)
- {
- const nsIStandardURL = Components.interfaces.nsIStandardURL;
- var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
- uri.init(nsIStandardURL.URLTYPE_STANDARD, 433, spec, charset, baseURI);
-
- return uri.QueryInterface(Components.interfaces.nsIURI);
-
- },
-
- newChannel: function(aURI)
- {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
- throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
- }
-
- /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of https.*/
- var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
- var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var chrome = wm.getMostRecentWindow("navigator:browser");
- if (!ios.allowPort(aURI.port, aURI.scheme))
- throw Components.results.NS_ERROR_FAILURE;
-
- if (!tor_enabled)
- {
- var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
- if (!result)
- throw Components.results.NS_ERROR_UNEXPECTED;
- chrome.torbutton_enable_tor(true);
- }
-
- //if tor is turned on then, else we should throw exception of some sort.
- tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- if (!tor_enabled)
- throw Components.results.NS_ERROR_UNEXPECTED;
- else
- {
- aURI.scheme = "https";
- return ios.newChannelFromURI(aURI);
- }
- },
-
- // method of nsIClassInfo
- classDescription: "Tor protocol handler",
- classID: kPROTOCOL_CID,
- contractID: kPROTOCOL_CONTRACTID
-}
-
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/window-mapper.js b/src/components/window-mapper.js
deleted file mode 100644
index a04f12b..0000000
--- a/src/components/window-mapper.js
+++ /dev/null
@@ -1,180 +0,0 @@
-// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
-
-/*************************************************************************
- * ContentWindowMapper (JavaScript XPCOM component)
- *
- * Allows you to find a tabbrowser tab for a top level content window.
- *
- *************************************************************************/
-
-// Module specific constants
-const kMODULE_NAME = "Content Window Mapper";
-const kMODULE_CONTRACTID = "@torproject.org/content-window-mapper;1";
-const kMODULE_CID = Components.ID("b985e49c-12cb-4f29-9d14-b62603332ec4");
-
-const Cr = Components.results;
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const EXPIRATION_TIME = 60000; // 60 seconds
-
-const nsISupports = Components.interfaces.nsISupports;
-const nsIClassInfo = Components.interfaces.nsIClassInfo;
-const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
-const nsIObserverService = Components.interfaces.nsIObserverService;
-
-function ContentWindowMapper() {
- this.cache = {};
-
- this.logger = Components.classes["@torproject.org/torbutton-logger;1"]
- .getService(Components.interfaces.nsISupports).wrappedJSObject;
- this.logger.log(3, "Component Load 2: Content window mapper online: "+kMODULE_CONTRACTID);
- this.last_expired = Date.now();
- // This JSObject is exported directly to chrome
- this.wrappedJSObject = this;
-}
-
-ContentWindowMapper.prototype =
-{
- QueryInterface: function(iid)
- {
- if (!iid.equals(nsIClassInfo) &&
- !iid.equals(nsISupports)) {
- Components.returnCode = Cr.NS_ERROR_NO_INTERFACE;
- return null;
- }
- return this;
- },
-
- wrappedJSObject: null, // Initialized by constructor
-
- // make this an nsIClassInfo object
- flags: nsIClassInfo.DOM_OBJECT,
-
- // method of nsIClassInfo
- classDescription: kMODULE_NAME,
- classID: kMODULE_CID,
- contractID: kMODULE_CONTRACTID,
-
- // method of nsIClassInfo
- getInterfaces: function(count) {
- var interfaceList = [nsIClassInfo];
- count.value = interfaceList.length;
- return interfaceList;
- },
-
- // method of nsIClassInfo
- getHelperForLanguage: function(count) { return null; },
-
- checkCache: function(topContentWindow) {
- if(typeof(topContentWindow.ghetto_guid) != "undefined"
- && typeof(this.cache[topContentWindow.ghetto_guid]) != "undefined") {
- return this.cache[topContentWindow.ghetto_guid].browser;
- }
-
- return null;
- },
-
- addCache: function(topContentWindow, browser) {
- var insertion = new Object();
- insertion.browser = browser;
- insertion.time = Date.now();
- topContentWindow.ghetto_guid = Math.random().toString()+Math.random().toString();
- this.cache[topContentWindow.ghetto_guid] = insertion;
- },
-
- expireOldCache: function() {
- var now = Date.now();
-
- if((now - this.last_expired) < EXPIRATION_TIME) {
- this.logger.log(3, "Early mapper check.");
- return;
- }
-
- var delkeys = [];
- for(var elem in this.cache) {
- if((now - this.cache[elem].time) > EXPIRATION_TIME) {
- this.logger.log(2, "Deleting cached element: "+elem.location);
- delkeys.push(elem);
- }
- }
-
- for(var k in delkeys) {
- delete this.cache[k];
- }
-
- this.last_expired = now;
- },
-
- getBrowserForContentWindow: function(topContentWindow) {
- if(topContentWindow instanceof Components.interfaces.nsIDOMChromeWindow) {
- if(topContentWindow.browserDOMWindow) {
- var browser = topContentWindow.getBrowser().selectedTab.linkedBrowser;
- this.logger.log(3, "Chrome browser at "
- +browser.contentWindow.location+" found for: "
- +topContentWindow.location);
- return browser;
- }
- // Allow strange chrome to go through..
- this.logger.log(3, "Odd chome window"+topContentWindow.location);
- return topContentWindow;
- }
-
- var cached = this.checkCache(topContentWindow);
- if(cached != null) {
- return cached;
- }
-
- try {
- this.logger.log(3, "Cache failed for: "+topContentWindow.location);
- } catch(e) {
- this.logger.log(3, "Cache failed for unknown location?");
- }
-
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var enumerator = wm.getEnumerator("navigator:browser");
- while(enumerator.hasMoreElements()) {
- var win = enumerator.getNext();
- var browser = win.getBrowser();
- for (var i = 0; i < browser.browsers.length; ++i) {
- var b = browser.browsers[i];
- if (b && b.contentWindow == topContentWindow) {
- this.addCache(topContentWindow, b);
- return b;
- }
- }
- }
-
- // SpeedDial, google notebook and other extensions can create their
- // own "<browser>" tag elements. AFAICT, there is no way to enumerate
- // these... Just punt and return the most recently used browser
- try {
- if(topContentWindow.name != "speedDialLoaderBrowser") {
- if(topContentWindow && topContentWindow.location)
- this.logger.safe_log(4, "No browser found: ", topContentWindow.location);
- else
- this.logger.safe_log(4, "No browser found: ", topContentWindow.name);
- } else {
- this.logger.log(3, "SpeedDial browser found: "+topContentWindow.name);
- }
- } catch(e) {
- this.logger.log(4, "No browser found.");
- }
-
- // Punt..
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
- getService(Components.interfaces.nsIWindowMediator);
- var recentWindow = wm.getMostRecentWindow("navigator:browser");
- return recentWindow ? recentWindow.getBrowser().selectedTab.linkedBrowser : null;
- }
-}
-
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentWindowMapper]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([ContentWindowMapper]);
diff --git a/src/defaults/preferences/preferences.js b/src/defaults/preferences/preferences.js
index 83706ef..7985b21 100644
--- a/src/defaults/preferences/preferences.js
+++ b/src/defaults/preferences/preferences.js
@@ -165,7 +165,6 @@ pref("extensions.torbutton.tor_memory_jar",false);
pref("extensions.torbutton.nontor_memory_jar",false);
pref("extensions.torbutton.tz_string","");
pref("extensions.torbutton.launch_warning",true);
-pref("extensions.torbutton.refererspoof", 0); //0=no spoof, 1=root spoof, 2=domain spoof, 3=blank spoof, 4=custom spoof
pref("extensions.torbutton.fakerefresh", false);
pref("extensions.torbutton.customeref","");
pref("extensions.torbutton.disable_livemarks",true);
1
0

13 Oct '15
commit 9fe9cdfe816ed030e615643e35b9e0dcaa5a8635
Author: Yan Zhu <yan(a)mit.edu>
Date: Tue Jul 29 17:08:36 2014 -0700
Revert "remove obsolete files, re Bug 1506 P0"
This reverts commit 80b06cdf422238f5eece38a1974d31e6e7be7a17.
---
src/chrome.manifest | 12 +++
src/components/tor-protocol.js | 103 ++++++++++++++++++++++
src/components/torRefSpoofer.js | 125 +++++++++++++++++++++++++++
src/components/tors-protocol.js | 103 ++++++++++++++++++++++
src/components/window-mapper.js | 180 +++++++++++++++++++++++++++++++++++++++
5 files changed, 523 insertions(+)
diff --git a/src/chrome.manifest b/src/chrome.manifest
index 8323e66..ddf582e 100644
--- a/src/chrome.manifest
+++ b/src/chrome.manifest
@@ -159,6 +159,18 @@ contract @torproject.org/torbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d
component {e33fd6d4-270f-475f-a96f-ff3140279f68} components/domain-isolator.js
contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
+# component {b985e49c-12cb-4f29-9d14-b62603332ec4} components/window-mapper.js
+# contract @torproject.org/content-window-mapper;1 {b985e49c-12cb-4f29-9d14-b62603332ec4}
+
+# component {65be2be0-ceb4-44c2-91a5-9c75c53430bf} components/torRefSpoofer.js
+# contract @torproject.org/torRefSpoofer;1 {65be2be0-ceb4-44c2-91a5-9c75c53430bf}
+
+# component {52183e20-4d4b-11de-8a39-0800200c9a66} components/tor-protocol.js
+# contract @mozilla.org/network/protocol;1?name=tor {52183e20-4d4b-11de-8a39-0800200c9a66}
+
+# component {a5a4bc50-5e8d-11de-8a39-0800200c9a66} components/tors-protocol.js
+# contract @mozilla.org/network/protocol;1?name=tors {a5a4bc50-5e8d-11de-8a39-0800200c9a66}
+
category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
category profile-after-change StartupObserver @torproject.org/startup-observer;1
category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
diff --git a/src/components/tor-protocol.js b/src/components/tor-protocol.js
new file mode 100644
index 0000000..4ba5cf4
--- /dev/null
+++ b/src/components/tor-protocol.js
@@ -0,0 +1,103 @@
+// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
+
+// Test protocol related
+const kSCHEME = "tor";
+const kPROTOCOL_NAME = "tor";
+const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
+const kPROTOCOL_CID = Components.ID("52183e20-4d4b-11de-8a39-0800200c9a66");
+
+// Mozilla defined
+const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
+const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
+const nsISupports = Components.interfaces.nsISupports;
+const nsIIOService = Components.interfaces.nsIIOService;
+const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
+const nsIURI = Components.interfaces.nsIURI;
+
+function Protocol()
+{
+}
+
+Protocol.prototype =
+{
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(nsIProtocolHandler) &&
+ !iid.equals(nsISupports))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ return this;
+ },
+
+ scheme: kSCHEME,
+ defaultPort: -1,
+ protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
+ nsIProtocolHandler.URI_NOAUTH,
+
+ allowPort: function(port, scheme)
+ {
+ return false;
+ },
+
+ newURI: function(spec, charset, baseURI)
+ {
+ const nsIStandardURL = Components.interfaces.nsIStandardURL;
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
+ uri.init(nsIStandardURL.URLTYPE_STANDARD, 80, spec, charset, baseURI);
+
+ return uri.QueryInterface(Components.interfaces.nsIURI);
+
+ },
+
+ newChannel: function(aURI)
+ {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
+ throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
+ }
+
+ /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of http.*/
+ var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
+ var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
+ .getService(Components.interfaces.nsIPromptService);
+ var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var chrome = wm.getMostRecentWindow("navigator:browser");
+ if (!ios.allowPort(aURI.port, aURI.scheme))
+ throw Components.results.NS_ERROR_FAILURE;
+
+ if (!tor_enabled)
+ {
+ var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
+ if (!result)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ chrome.torbutton_enable_tor(true);
+ }
+
+ //if tor is turned on then, else we should throw exception of some sort.
+ tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ if (!tor_enabled)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ else
+ {
+ aURI.scheme = "http";
+ return ios.newChannelFromURI(aURI);
+ }
+ },
+
+ // method of nsIClassInfo
+ classDescription: "Tor protocol handler",
+ classID: kPROTOCOL_CID,
+ contractID: kPROTOCOL_CONTRACTID,
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/torRefSpoofer.js b/src/components/torRefSpoofer.js
new file mode 100644
index 0000000..8b50075
--- /dev/null
+++ b/src/components/torRefSpoofer.js
@@ -0,0 +1,125 @@
+// Bug 1506 P0: I don't really believe referers matter in the grand scheme.
+// Kill this code.
+
+const kMODULE_CID = Components.ID("65be2be0-ceb4-44c2-91a5-9c75c53430bf");
+const kMODULE_CONTRACTID = "@torproject.org/torRefSpoofer;1";
+
+function RefSpoofer() {
+ this.logger = Components.classes["@torproject.org/torbutton-logger;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
+ this.logger.log(3, "RefSpoof component created");
+ this.specials = /[-[\]{}()*+?.,\\^$|#\s]/g;
+}
+
+
+RefSpoofer.prototype = {
+ observe: function(subject, topic, data)
+ {
+ if (topic == "http-on-modify-request") {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+
+ if (!tor_enabled)
+ return;
+
+ subject.QueryInterface(Components.interfaces.nsIHttpChannel);
+ this.onModifyRequest(subject);
+ return;
+ }
+ if (topic == "profile-after-change") {
+ this.logger.log(3, "RefSpoof got profile-after-change");
+ var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
+ os.addObserver(this, "http-on-modify-request", false);
+ return;
+ }
+ },
+ onModifyRequest: function(oHttpChannel)
+ {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+ var spoofmode = prefs.getIntPref("extensions.torbutton.refererspoof");
+
+ var ios = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+
+ if (spoofmode == 0)
+ try {
+ oHttpChannel.QueryInterface(Components.interfaces.nsIChannel);
+ var referer;
+ try{
+ referer = oHttpChannel.getRequestHeader("Referer");
+ referer = ios.newURI(referer,null,null);//make a nsIURI object for referer
+ }catch(referr) {
+ return;//no referer available or invalid uri
+ }
+ var requestURI = oHttpChannel.URI; //request nsIURI object
+ var destHost = referer.host; //referer host w/o scheme
+ var srcHost = oHttpChannel.URI.host;//request host without scheme
+
+ // match is not what we want, unless we escape dots:
+ var destHostMatch = destHost.replace(this.specials, "\\$&");
+ var srcHostMatch = srcHost.replace(this.specials, "\\$&");
+
+ // FIXME: This isn't exactly bulletproof security here, but it still
+ // may need to be more lenient not to break sites...
+ //
+ // If we suspect issues, we can try doing the following first:
+ // 1. Strip off all TLD suffixes, up to but not including '.'
+ // 2. If more than one domain part is till left, strip off prefix
+
+ //if they're in the same domain(if we can tell) or have the same host, keep the referer
+ if (srcHost.split(".").length >= destHost.split(".").length
+ && srcHost.match(destHostMatch)) // dest is a substring of src
+ return;
+ else if (destHost.split(".").length >= srcHost.split(".").length
+ && destHost.match(srcHostMatch)) // src is a substring of dest
+ return;
+ //if they do not have the same host
+ this.adjustRef(oHttpChannel, requestURI.scheme + "://" + requestURI.host);
+ this.logger.safe_log(3, "Adjusting Referer, ",
+ "from " + destHost + " to " + requestURI.host);
+ }
+ catch (ex) {
+ this.logger.log(5, "RefSpoof onModifyRequest: " +ex);
+ }
+ else if (spoofmode == 2)
+ this.adjustRef(oHttpChannel, "");
+ },
+ adjustRef: function(oChannel, sRef)
+ {
+ try {
+ if (oChannel.referrer)
+ {
+ oChannel.referrer.spec = sRef;
+ oChannel.setRequestHeader("Referer", sRef, false);
+ }
+ return true;
+ }
+ catch (ex) {
+ this.logger.log(5, "RefSpoof adjustRef: " +ex);
+ }
+ return false;
+ },
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(Components.interfaces.nsISupports) &&
+ !iid.equals(Components.interfaces.nsIObserver) &&
+ !iid.equals(Components.interfaces.nsISupportsWeakReference))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ return this;
+ },
+ _xpcom_categories: [{category:"profile-after-change"}],
+ classID: kMODULE_CID,
+ contractID: kMODULE_CONTRACTID,
+ classDescription: "Tor Ref Spoofer"
+};
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefSpoofer]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([RefSpoofer]);
diff --git a/src/components/tors-protocol.js b/src/components/tors-protocol.js
new file mode 100644
index 0000000..f075e43
--- /dev/null
+++ b/src/components/tors-protocol.js
@@ -0,0 +1,103 @@
+// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
+
+// Test protocol related
+const kSCHEME = "tors";
+const kPROTOCOL_NAME = "tors";
+const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
+const kPROTOCOL_CID = Components.ID("a5a4bc50-5e8d-11de-8a39-0800200c9a66");
+
+// Mozilla defined
+const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
+const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
+const nsISupports = Components.interfaces.nsISupports;
+const nsIIOService = Components.interfaces.nsIIOService;
+const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
+const nsIURI = Components.interfaces.nsIURI;
+
+function Protocol()
+{
+}
+
+Protocol.prototype =
+{
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(nsIProtocolHandler) &&
+ !iid.equals(nsISupports))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ return this;
+ },
+
+ scheme: kSCHEME,
+ defaultPort: -1,
+ protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
+ nsIProtocolHandler.URI_NOAUTH,
+
+ allowPort: function(port, scheme)
+ {
+ return false;
+ },
+
+ newURI: function(spec, charset, baseURI)
+ {
+ const nsIStandardURL = Components.interfaces.nsIStandardURL;
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
+ uri.init(nsIStandardURL.URLTYPE_STANDARD, 433, spec, charset, baseURI);
+
+ return uri.QueryInterface(Components.interfaces.nsIURI);
+
+ },
+
+ newChannel: function(aURI)
+ {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
+ throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
+ }
+
+ /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of https.*/
+ var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
+ var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
+ .getService(Components.interfaces.nsIPromptService);
+ var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var chrome = wm.getMostRecentWindow("navigator:browser");
+ if (!ios.allowPort(aURI.port, aURI.scheme))
+ throw Components.results.NS_ERROR_FAILURE;
+
+ if (!tor_enabled)
+ {
+ var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
+ if (!result)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ chrome.torbutton_enable_tor(true);
+ }
+
+ //if tor is turned on then, else we should throw exception of some sort.
+ tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
+ if (!tor_enabled)
+ throw Components.results.NS_ERROR_UNEXPECTED;
+ else
+ {
+ aURI.scheme = "https";
+ return ios.newChannelFromURI(aURI);
+ }
+ },
+
+ // method of nsIClassInfo
+ classDescription: "Tor protocol handler",
+ classID: kPROTOCOL_CID,
+ contractID: kPROTOCOL_CONTRACTID
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/window-mapper.js b/src/components/window-mapper.js
new file mode 100644
index 0000000..a04f12b
--- /dev/null
+++ b/src/components/window-mapper.js
@@ -0,0 +1,180 @@
+// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
+
+/*************************************************************************
+ * ContentWindowMapper (JavaScript XPCOM component)
+ *
+ * Allows you to find a tabbrowser tab for a top level content window.
+ *
+ *************************************************************************/
+
+// Module specific constants
+const kMODULE_NAME = "Content Window Mapper";
+const kMODULE_CONTRACTID = "@torproject.org/content-window-mapper;1";
+const kMODULE_CID = Components.ID("b985e49c-12cb-4f29-9d14-b62603332ec4");
+
+const Cr = Components.results;
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const EXPIRATION_TIME = 60000; // 60 seconds
+
+const nsISupports = Components.interfaces.nsISupports;
+const nsIClassInfo = Components.interfaces.nsIClassInfo;
+const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
+const nsIObserverService = Components.interfaces.nsIObserverService;
+
+function ContentWindowMapper() {
+ this.cache = {};
+
+ this.logger = Components.classes["@torproject.org/torbutton-logger;1"]
+ .getService(Components.interfaces.nsISupports).wrappedJSObject;
+ this.logger.log(3, "Component Load 2: Content window mapper online: "+kMODULE_CONTRACTID);
+ this.last_expired = Date.now();
+ // This JSObject is exported directly to chrome
+ this.wrappedJSObject = this;
+}
+
+ContentWindowMapper.prototype =
+{
+ QueryInterface: function(iid)
+ {
+ if (!iid.equals(nsIClassInfo) &&
+ !iid.equals(nsISupports)) {
+ Components.returnCode = Cr.NS_ERROR_NO_INTERFACE;
+ return null;
+ }
+ return this;
+ },
+
+ wrappedJSObject: null, // Initialized by constructor
+
+ // make this an nsIClassInfo object
+ flags: nsIClassInfo.DOM_OBJECT,
+
+ // method of nsIClassInfo
+ classDescription: kMODULE_NAME,
+ classID: kMODULE_CID,
+ contractID: kMODULE_CONTRACTID,
+
+ // method of nsIClassInfo
+ getInterfaces: function(count) {
+ var interfaceList = [nsIClassInfo];
+ count.value = interfaceList.length;
+ return interfaceList;
+ },
+
+ // method of nsIClassInfo
+ getHelperForLanguage: function(count) { return null; },
+
+ checkCache: function(topContentWindow) {
+ if(typeof(topContentWindow.ghetto_guid) != "undefined"
+ && typeof(this.cache[topContentWindow.ghetto_guid]) != "undefined") {
+ return this.cache[topContentWindow.ghetto_guid].browser;
+ }
+
+ return null;
+ },
+
+ addCache: function(topContentWindow, browser) {
+ var insertion = new Object();
+ insertion.browser = browser;
+ insertion.time = Date.now();
+ topContentWindow.ghetto_guid = Math.random().toString()+Math.random().toString();
+ this.cache[topContentWindow.ghetto_guid] = insertion;
+ },
+
+ expireOldCache: function() {
+ var now = Date.now();
+
+ if((now - this.last_expired) < EXPIRATION_TIME) {
+ this.logger.log(3, "Early mapper check.");
+ return;
+ }
+
+ var delkeys = [];
+ for(var elem in this.cache) {
+ if((now - this.cache[elem].time) > EXPIRATION_TIME) {
+ this.logger.log(2, "Deleting cached element: "+elem.location);
+ delkeys.push(elem);
+ }
+ }
+
+ for(var k in delkeys) {
+ delete this.cache[k];
+ }
+
+ this.last_expired = now;
+ },
+
+ getBrowserForContentWindow: function(topContentWindow) {
+ if(topContentWindow instanceof Components.interfaces.nsIDOMChromeWindow) {
+ if(topContentWindow.browserDOMWindow) {
+ var browser = topContentWindow.getBrowser().selectedTab.linkedBrowser;
+ this.logger.log(3, "Chrome browser at "
+ +browser.contentWindow.location+" found for: "
+ +topContentWindow.location);
+ return browser;
+ }
+ // Allow strange chrome to go through..
+ this.logger.log(3, "Odd chome window"+topContentWindow.location);
+ return topContentWindow;
+ }
+
+ var cached = this.checkCache(topContentWindow);
+ if(cached != null) {
+ return cached;
+ }
+
+ try {
+ this.logger.log(3, "Cache failed for: "+topContentWindow.location);
+ } catch(e) {
+ this.logger.log(3, "Cache failed for unknown location?");
+ }
+
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var enumerator = wm.getEnumerator("navigator:browser");
+ while(enumerator.hasMoreElements()) {
+ var win = enumerator.getNext();
+ var browser = win.getBrowser();
+ for (var i = 0; i < browser.browsers.length; ++i) {
+ var b = browser.browsers[i];
+ if (b && b.contentWindow == topContentWindow) {
+ this.addCache(topContentWindow, b);
+ return b;
+ }
+ }
+ }
+
+ // SpeedDial, google notebook and other extensions can create their
+ // own "<browser>" tag elements. AFAICT, there is no way to enumerate
+ // these... Just punt and return the most recently used browser
+ try {
+ if(topContentWindow.name != "speedDialLoaderBrowser") {
+ if(topContentWindow && topContentWindow.location)
+ this.logger.safe_log(4, "No browser found: ", topContentWindow.location);
+ else
+ this.logger.safe_log(4, "No browser found: ", topContentWindow.name);
+ } else {
+ this.logger.log(3, "SpeedDial browser found: "+topContentWindow.name);
+ }
+ } catch(e) {
+ this.logger.log(4, "No browser found.");
+ }
+
+ // Punt..
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
+ getService(Components.interfaces.nsIWindowMediator);
+ var recentWindow = wm.getMostRecentWindow("navigator:browser");
+ return recentWindow ? recentWindow.getBrowser().selectedTab.linkedBrowser : null;
+ }
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentWindowMapper]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([ContentWindowMapper]);
1
0

[torbutton/master] Bug 9263: Spoof referer when leaving a .onion domain
by gk@torproject.org 13 Oct '15
by gk@torproject.org 13 Oct '15
13 Oct '15
commit f98243cfed952d1a1375fb1f486d728e6ca1bd44
Author: Yan Zhu <yan(a)mit.edu>
Date: Tue Jul 29 17:36:27 2014 -0700
Bug 9263: Spoof referer when leaving a .onion domain
---
makexpi.sh | 2 +-
src/chrome.manifest | 15 +--
src/components/tor-protocol.js | 103 ------------------
src/components/torRefSpoofer.js | 103 ++++++------------
src/components/tors-protocol.js | 103 ------------------
src/components/window-mapper.js | 180 -------------------------------
src/defaults/preferences/preferences.js | 1 -
7 files changed, 39 insertions(+), 468 deletions(-)
diff --git a/makexpi.sh b/makexpi.sh
index 4d01e2c..243fbd6 100755
--- a/makexpi.sh
+++ b/makexpi.sh
@@ -21,7 +21,7 @@ echo ---------- create $APP_NAME.xpi ----------
mkdir -p pkg
cd src
echo zip -X -9r ../pkg/$XPI_NAME ./ -x "chrome/*" -x "*.diff" -x "*.svn/*"
-zip -X -9r ../pkg/$XPI_NAME ./ -x "*.svn/*" -x "*.diff" -x "components/torRefSpoofer.js" #-x "chrome/*"
+zip -X -9r ../pkg/$XPI_NAME ./ -x "*.svn/*" -x "*.diff" #-x "chrome/*"
#mv ../$APP_NAME.jar ./chrome
#zip -9m ../pkg/$XPI_NAME chrome/$APP_NAME.jar
cd ..
diff --git a/src/chrome.manifest b/src/chrome.manifest
index ddf582e..1d3efb4 100644
--- a/src/chrome.manifest
+++ b/src/chrome.manifest
@@ -159,18 +159,11 @@ contract @torproject.org/torbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d
component {e33fd6d4-270f-475f-a96f-ff3140279f68} components/domain-isolator.js
contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
-# component {b985e49c-12cb-4f29-9d14-b62603332ec4} components/window-mapper.js
-# contract @torproject.org/content-window-mapper;1 {b985e49c-12cb-4f29-9d14-b62603332ec4}
-
-# component {65be2be0-ceb4-44c2-91a5-9c75c53430bf} components/torRefSpoofer.js
-# contract @torproject.org/torRefSpoofer;1 {65be2be0-ceb4-44c2-91a5-9c75c53430bf}
-
-# component {52183e20-4d4b-11de-8a39-0800200c9a66} components/tor-protocol.js
-# contract @mozilla.org/network/protocol;1?name=tor {52183e20-4d4b-11de-8a39-0800200c9a66}
+category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
-# component {a5a4bc50-5e8d-11de-8a39-0800200c9a66} components/tors-protocol.js
-# contract @mozilla.org/network/protocol;1?name=tors {a5a4bc50-5e8d-11de-8a39-0800200c9a66}
+component {65be2be0-ceb4-44c2-91a5-9c75c53430bf} components/torRefSpoofer.js
+contract @torproject.org/torRefSpoofer;1 {65be2be0-ceb4-44c2-91a5-9c75c53430bf}
-category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
+category profile-after-change RefSpoofer @torproject.org/torRefSpoofer;1
category profile-after-change StartupObserver @torproject.org/startup-observer;1
category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
diff --git a/src/components/tor-protocol.js b/src/components/tor-protocol.js
deleted file mode 100644
index 4ba5cf4..0000000
--- a/src/components/tor-protocol.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
-
-// Test protocol related
-const kSCHEME = "tor";
-const kPROTOCOL_NAME = "tor";
-const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
-const kPROTOCOL_CID = Components.ID("52183e20-4d4b-11de-8a39-0800200c9a66");
-
-// Mozilla defined
-const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
-const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
-const nsISupports = Components.interfaces.nsISupports;
-const nsIIOService = Components.interfaces.nsIIOService;
-const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
-const nsIURI = Components.interfaces.nsIURI;
-
-function Protocol()
-{
-}
-
-Protocol.prototype =
-{
- QueryInterface: function(iid)
- {
- if (!iid.equals(nsIProtocolHandler) &&
- !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- scheme: kSCHEME,
- defaultPort: -1,
- protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
- nsIProtocolHandler.URI_NOAUTH,
-
- allowPort: function(port, scheme)
- {
- return false;
- },
-
- newURI: function(spec, charset, baseURI)
- {
- const nsIStandardURL = Components.interfaces.nsIStandardURL;
- var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
- uri.init(nsIStandardURL.URLTYPE_STANDARD, 80, spec, charset, baseURI);
-
- return uri.QueryInterface(Components.interfaces.nsIURI);
-
- },
-
- newChannel: function(aURI)
- {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
- throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
- }
-
- /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of http.*/
- var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
- var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var chrome = wm.getMostRecentWindow("navigator:browser");
- if (!ios.allowPort(aURI.port, aURI.scheme))
- throw Components.results.NS_ERROR_FAILURE;
-
- if (!tor_enabled)
- {
- var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
- if (!result)
- throw Components.results.NS_ERROR_UNEXPECTED;
- chrome.torbutton_enable_tor(true);
- }
-
- //if tor is turned on then, else we should throw exception of some sort.
- tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- if (!tor_enabled)
- throw Components.results.NS_ERROR_UNEXPECTED;
- else
- {
- aURI.scheme = "http";
- return ios.newChannelFromURI(aURI);
- }
- },
-
- // method of nsIClassInfo
- classDescription: "Tor protocol handler",
- classID: kPROTOCOL_CID,
- contractID: kPROTOCOL_CONTRACTID,
-}
-
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/torRefSpoofer.js b/src/components/torRefSpoofer.js
index 8b50075..b69f8e0 100644
--- a/src/components/torRefSpoofer.js
+++ b/src/components/torRefSpoofer.js
@@ -1,89 +1,60 @@
-// Bug 1506 P0: I don't really believe referers matter in the grand scheme.
-// Kill this code.
+// Clear referer on cross-domain requests to/from Tor Hidden Services: #9623
+// ("Smart referer" previously spoofed referer on all cross-domain requests.)
const kMODULE_CID = Components.ID("65be2be0-ceb4-44c2-91a5-9c75c53430bf");
const kMODULE_CONTRACTID = "@torproject.org/torRefSpoofer;1";
function RefSpoofer() {
- this.logger = Components.classes["@torproject.org/torbutton-logger;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
- this.logger.log(3, "RefSpoof component created");
- this.specials = /[-[\]{}()*+?.,\\^$|#\s]/g;
+ this.logger = Components.classes["@torproject.org/torbutton-logger;1"].
+ getService(Components.interfaces.nsISupports).wrappedJSObject;
+ this.logger.log(3, "RefSpoof component created");
+ this.onionDomainRegex = new RegExp("\\.onion$", "i"); // THS hosts
+ this.thirdPartyUtil = Components.classes["@mozilla.org/thirdpartyutil;1"].
+ getService(Components.interfaces.mozIThirdPartyUtil);
+ this.ios = Components.classes["@mozilla.org/network/io-service;1"].
+ getService(Components.interfaces.nsIIOService);
}
-RefSpoofer.prototype = {
+RefSpoofer.prototype = {
observe: function(subject, topic, data)
{
if (topic == "http-on-modify-request") {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
-
- if (!tor_enabled)
- return;
-
subject.QueryInterface(Components.interfaces.nsIHttpChannel);
this.onModifyRequest(subject);
return;
}
if (topic == "profile-after-change") {
this.logger.log(3, "RefSpoof got profile-after-change");
- var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
+ var os = Components.classes["@mozilla.org/observer-service;1"].
+ getService(Components.interfaces.nsIObserverService);
os.addObserver(this, "http-on-modify-request", false);
return;
}
},
onModifyRequest: function(oHttpChannel)
{
- var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
-
- var spoofmode = prefs.getIntPref("extensions.torbutton.refererspoof");
-
- var ios = Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService);
+ var referer;
- if (spoofmode == 0)
try {
oHttpChannel.QueryInterface(Components.interfaces.nsIChannel);
- var referer;
- try{
+ try {
referer = oHttpChannel.getRequestHeader("Referer");
- referer = ios.newURI(referer,null,null);//make a nsIURI object for referer
- }catch(referr) {
- return;//no referer available or invalid uri
+ referer = this.ios.newURI(referer, null, null); //make a nsIURI object for referer
+ } catch (referr) {
+ return; //no referer available or invalid uri
}
- var requestURI = oHttpChannel.URI; //request nsIURI object
- var destHost = referer.host; //referer host w/o scheme
- var srcHost = oHttpChannel.URI.host;//request host without scheme
-
- // match is not what we want, unless we escape dots:
- var destHostMatch = destHost.replace(this.specials, "\\$&");
- var srcHostMatch = srcHost.replace(this.specials, "\\$&");
-
- // FIXME: This isn't exactly bulletproof security here, but it still
- // may need to be more lenient not to break sites...
- //
- // If we suspect issues, we can try doing the following first:
- // 1. Strip off all TLD suffixes, up to but not including '.'
- // 2. If more than one domain part is till left, strip off prefix
-
- //if they're in the same domain(if we can tell) or have the same host, keep the referer
- if (srcHost.split(".").length >= destHost.split(".").length
- && srcHost.match(destHostMatch)) // dest is a substring of src
- return;
- else if (destHost.split(".").length >= srcHost.split(".").length
- && destHost.match(srcHostMatch)) // src is a substring of dest
- return;
- //if they do not have the same host
- this.adjustRef(oHttpChannel, requestURI.scheme + "://" + requestURI.host);
- this.logger.safe_log(3, "Adjusting Referer, ",
- "from " + destHost + " to " + requestURI.host);
- }
- catch (ex) {
- this.logger.log(5, "RefSpoof onModifyRequest: " +ex);
+ // Only spoof referer for cross-domain requests from .onions
+ if (this.onionDomainRegex.test(referer.host) &&
+ this.thirdPartyUtil.isThirdPartyURI(referer, oHttpChannel.URI)) {
+ // Set the referer to the domain being requested. This makes it harder
+ // to tell that we are referer-spoofing.
+ this.adjustRef(oHttpChannel,
+ [oHttpChannel.URI.scheme, oHttpChannel.URI.host].join("://"));
+ }
+ } catch (ex) {
+ this.logger.log(5, "RefSpoof onModifyRequest: " + ex);
}
- else if (spoofmode == 2)
- this.adjustRef(oHttpChannel, "");
},
adjustRef: function(oChannel, sRef)
{
@@ -94,7 +65,7 @@ RefSpoofer.prototype = {
oChannel.setRequestHeader("Referer", sRef, false);
}
return true;
- }
+ }
catch (ex) {
this.logger.log(5, "RefSpoof adjustRef: " +ex);
}
@@ -103,9 +74,10 @@ RefSpoofer.prototype = {
QueryInterface: function(iid)
{
if (!iid.equals(Components.interfaces.nsISupports) &&
- !iid.equals(Components.interfaces.nsIObserver) &&
- !iid.equals(Components.interfaces.nsISupportsWeakReference))
- throw Components.results.NS_ERROR_NO_INTERFACE;
+ !iid.equals(Components.interfaces.nsIObserver) &&
+ !iid.equals(Components.interfaces.nsISupportsWeakReference)) {
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ }
return this;
},
_xpcom_categories: [{category:"profile-after-change"}],
@@ -114,12 +86,5 @@ RefSpoofer.prototype = {
classDescription: "Tor Ref Spoofer"
};
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefSpoofer]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([RefSpoofer]);
+var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefSpoofer]);
diff --git a/src/components/tors-protocol.js b/src/components/tors-protocol.js
deleted file mode 100644
index f075e43..0000000
--- a/src/components/tors-protocol.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
-
-// Test protocol related
-const kSCHEME = "tors";
-const kPROTOCOL_NAME = "tors";
-const kPROTOCOL_CONTRACTID = "@mozilla.org/network/protocol;1?name=" + kSCHEME;
-const kPROTOCOL_CID = Components.ID("a5a4bc50-5e8d-11de-8a39-0800200c9a66");
-
-// Mozilla defined
-const kSIMPLEURI_CONTRACTID = "@mozilla.org/network/simple-uri;1";
-const kIOSERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
-const nsISupports = Components.interfaces.nsISupports;
-const nsIIOService = Components.interfaces.nsIIOService;
-const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
-const nsIURI = Components.interfaces.nsIURI;
-
-function Protocol()
-{
-}
-
-Protocol.prototype =
-{
- QueryInterface: function(iid)
- {
- if (!iid.equals(nsIProtocolHandler) &&
- !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- scheme: kSCHEME,
- defaultPort: -1,
- protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
- nsIProtocolHandler.URI_NOAUTH,
-
- allowPort: function(port, scheme)
- {
- return false;
- },
-
- newURI: function(spec, charset, baseURI)
- {
- const nsIStandardURL = Components.interfaces.nsIStandardURL;
- var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(nsIStandardURL);
- uri.init(nsIStandardURL.URLTYPE_STANDARD, 433, spec, charset, baseURI);
-
- return uri.QueryInterface(Components.interfaces.nsIURI);
-
- },
-
- newChannel: function(aURI)
- {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- if (!prefs.getBoolPref("extensions.torbutton.tor_urls")) {
- throw Components.results.NS_ERROR_UNKNOWN_PROTOCOL;
- }
-
- /*The protocol has been called, therefore we want to enable tor, wait for it to activate return the new channel with the scheme of https.*/
- var ios = Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);
- var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- var tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var chrome = wm.getMostRecentWindow("navigator:browser");
- if (!ios.allowPort(aURI.port, aURI.scheme))
- throw Components.results.NS_ERROR_FAILURE;
-
- if (!tor_enabled)
- {
- var result = prompt.confirm(null, "Allow Tor toggle?", "Do you want to enable Tor and navigate to " + aURI.spec + "?");
- if (!result)
- throw Components.results.NS_ERROR_UNEXPECTED;
- chrome.torbutton_enable_tor(true);
- }
-
- //if tor is turned on then, else we should throw exception of some sort.
- tor_enabled = prefs.getBoolPref("extensions.torbutton.tor_enabled");
- if (!tor_enabled)
- throw Components.results.NS_ERROR_UNEXPECTED;
- else
- {
- aURI.scheme = "https";
- return ios.newChannelFromURI(aURI);
- }
- },
-
- // method of nsIClassInfo
- classDescription: "Tor protocol handler",
- classID: kPROTOCOL_CID,
- contractID: kPROTOCOL_CONTRACTID
-}
-
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([Protocol]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([Protocol]);
diff --git a/src/components/window-mapper.js b/src/components/window-mapper.js
deleted file mode 100644
index a04f12b..0000000
--- a/src/components/window-mapper.js
+++ /dev/null
@@ -1,180 +0,0 @@
-// Bug 1506 P0: This code is toggle-mode code and is unused. Kill it.
-
-/*************************************************************************
- * ContentWindowMapper (JavaScript XPCOM component)
- *
- * Allows you to find a tabbrowser tab for a top level content window.
- *
- *************************************************************************/
-
-// Module specific constants
-const kMODULE_NAME = "Content Window Mapper";
-const kMODULE_CONTRACTID = "@torproject.org/content-window-mapper;1";
-const kMODULE_CID = Components.ID("b985e49c-12cb-4f29-9d14-b62603332ec4");
-
-const Cr = Components.results;
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const EXPIRATION_TIME = 60000; // 60 seconds
-
-const nsISupports = Components.interfaces.nsISupports;
-const nsIClassInfo = Components.interfaces.nsIClassInfo;
-const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
-const nsIObserverService = Components.interfaces.nsIObserverService;
-
-function ContentWindowMapper() {
- this.cache = {};
-
- this.logger = Components.classes["@torproject.org/torbutton-logger;1"]
- .getService(Components.interfaces.nsISupports).wrappedJSObject;
- this.logger.log(3, "Component Load 2: Content window mapper online: "+kMODULE_CONTRACTID);
- this.last_expired = Date.now();
- // This JSObject is exported directly to chrome
- this.wrappedJSObject = this;
-}
-
-ContentWindowMapper.prototype =
-{
- QueryInterface: function(iid)
- {
- if (!iid.equals(nsIClassInfo) &&
- !iid.equals(nsISupports)) {
- Components.returnCode = Cr.NS_ERROR_NO_INTERFACE;
- return null;
- }
- return this;
- },
-
- wrappedJSObject: null, // Initialized by constructor
-
- // make this an nsIClassInfo object
- flags: nsIClassInfo.DOM_OBJECT,
-
- // method of nsIClassInfo
- classDescription: kMODULE_NAME,
- classID: kMODULE_CID,
- contractID: kMODULE_CONTRACTID,
-
- // method of nsIClassInfo
- getInterfaces: function(count) {
- var interfaceList = [nsIClassInfo];
- count.value = interfaceList.length;
- return interfaceList;
- },
-
- // method of nsIClassInfo
- getHelperForLanguage: function(count) { return null; },
-
- checkCache: function(topContentWindow) {
- if(typeof(topContentWindow.ghetto_guid) != "undefined"
- && typeof(this.cache[topContentWindow.ghetto_guid]) != "undefined") {
- return this.cache[topContentWindow.ghetto_guid].browser;
- }
-
- return null;
- },
-
- addCache: function(topContentWindow, browser) {
- var insertion = new Object();
- insertion.browser = browser;
- insertion.time = Date.now();
- topContentWindow.ghetto_guid = Math.random().toString()+Math.random().toString();
- this.cache[topContentWindow.ghetto_guid] = insertion;
- },
-
- expireOldCache: function() {
- var now = Date.now();
-
- if((now - this.last_expired) < EXPIRATION_TIME) {
- this.logger.log(3, "Early mapper check.");
- return;
- }
-
- var delkeys = [];
- for(var elem in this.cache) {
- if((now - this.cache[elem].time) > EXPIRATION_TIME) {
- this.logger.log(2, "Deleting cached element: "+elem.location);
- delkeys.push(elem);
- }
- }
-
- for(var k in delkeys) {
- delete this.cache[k];
- }
-
- this.last_expired = now;
- },
-
- getBrowserForContentWindow: function(topContentWindow) {
- if(topContentWindow instanceof Components.interfaces.nsIDOMChromeWindow) {
- if(topContentWindow.browserDOMWindow) {
- var browser = topContentWindow.getBrowser().selectedTab.linkedBrowser;
- this.logger.log(3, "Chrome browser at "
- +browser.contentWindow.location+" found for: "
- +topContentWindow.location);
- return browser;
- }
- // Allow strange chrome to go through..
- this.logger.log(3, "Odd chome window"+topContentWindow.location);
- return topContentWindow;
- }
-
- var cached = this.checkCache(topContentWindow);
- if(cached != null) {
- return cached;
- }
-
- try {
- this.logger.log(3, "Cache failed for: "+topContentWindow.location);
- } catch(e) {
- this.logger.log(3, "Cache failed for unknown location?");
- }
-
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var enumerator = wm.getEnumerator("navigator:browser");
- while(enumerator.hasMoreElements()) {
- var win = enumerator.getNext();
- var browser = win.getBrowser();
- for (var i = 0; i < browser.browsers.length; ++i) {
- var b = browser.browsers[i];
- if (b && b.contentWindow == topContentWindow) {
- this.addCache(topContentWindow, b);
- return b;
- }
- }
- }
-
- // SpeedDial, google notebook and other extensions can create their
- // own "<browser>" tag elements. AFAICT, there is no way to enumerate
- // these... Just punt and return the most recently used browser
- try {
- if(topContentWindow.name != "speedDialLoaderBrowser") {
- if(topContentWindow && topContentWindow.location)
- this.logger.safe_log(4, "No browser found: ", topContentWindow.location);
- else
- this.logger.safe_log(4, "No browser found: ", topContentWindow.name);
- } else {
- this.logger.log(3, "SpeedDial browser found: "+topContentWindow.name);
- }
- } catch(e) {
- this.logger.log(4, "No browser found.");
- }
-
- // Punt..
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
- getService(Components.interfaces.nsIWindowMediator);
- var recentWindow = wm.getMostRecentWindow("navigator:browser");
- return recentWindow ? recentWindow.getBrowser().selectedTab.linkedBrowser : null;
- }
-}
-
-/**
-* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
-* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
-*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-if (XPCOMUtils.generateNSGetFactory)
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentWindowMapper]);
-else
- var NSGetModule = XPCOMUtils.generateNSGetModule([ContentWindowMapper]);
diff --git a/src/defaults/preferences/preferences.js b/src/defaults/preferences/preferences.js
index 164abbf..c481546 100644
--- a/src/defaults/preferences/preferences.js
+++ b/src/defaults/preferences/preferences.js
@@ -165,7 +165,6 @@ pref("extensions.torbutton.tor_memory_jar",false);
pref("extensions.torbutton.nontor_memory_jar",false);
pref("extensions.torbutton.tz_string","");
pref("extensions.torbutton.launch_warning",true);
-pref("extensions.torbutton.refererspoof", 0); //0=no spoof, 1=root spoof, 2=domain spoof, 3=blank spoof, 4=custom spoof
pref("extensions.torbutton.fakerefresh", false);
pref("extensions.torbutton.customeref","");
pref("extensions.torbutton.disable_livemarks",true);
1
0